samedi 29 novembre 2014

Irregular Polygons that can be Inscribed on a Circle HTML5 Canvas


I recently asked a question about drawing polygons in an HTML5 Canvas and got an excellent answer I just need to be able to add one feature. The ability to make those two functions (draw_sharp_polygon() and draw_reuleaux_polygon()) draw irregular polygons with random angles that are still inscribed on the same circle. Preferably I'd like to do this by adding one simple Boolean argument that decides whether the polygon to be drawn will be regular or irregular.


Similar to the picture on this Wikipedia page.





Aucun commentaire:

Enregistrer un commentaire