Wednesday, September 15, 2021

Making adjacent triangle fans; an initial triangle fan and then pushing out open edges. I can make a triangle out of a line from left to right and then push a third point out to the left of that by finding a point between the first two points and pushing that out at a right angle. Get a random point within some rectangle of a particular width and height. This is the top left corner of another rectangle within which we find a second point. We then find a third point between the first two points which is the upper right corner of a third rectangle within which we can find a third point. These points define a triangle with a clockwise winding. We can make sure these points are at least some minimum distance apart or we can not worry about it (yeah, I can’t not worry about it…). We can then find the longest side and push out a fourth point and find the center of this quad by averaging the four vertices.

No comments:

Post a Comment