Hello! I would like to procedurally generate planets (customizable planet type and size) made up of multiple triangular parts so that each part is selectable. This seems to be very mathematical, which is not my strong suit. Any scripting logic or relevant equations would be most appreciated! Thank you.
Hey there! I would assume this would involve a good bit of geometry - I cannot provide any direct code snippets at the moment but I’ll try and lead you along the right way. I have a solid background in applied mathematics, so hopefully I can put that to some good use.
First, after setting the radius for the shape, I would start with the top most point. Create a triangle using wedges, with the first triangle’s tip at that starting point. I would then revolve around the shape, determining angle from the radius of the sphere and the Y (up/down) position of the middle of each wedge.
Second, continue revolving until you complete one hemisphere, repeating the process. It seems like the sphere in the image was generated similarly, with the axis starting at the top right and ending at the bottom left.
Let me know if you need any help! Apologies if this was not extensively helpful, was just describing how I would start about it.
I see. But how do you manage the different sizes of the individual triangles?
P.S. the shape im looking for is a isosphere, just learned that lol
Hello there!
I was searching about icospheres and found This Article.
Hope it helps you on your pragramming journey! ;]
For that, I have no clue. From the image you sent, they appear to be extremely close to equilaterial triangles. What I would do is just start with one arm and figure it out from there, it’s better to start and not know what you are doing than to never start at all. This likely wasn’t much help, but I don’t want to tell you something that is completely wrong.