Skip to content

Latest commit

 

History

History
96 lines (53 loc) · 2.43 KB

README.md

File metadata and controls

96 lines (53 loc) · 2.43 KB

Plasma

Based on the article http://lodev.org/cgtutor/plasma.html

Progress

First plot a sine on the X-axis.

Plasma progress 001

Now with X+Y

Plasma progress 002

With the a square root thrown in for good measure

Plasma progress 003

Combine the sines

Plasma progress 004

Generate a palette

Plasma palette

Animate plasma using the palette

Plasma progress 005

Tweaked the plasma generation

Plasma progress 006

A few more tweaks

Plasma progress 007

Change the palette

Plasma palette 2

Generate plasma using the new palette

Plasma progress 008

Support for gradient palettes

Plasma palette 3

Generate plasma using the gradient palette

Plasma progress 009

Another animation

Plasma progress 010

Commands

CLI

Rendering palette and plasma as PNG images.

Usage of plasma:
  -h=512: Height of the image
  -n=1: Number of frames to generate
  -o="plasma.png": Output file name
  -p="palette.png": Palette file name
  -s=16: Scale of the plasma
  -show=false: Show the generated image
  -w=512: Width of the image

GUI

Window with a rotating plasma image.

Plasma GUI

Can also be transpiled into JavaScript by GopherJS

GopherJS Plasma

Joystick GUI

Control the plasma using a PS4 controller

Plasma Joystick GUI

Animation

Pixels GUI

Using screen.ReplacePixels to render the plasma.