Gen-X
May 29th, 2000, 08:05 AM
Here is what I want :
1. A Sphere
2. Comprising of Equilateral Triangle polygons
I am doing a "hobby" project in VB using Direct3D and wanted to represent the "world" using a 3D model. To do this however I need triangle polygons and I personally wanted them to be equaliateral (ie all 3 sides the same length, 60 degree angles between each).
Now I sat down and tried to work out how I would go about generating this sphere programatically and I tried many models to work out how it should work or should look.
Finally I came up with a method on how to do it :
Take a triangular pyramid, 4 sides with each side equilateral triangles. Now imagine that the very CENTRE of this object is the centre of the sphere and the 4 corners are exactly on the radius of that sphere.
If you take each of the 4 triangles and you split it into 4 triangles (Figure 1) and "raise" the 3 points of the new middle triangle such that each of these new points touch the radius of the sphere you are effectively "fleshing out" the surface so that the more times you do it the more it looks like a sphere and not a pyramid.
Figure 1 :
/\ /\
/ \ /__\
/ \ /\ /\
/______\ /__\/__\
By repeating this process with each remaining triangle I keep turning the "cut off" surfaces to a rounder surface more closely resembling the sphere.
Now what I would like to know is if anyone has any comments, ideas, critisisms or tips that would make this easier.
Is it the most effective method of generating a sphere using the conditions I require?
Is there an easy way of programatically doing this?
Do I need to brush up on anything more than geometry?
All comments welcome :)
1. A Sphere
2. Comprising of Equilateral Triangle polygons
I am doing a "hobby" project in VB using Direct3D and wanted to represent the "world" using a 3D model. To do this however I need triangle polygons and I personally wanted them to be equaliateral (ie all 3 sides the same length, 60 degree angles between each).
Now I sat down and tried to work out how I would go about generating this sphere programatically and I tried many models to work out how it should work or should look.
Finally I came up with a method on how to do it :
Take a triangular pyramid, 4 sides with each side equilateral triangles. Now imagine that the very CENTRE of this object is the centre of the sphere and the 4 corners are exactly on the radius of that sphere.
If you take each of the 4 triangles and you split it into 4 triangles (Figure 1) and "raise" the 3 points of the new middle triangle such that each of these new points touch the radius of the sphere you are effectively "fleshing out" the surface so that the more times you do it the more it looks like a sphere and not a pyramid.
Figure 1 :
/\ /\
/ \ /__\
/ \ /\ /\
/______\ /__\/__\
By repeating this process with each remaining triangle I keep turning the "cut off" surfaces to a rounder surface more closely resembling the sphere.
Now what I would like to know is if anyone has any comments, ideas, critisisms or tips that would make this easier.
Is it the most effective method of generating a sphere using the conditions I require?
Is there an easy way of programatically doing this?
Do I need to brush up on anything more than geometry?
All comments welcome :)