Tuesday, October 12, 2021

Running late as usual. I could revise my code to redraw the world div as a polygon based on a triangle fan and push the edges and vertices of that out with the rules I’ve been talking about. We can make new triangle fans by pushing a vertex out, making two new triangles and use these triangles to build out the adjacent triangle fan. I need to make sure that there is an overall polygon representing the whole. There is an outer edge, a border made up of consecutive points and the line segments between these points. We push out a vertex between two adjacent line segments, creating a virtual vector between the endpoints of these two line segments from which we derive dx and dy, which will give us that point pushed out from the vertex, defined as (vx-dy, vy+dx). Polygons are then lists of border points and the world polygon is constantly modified.

No comments:

Post a Comment