简体   繁体   中英

How do I create a 2D Circle out of squares (tiles)?

So basically what I'm trying to do is generate a circle completely out of square tiles in Unity and I am trying to think about the best way mathematically to generate it.

In the end, I want it to look something like:

https://encrypted-tbn2.gstatic.com/images?q=tbn:ANd9GcTHh7I_BURo5qMI73YLZVG6PO4WeFtbT--QL_9qOJovpNaWemar

In this image, the tiles are more rectangular and not all sides are equal, but it gets the point across.

Does anyone know of any mathematical formulas or anything that could be helpful in doing this? I don't necessarily need straight answers (unless you have them :D), but anything to help me along would be appreciated!

Thanks!

Take the starting point (center) and start drawing your first square in the starting direction. Now turn the direction with the Golden ratio : 1.618...

Keep turning this much for every consecutive square you are drawing, every time increasing the distance from the center a little bit.

Apparently sunflowers also grow following this pattern according to this video !

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM