|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
In article <3a4e2a28@news.povray.org>, "Greg M. Johnson"
<"gregj;-)56590\""@aol.c;-)om> wrote:
> 1) Does anyone have code for making a mesh which is an icosahedron?
You might find something here:
http://www.swin.edu.au/astronomy/pbourke/
> 2) Does anyone have code for making a N-triangle approximation of a
> sphere (please don't code this just for me--does it already exist)?
Maybe you can find something useful in one of the discussions about
"evenly spaced points on a sphere" on these groups...
> 3) Say I'm going to put a few thousand spheres in a union, but then want
> to replace the spheres with meshes for memory's sake. How many
> triangles (I assume it's several thousand) does it take to cause the
> same memory usage/parse time as one sphere?
A single-triangle mesh will probably use more memory than a single
sphere, assuming texturing is the same. A copy of a mesh (of any size)
will probably use slightly less memory than a sphere, again with all
else equal.
For parse time, you will have to test it...but it would most likely be
less for a copy of a mesh than a sphere.
--
Christopher James Huff
Personal: chr### [at] maccom, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tagpovrayorg, http://tag.povray.org/
<><
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Chris Huff wrote:
> > 2) Does anyone have code for making a N-triangle approximation of a
> > sphere (please don't code this just for me--does it already exist)?
>
> Maybe you can find something useful in one of the discussions about
> "evenly spaced points on a sphere" on these groups...
I've actually coded the scenario you described fairly successfully. The
problem comes in trying to figure out which of the points should be the
vertices of the triangles.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
I did one some weeks ago (of course in POV) ...
(just a try for myself) ...
I'll post it in p.b.s-f (If I find it again ...)
--
Jan Walzer
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> > > 2) Does anyone have code for making a N-triangle approximation of a
> > > sphere (please don't code this just for me--does it already exist)?
> >
> > Maybe you can find something useful in one of the discussions about
> > "evenly spaced points on a sphere" on these groups...
>
> I've actually coded the scenario you described fairly successfully. The
> problem comes in trying to figure out which of the points should be the
> vertices of the triangles.
I made some thoughts about this myself ...
It should be go with a recursive algorithm .... (sounds like StarTrek,
heheeee ...)
Imagine a regular tetraedron (ABCD),
with it's center (M),
having |A-M|=|B-M|=|C-M|=|D-M|=r
1) do for every triangle (ABC,ACD,ABD,BCD):
2) divide it into 4 regular triangles
3) normalize the distance of the 3 new points and the center (M) to r
4) go back to 1 until the sphere is fine enough ...
all clear ???
--
Jan Walzer
(currently no Signature)
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
In article <3a4e6e6c$1@news.povray.org>, "Jan Walzer" <jan### [at] lzernet>
wrote:
> It should be go with a recursive algorithm .... (sounds like StarTrek,
> heheeee ...)
...snip...
That won't let you specify a specific number of triangles to use, only a
recursion level. The number of triangles increases rather rapidly with
recursion level.
--
Christopher James Huff
Personal: chr### [at] maccom, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tagpovrayorg, http://tag.povray.org/
<><
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Greg M. Johnson" wrote:
> 1) Does anyone have code for making a mesh which is an icosahedron?
That reminds me, I was gonna unzip most of the source at my website...
http://davidf.faricy.net/source/meshpoly.inc
> 2) Does anyone have code for making a N-triangle approximation of a
> sphere (please don't code this just for me--does it already exist)?
I did this once, start with a regular polyhedron (tetra, octa or icosa will
work), subdivide each face into four triangles and normalize the vertices.
Recursive macro of course.
--
David Fontaine <dav### [at] faricynet> ICQ 55354965
My raytracing gallery: http://davidf.faricy.net/
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
David Fontaine wrote:
> > 2) Does anyone have code for making a N-triangle approximation of a
> > sphere (please don't code this just for me--does it already exist)?
>
> I did this once, start with a regular polyhedron (tetra, octa or icosa will
> work), subdivide each face into four triangles and normalize the vertices.
> Recursive macro of course.
BTW I just thought of something, to use fewer triangles you could make the last
iteration subdivide into 2 or 3 instead.
--
David Fontaine <dav### [at] faricynet> ICQ 55354965
My raytracing gallery: http://davidf.faricy.net/
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Greg M. Johnson wrote:
> 2) Does anyone have code for making a N-triangle approximation of a
> sphere (please don't code this just for me--does it already exist)?
Uwe Zimmermann wrote a utility called "geodesic.inc" which
does this. I forget the URL but I know there is a pointer to it
from somewhere on the main povray site (the macros & include files
section). It's rather handy.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Greg M. Johnson" wrote:
>
> 1) Does anyone have code for making a mesh which is an icosahedron?
If you download my Surface Subdivision Suite at
http://users4.50megs.com/enphilistor/sss.htm
you should find therein code that will make you an icosahedron; it
can also subdivide it to make a smoother sphere.
Regards,
John
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On Sat, 30 Dec 2000 18:40:37 -0500, Chris Huff wrote:
>In article <3a4e6e6c$1@news.povray.org>, "Jan Walzer" <jan### [at] lzernet>
>wrote:
>
>> It should be go with a recursive algorithm .... (sounds like StarTrek,
>> heheeee ...)
>
>...snip...
>
>That won't let you specify a specific number of triangles to use, only a
>recursion level. The number of triangles increases rather rapidly with
>recursion level.
One way to provide more options is to also allow starting with a regular
octahedron or icosahedron.
My golfball code (at the address below) contains the germ of this algorithm
for a starting point of an icosahedron. It only generates the vertices,
not the triangles, but it might be a good starting point. I've been meaning
to generalize it a little (replace the constant #defines with a smaller number
of constant #defines) but I haven't gotten around to it yet.
--
Ron Parker http://www2.fwi.com/~parkerr/traces.html
My opinions. Mine. Not anyone else's.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |