Friday, November 18, 2022

Back to hiding the offset div after it does its' job

7 November 2022- Draw Shape!

Click in the green offset button to set the XY offset!
I want to draw a polygon and save the points in a list of polygon vertices. Once we have three points the page will draw the simplest polygon, a triangle, calculate the area and find out if the vertices are in a clockwise or counter-clockwise order.
Using divs meeans I need to figure a few things out about how to shape the div and place the div from the top and from the left.
Actually, no, I'm just going to make the parent offset div as wide and high as I need it to be, while cutting down to the polygon shape I want. For one point, that's a circle, for two points it's a thin quad (actually a rectangular hexagon) and for three points it's a triangle, and then we start making ever more complicated shapes!

No comments:

Post a Comment