Log In  
Follow
SoySauce951
[ :: Read More :: ]

Cart #pzmowin-0 | 2023-08-05 | Code ▽ | Embed ▽ | No License

Hello, I'm new to programming and have been struggling with a line intersection function. The goal of this cart is to draw lines one after another, the origin of one segment being the endpoint of another. This has led to several problems, as initially the intersect function was considering this shared point to count as an intersection. To remedy this, I separated the lines into three categories: #1, the line being currently drawn, #2, the previously drawn line, and #3, all the lines before it. The problem I've run into here is that it's only calculating an intersection with the first line of the last list (#3).

This WIP cart prints whether or not intersect is true, and then the number of segments in the lists for #2 and #3 respectively. Is there a way to loop through and detect intersection for all of this last list? Thank you for bearing with my wall of text, and for your time and assistance.

P#132766 2023-08-05 18:23 ( Edited 2023-08-05 18:27)