Friday, November 18, 2022

Today's prompt was 'goose'. I'm pleased with it.


I got my shape-drawing code to play nice, or nicer, anyway. I'm resizing the parent offset div to greatest x and y. Now I just need it to draw my polygons... I have points down, a line is just a thin quad or rectangular hexagon since I intend to draw the corners at points perpendicular to the endpoints. Initially they would be at the endpoint plus and minus dx and dy (a thick line!), then resized to 2 pixels away. The simplest polygon is three points wound clockwise or counter clockwise, then we would place subsequent points in the list of vertices based on proximity, effectively breaking and moving the nearest edge in or out, inserting the new point between the two nearest vertices of the polygon. I can then recalculate the area of the polygon after each change.

No comments:

Post a Comment