mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
// Example 07-14 from "Getting Started with Processing"
|
||||
// by Reas & Fry. O'Reilly / Make 2010
|
||||
|
||||
float angle = 0.0;
|
||||
float offset = 60;
|
||||
float scalar = 30;
|
||||
float speed = 0.05;
|
||||
|
||||
void setup() {
|
||||
size(120, 120);
|
||||
smooth();
|
||||
}
|
||||
|
||||
void draw() {
|
||||
float x = offset + cos(angle) * scalar;
|
||||
float y = offset + sin(angle) * scalar;
|
||||
ellipse( x, y, 40, 40);
|
||||
angle += speed;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user