Loading...
Processing Forum
Recent Topics
All Forums
Screen name:
archstud
archstud's Profile
1
Posts
1
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
How to randomise colors (just 6 colours)
[4 Replies]
02-Oct-2010 07:20 AM
Forum:
Programming Questions
Hi all,
I'm new to processing so I hope you can help!
So heres my code:
void setup(){
size(700, 700);
smooth();
background(0);
}
void draw(){
stroke(255,8,8);
noFill();
strokeWeight(50);
arc(700, 700, 1300, 1300, PI, TWO_PI-PI/2);
stroke(255,153,0);
noFill();
strokeWeight(50);
arc(700, 700, 1200,1200, PI, TWO_PI-PI/2);
stroke(255,234,0);
noFill();
strokeWeight(50);
arc(700, 700, 1100, 1100, PI, TWO_PI-PI/2);
stroke(0,255,1);
noFill();
strokeWeight(50);
arc(700, 700, 1000, 1000, PI, TWO_PI-PI/2);
stroke(26,230,255);
noFill();
strokeWeight(50);
arc(700, 700, 900, 900, PI, TWO_PI-PI/2);
stroke(186,3,255);
noFill();
strokeWeight(50);
arc(700, 700, 800, 800, PI, TWO_PI-PI/2);
}
What I'm having trouble with is trying to get each rainbow arc to randomly change to any one of the six colors.
Thanks in advance for any replies!
«Prev
Next »
Moderate user : archstud
Forum