Skip to content

Instantly share code, notes, and snippets.

View eskimoblood's full-sized avatar
🙀
snafu

Andreas Köberle eskimoblood

🙀
snafu
View GitHub Profile
@eskimoblood
eskimoblood / NoiseWave.js
Created August 18, 2011 10:02
port of Noise Wave by Daniel Shiffman from processing to plask. Using Sean McCulloughs perlin noise implentation and convert it to work as commonJS module https://gist.github.com/304522 a
/**
* port of Noise Wave
* by Daniel Shiffman from processing to plask
*
* Using Perlin Noise to generate a wave-like pattern.
*/
var plask = require('plask');
var noise = require('./classicalNoise').noise;
@eskimoblood
eskimoblood / Additive Wave
Created August 16, 2011 16:08
Converting basic processing sketch by Daniel Shiffman to work with the plask JavaScript framework
/**
* Additive Wave
* by Daniel Shiffman.
*
* Create a more complex wave by adding two waves together.
*/
var plask = require('plask');
var xspacing = 8; // How far apart should each horizontal location be spaced
var w; // Width of entire wave
package ${enclosing_package};
import processing.core.*;
import processing.opengl.*;
import javax.media.opengl.GL;
public class ${primary_type_name} extends PApplet {
static public void main(String args[]) {
PApplet.main(new String[] { /* "--present", */ "${enclosing_package}.${primary_type_name}" });
@eskimoblood
eskimoblood / SunflowApiApi
Created October 25, 2010 18:05
Simple example of using SunflowApiApi with processing in eclipse
package yourPackage;
import java.awt.Color;
import org.sunflow.math.Point3;
import org.sunflow.math.Vector3;
import processing.core.*;
import sunflowapiapi.*;
@eskimoblood
eskimoblood / PenroseTilling.elm
Last active August 29, 2015 14:10
Penrose Tiling in Elm
module Penrose where
import List(foldr, map)
import Graphics.Collage(..)
import Graphics.Element(..)
import Color(..)
goldenRatio = (1 + sqrt 5) / 2
type alias Point = (Float, Float)
type Triangle
= Kite (Point, Point, Point)
@eskimoblood
eskimoblood / BackgroundColor
Last active August 29, 2015 13:58
Nice way to have your private variables editable in a external window.
import control.ControlFrame;
import processing.core.PApplet;
public class BackgroundColor {
private final PApplet p;
@ControlElement(properties = {"min=0", "max=255"}, x = 10, y = 10)
private float red = 0;