Loading...
Processing Forum
Recent Topics
All Forums
Screen name:
tarvajarvi
tarvajarvi'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
Array: line graph
[2 Replies]
11-Nov-2012 08:26 AM
Forum:
Programming Questions
Hello guys,
I would like to make a line graph, like this:
Code:
int []values = {200,150,330,100};
int lineWidth= width/4;
void setup(){
size(400,max(values));
background(0);
}
void draw(){
for(int i=0; i<values.length; i++){
for (int j= 0; j< values.length-1; j++) {
// lineWidth??
stroke(255);
line(i,j,i+1,j+1);
}
}
}
-The lines must have the same width
-How can i connect the array points...
Thanks,
Tarvajarvi.
«Prev
Next »
Moderate user : tarvajarvi
Forum