09.04.2016 Views

www.ebook777.com

Make_Getting_Started_with_Processing_Second_Edition

Make_Getting_Started_with_Processing_Second_Edition

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

float angle = 0.0;<br />

float offset = 60;<br />

float scalar = 2;<br />

float speed = 0.05;<br />

void setup() {<br />

size(120, 120);<br />

fill(0);<br />

}<br />

void draw() {<br />

float x = offset + cos(angle) * scalar;<br />

float y = offset + sin(angle) * scalar;<br />

ellipse( x, y, 2, 2);<br />

angle += speed;<br />

scalar += speed;<br />

}<br />

Motion 117

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!