Loading...
Processing Forum
Recent Topics
All Forums
Screen name:
braoude
braoude'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
How can i connect points?
[4 Replies]
24-Nov-2011 03:26 PM
Forum:
Programming Questions
Hey guys,
First Iam a very beginner on processing and I realy need your help.
Questions:
1)In the case below, how can I connect 1 poin t( when a line end and the other begin) to the four last one?
2)
I would like to draw in 3D not only 2D.
THANK YOU IN ADVANCE
import peasy.*;
import processing.opengl.*;
float ax,ay;
int distance = 40;
void setup() {
size(500,500);
smooth();
background(255);
ax = 500/2;
ay = 500/2;
}
void draw() {
float x = ax + random(-distance,distance);
float y = ay + random(-distance,distance);
line(ax,ay,x,y);
line(ax,ay,x,y);
ax = x;
ay = y;
}
void keyPressed() {
if (key == ' ') {
background(255);
ax = width/2;
ay = height/2;
}
}
«Prev
Next »
Moderate user : braoude
Forum