Created
December 4, 2016 13:39
-
-
Save paulinalinaa/594f3517669edb96aeca00dbf2568b3a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var offset = 0; | |
| function setup() { | |
| createCanvas(500,500); | |
| frameRate(50); | |
| saveFrames('sinkurve_', 'png', 5, 25); | |
| } | |
| function draw() { | |
| var a = 0.0; //winkel | |
| var inc = TWO_PI/20.0; //breite der kurve | |
| background(255); | |
| for (var i = 0; i <=300; i++) { | |
| ellipse(i*10 - offset, height/2, i*10, 100+sin(a)*10.0); //offset bringt die bewegung für x, sin(winkel)*höhe der kurve | |
| a = a + inc; //addierung winkel mit kurve | |
| } | |
| offset = offset +1; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment