Need help...If lines intercept, make point(x,y)
in
Programming Questions
•
2 years ago
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
1