Loading...
Processing Forum
Recent Topics
All Forums
Screen name:
ardesh
ardesh's Profile
1
Posts
3
Responses
0
Followers
Activity Trend
Last 30 days
Last 30 days
Date Interval
From Date :
To Date :
Go
Loading Chart...
Posts
Responses
PM
Show:
All
Discussions
Questions
Expanded view
List view
Private Message
circular motion example 7-14 (getting started). replace ellipse with other shape in loop
[6 Replies]
09-Jun-2012 06:25 PM
Forum:
Programming Questions
going for a variation on the example which does
replacing the shape (ellipse ()) with another object instead of repeating the same object over and over for each execution of the loop
circular motion example 7-14 of the getting started book is
float angle = 0.00;
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;
}
«Prev
Next »
Moderate user : ardesh
Forum