Monday, October 11, 2021

I’ve got the page raking two points from the user to make a vector and initial edge of the triangle from which we will make a complex polygon with an internal mesh of triangles. We get that third point by taking the midpoint of the line or picking a point somewhere along the line segment and pushing out at right angles, subtracting some fraction of dy from this point x and adding the same fraction of dx to this point y. This gives me a first, second and third point in a clockwise order. We need to reverse this order, counterclockwise, and use the same set up to push points out from the edges. This is the most important thing which I noticed I was getting wrong. We can push all three edges out and then push all three vertices which now share three adjacent triangles, add six triangles and making three interlocking five triangle fans.

No comments:

Post a Comment