https://github.com/peterhellberg/plasma
Experiments with plasma generation in Go
https://github.com/peterhellberg/plasma
go plasma toy-project
Last synced: 10 months ago
JSON representation
Experiments with plasma generation in Go
- Host: GitHub
- URL: https://github.com/peterhellberg/plasma
- Owner: peterhellberg
- Created: 2015-01-18T13:58:40.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2017-09-10T16:18:56.000Z (over 8 years ago)
- Last Synced: 2025-04-11T06:18:22.634Z (10 months ago)
- Topics: go, plasma, toy-project
- Language: Go
- Size: 23.4 KB
- Stars: 6
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Plasma
Based on the article
## Progress
First plot a sine on the X-axis.

Now with `X+Y`

With the a square root thrown in for good measure

Combine the sines

Generate a palette

Animate plasma using the palette

Tweaked the plasma generation

A few more tweaks

Change the palette

Generate plasma using the new palette

Support for gradient palettes

Generate plasma using the gradient palette

Another animation

## 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.

Can also be transpiled into JavaScript by [GopherJS](http://www.gopherjs.org/)
[](http://data.gopher.se/js/plasma/)
### Joystick GUI
Control the plasma using a PS4 controller


### Pixels GUI
Using `screen.ReplacePixels` to render the plasma.