|
|||||
|
| MWForum Message | [Date Index] [Threads] [Authors] [Attachments] [Subscribe] | ||||||||
Hello, The cheap solution is to draw a square then draw whatever next polygon you wish to draw, only smaller. If the next polygons have more than 4 sides, and if you maintain the length of a side constant for all polygons, they will only get bigger as the number of sides grow. Now how much smaller the next polygon has to be? That's a tough question and it is above my willingness to compute geometry at this moment (although it is a great challenge). But perhaps you meant "centered polygons". Then, the question is something else. In that case, I would make a polygon that "starts from the center" Here's a procedure by Jacques Mathil, found in the Forum's archive 2005-02-18 (merci Jacques) to centered_polygon :number_sides :radius make "alpha 360 / :number_sides make "side 2 * :radius * sin (:alpha / 2) pu fd :radius rt 90 + :alpha / 2 pd repeat :number_sides [fd :side rt :alpha] pu left 90 + :alpha / 2 bk :radius end
Le 07-03-22 à 18:46, askanexpert@xxxxxxxxxxxxxxxxxxxxxxxxxxxx a écrit : This is an automatic message sent from the web form at: http://mia.openworldlearning.org/howdoi.htm To save an attachment to your computer, PC users should right-click (Mac users, click and hold the mouse button) on the link and then choose 'save target as' from the pop-up menu. A window will then pop up in which you can choose a location for the file. | |||||||||