Comments and answers for "How to calculate the vertices of an icosphere"
http://answers.unity.com/questions/1091527/how-to-calculate-the-vertices-of-an-icosphere.html
The latest comments and answers for the question "How to calculate the vertices of an icosphere"Comment by Bunny83 on Bunny83's comment
http://answers.unity.com/comments/1095284/view.html
Sorry for the late response ^^. I usually don't check my email notifications. Once the question tab is closed it's unlikely i return to it unless i check my recent activities Answer list (which i just did).
Yes, we don't really have a name for that approach to create a sphere. You could call it a "cube-sphere" or a "spherified cube". It has been used by Spore to create the planet mesh. I posted already several solutions to that problem. My recent post allows you to create a sphere as large as your PC can handle by using several mesh patches:
[http://answers.unity3d.com/answers/1078038/view.html][1]
For real huge planets you might want to introduce some kind of LOD system for each patch.
[1]: http://answers.unity3d.com/answers/1078038/view.htmlSun, 08 Nov 2015 15:07:09 GMTBunny83Comment by MakakWasTaken on MakakWasTaken's comment
http://answers.unity.com/comments/1092196/view.html
I am sorry, I have totally misunderstood the term icosphere. My misunderstanding is caused by me googling around trying to find a solution which gave me a sphere which I though was an icosphere because it continously appeared with the context icosphere.
I though this was an icosphere:
![Spherified Cube][1]
This sphere clearly has sides which can be used in a 2D array, but I have now tried to implement a 3d array instead, because the way to use this seems to be way easier with a 3 dimensional array.
[1]: /storage/temp/57429-cube12.jpgMon, 02 Nov 2015 16:40:07 GMTMakakWasTakenComment by Bunny83 on Bunny83's comment
http://answers.unity.com/comments/1091889/view.html
Sorry, but i have no idea what you actually want. An icosphere doesn't really have a "side". You talk about a two dimensional array, but what relation does your array have with the icosphere? An icosphere consists of triangles, not quads, so how do you put them into a 2d array?
Your question just asked how to generate the vertices of an icosphere. I'm not sure what you mean by "identify them with x,y coordinates". Do you mean to use polar coordinates on the sphere? Are you sure you talk about an icosphere? Since you talk about neighbors, neighbors of what? If you mean adjacent vertices of a vertex? A vertex of an icosphere has either 5 or 6 adjacent vertices. If you talk about triangles, each triangle has exactly 3 neighbors. I don't see where your "2d grid" fits into this.
Feel free to **edit** your **question** and add more details. At the moment it's not really clear what you want to do.Mon, 02 Nov 2015 01:21:00 GMTBunny83Comment by MakakWasTaken on MakakWasTaken's answer
http://answers.unity.com/comments/1091698/view.html
I can only come up with one solution for this and it is to check after the 8 closest points to the neighbour sorted by distance, but this would take a lot of time because it would have to scan all the vertices every time it had to get the neighbour of one node, but I could scan the sphere once and then make each node have a list of the pre-computed neighbours. This would kinda fix the problem, but do anyone have a better solution for this?Sun, 01 Nov 2015 18:25:18 GMTMakakWasTakenComment by MakakWasTaken on MakakWasTaken's answer
http://answers.unity.com/comments/1091655/view.html
I actually need to map the icospheres sides into a 2d array, but I might have to give each side of the sphere a int to identify it by. This picture kinda describes the problem with this:
![alt text][1]
Let's say that on the left side is "Side 1" and the right one is "Side 2" I then need to function for point 1,1 to find 0,3 as it's neighbour.
[1]: /storage/temp/57364-4clnp.jpgSun, 01 Nov 2015 17:08:26 GMTMakakWasTakenComment by Bunny83 on Bunny83's answer
http://answers.unity.com/comments/1091630/view.html
Just realised that the wiki link was still an old link ^^. Fixed the link.Sun, 01 Nov 2015 14:52:58 GMTBunny83Answer by Bunny83
http://answers.unity.com/answers/1091568/view.html
Start by [creating a Icosahedron][1] which is actually the "smallest" icosphere.
Then you can use a simple subdivide method like the ones i've [posted over here(don't miss the link to the wiki at the end)][2].
Once subdivided you simply "normalize" all vertices so they have the same distance from the center. If the Icosahedron has been created around the local origin you can simply do
v = v.normalized * radius;
for each vertex.
You can repeat the subdiv process several times if you want to get the desired resolution.
I'm just a bit confused since you said "x, y" instead of "x,y,z" and used the term "grid". Those terms usually refer to 2d while a sphere is a 3d object. Maybe i didn't get what you actually want. If that's not what you want, feel free to edit your question and include more details, maybe a drawing or screenshot of what you want.
[1]: http://blog.andreaskahler.com/2009/06/creating-icosphere-mesh-in-code.html
[2]: http://answers.unity3d.com/answers/259268/view.htmlSun, 01 Nov 2015 11:26:50 GMTBunny83