It might not look like much but...

Started by
4 comments, last by dave 18 years, 4 months ago
Though not very graphically stunning, it took me quite a bit of work to get it the way I wanted it. All the points on the sphere are equidistant (needed for the type of terrain generation I'm trying to do). This will work for any number of points. I'd been fighting with different subdivision techniques that just weren't giving me the results I was looking for. The algorithm that did work was treating all points as if they had gravity and recursively moving points to different locations if that location had less gravity. I'm sure I'm not the first person to think of doing it this way, but my stuff rarely works, so I'm proud of it regardless.
--------
Whoisdoingthis.com - my stupid website about warning labels.
Advertisement
Have you looked at Spherical Code (MathWorld)?
Ra
Quote:Original post by Ra
Have you looked at Spherical Code (MathWorld)?


I've looked at several different ways of getting points evenly spaced on a sphere. Unfortunately, most analytical methods limit you to only certain solids that will work (cube, icosahedron, dodecahedron).

At any rate, the planet generator is coming along slowly but surely.
Still not where I'd like it to be, but progress is progress.


I'm not sure yet what's causing the "crater" effect.
--------
Whoisdoingthis.com - my stupid website about warning labels.
I've come across a problem like that. You need to look at your code.



Sorry!
Quote:Original post by ChemicalImbalance
The algorithm that did work was treating all points as if they had gravity and recursively moving points to different locations if that location had less gravity.

That doesn't sound right. For instance, consider the sphere you have right now. Pick the point farthest to the left. Imagine moving that point farther to the left: now it experiences less gravity than the rest of the points (it's farther away from all of them), so your algorithm moves it there. In theory, your algorithm should have caused all the points to accelerate outwards from the sphere's origin at infinite speed.

This may or may not be contributing to the cratering effect you describe. Are the colorations supposed to be altitudes relative to a perfect sphere? If so, it just means your sphere isn't smooth enough relative to a perfect sphere. Pick more points.
- k2"Choose a job you love, and you'll never have to work a day in your life." — Confucius"Logic will get you from A to B. Imagination will get you everywhere." — Albert Einstein"Money is the most egalitarian force in society. It confers power on whoever holds it." — Roger Starr{General Programming Forum FAQ} | {Blog/Journal} | {[email=kkaitan at gmail dot com]e-mail me[/email]} | {excellent webhosting}
Quote:Original post by kSquared
Quote:Original post by ChemicalImbalance
The algorithm that did work was treating all points as if they had gravity and recursively moving points to different locations if that location had less gravity.

That doesn't sound right. For instance, consider the sphere you have right now. Pick the point farthest to the left. Imagine moving that point farther to the left: now it experiences less gravity than the rest of the points (it's farther away from all of them), so your algorithm moves it there. In theory, your algorithm should have caused all the points to accelerate outwards from the sphere's origin at infinite speed.

This may or may not be contributing to the cratering effect you describe. Are the colorations supposed to be altitudes relative to a perfect sphere? If so, it just means your sphere isn't smooth enough relative to a perfect sphere. Pick more points.


Un less he has specified a radius.

This topic is closed to new replies.

Advertisement