Loading...
Processing Forum
Recent Topics
All Forums
Screen name:
alihze
alihze's Profile
1
Posts
0
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
Need help...If lines intercept, make point(x,y)
[2 Replies]
12-Apr-2011 09:30 AM
Forum:
Programming Questions
Hello there,
im very inexperienced in dealing with processing.
In need some help in writing an algorithm as fast as possible.
I have many lines which intercept see here:
void drawLines(int number, int space)
{
for(int i = 0 ; i < number; i++)
{
line(0, space * i , 80 , 50 + space * i);
line(80, space * i, 0, 50 + space * i);
line(20 + space * i * 0.8, 0, 20 + space * i * 0.8, 100);
}
}
void setup()
{
size(400,400);
drawLines(6, 10);
}
Now i have to write a code which make a point if the vertical, and the both diagonal lines crosses.
Its important that the points will only be maked between the first and last vertical line an also on it self...
so there is an limit.
The end figure is a polygon with 6 corners consisting of the points with regular space.
im thanful for every answer and help
«Prev
Next »
Moderate user : alihze
Forum