POV-Ray : Newsgroups : povray.advanced-users : Creating Spheres of Triangles Server Time
11 Oct 2026 23:52:53 EDT (-0400)
  Creating Spheres of Triangles (Message 1 to 20 of 20)  
From: Lars W 
Subject: Creating Spheres of Triangles
Date: 30 Jun 1999 19:49:45
Message: <377aad19@news.povray.org>
Hi

I wan't to construct an Sphere out of triangles ,( i know the standard
POV-Sphere is faster and better and
so on, but i need a trianglesphere ), does anybody know of resources, or has
an tutorial by him self
for doing that. it should be possible to say, how complex the sphere should
be, and it should
NOT look like an globe, best would be an sphere out of evenly sized
triangles.

thanks in advance.

Lars Wolter


Post a reply to this message

From: Ken
Subject: Re: Creating Spheres of Triangles
Date: 30 Jun 1999 20:02:10
Message: <377AAFC2.7B031B6@pacbell.net>
"Lars W." wrote:
> 
> Hi
> 
> I wan't to construct an Sphere out of triangles ,( i know the standard
> POV-Sphere is faster and better and
> so on, but i need a trianglesphere ), does anybody know of resources, or has
> an tutorial by him self
> for doing that. it should be possible to say, how complex the sphere should
> be, and it should
> NOT look like an globe, best would be an sphere out of evenly sized
> triangles.
> 
> thanks in advance.
> 
> Lars Wolter

  I could easily make you a few triangle spheres using different parameters.
I have a couple of different programs that can do this but I have no pov
script that can accomplish this.

  For an example download my disco ball source with has a triangle based
sphere. It is located in the following location:

    Subject: Reflecting Mirrored Ball Scene
       Date: Sun, 21 Mar 1999 16:20:32 -0800
       From: Ken <tyl### [at] pacbellnet>
 Newsgroups: povray.binaries.scene-files


  You might also be able to fake it using a prism object.

-- 
Ken Tyler

mailto://tylereng@pacbell.net


Post a reply to this message

From: Edward C 
Subject: Re: Creating Spheres of Triangles
Date: 1 Jul 1999 03:35:52
Message: <377b1a58@news.povray.org>
I think your best bet is a dodecahedron, a regular shape made from 20
equilateral triangles.  From there you could sub-divide the faces at will to
however many triangles you want.  See also the previous thread titled "How
to distribute points equally on a sphere surface?".


Post a reply to this message

From: Nieminen Mika
Subject: Re: Creating Spheres of Triangles
Date: 1 Jul 1999 05:28:24
Message: <377b34b8@news.povray.org>
Lars W. <lar### [at] snafude> wrote:
: I wan't to construct an Sphere out of triangles ,( i know the standard
: POV-Sphere is faster and better and
: so on, but i need a trianglesphere ), does anybody know of resources, or has
: an tutorial by him self
: for doing that. it should be possible to say, how complex the sphere should
: be, and it should
: NOT look like an globe, best would be an sphere out of evenly sized
: triangles.

  Distributing objects evenly on the surface of a sphere is a non-trivial
task.
  If making a earth-looking globe (with latitude and longitude lines) is
enough, that's pretty easy with povray (you need some math, though).
Something like this:

#declare Radius=1;
#declare Size1=20;
#declare Size2=10;

mesh
{ #declare Ind2=0;
  #while(Ind2<Size2)
    #declare Ang2_1=pi*Ind2/Size2;
    #declare Ang2_2=pi*(Ind2+1)/Size2;
    #declare Ind1=0;
    #while(Ind1<Size1)
      #declare Ang1_1=2*pi*Ind1/Size1;
      #declare Ang1_2=2*pi*(Ind1+1)/Size1;
      #declare P1=<Radius*(sin(Ang1_1)*sin(Ang2_1)),
                   Radius*cos(Ang2_1),
                   Radius*(cos(Ang1_1)*sin(Ang2_1))>;
      #declare P2=<Radius*(sin(Ang1_2)*sin(Ang2_1)),
                   Radius*cos(Ang2_1),
                   Radius*(cos(Ang1_2)*sin(Ang2_1))>;
      #declare P3=<Radius*(sin(Ang1_2)*sin(Ang2_2)),
                   Radius*cos(Ang2_2),
                   Radius*(cos(Ang1_2)*sin(Ang2_2))>;
      #declare P4=<Radius*(sin(Ang1_1)*sin(Ang2_2)),
                   Radius*cos(Ang2_2),
                   Radius*(cos(Ang1_1)*sin(Ang2_2))>;
      triangle { P1,P2,P3 }
      triangle { P1,P3,P4 }
      #declare Ind1=Ind1+1;
    #end
    #declare Ind2=Ind2+1;
  #end
}

-- 
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

From: Chris Huff
Subject: Re: Creating Spheres of Triangles
Date: 1 Jul 1999 07:59:10
Message: <377B5915.C6B3276C@compuserve.com>
Um, isn't a dodecahedron composed of 12 pentagons? If that is the case,
it wouldn't have 20 equilateral triangles, but 60 congruent isosceles
triangles.


Post a reply to this message

From: Ron Parker
Subject: Re: Creating Spheres of Triangles
Date: 1 Jul 1999 09:06:10
Message: <377b67c2@news.povray.org>
On Thu, 1 Jul 1999 17:35:56 +1000, Edward C. wrote:
>I think your best bet is a dodecahedron, a regular shape made from 20
>equilateral triangles.  

You're thinking of an icosahedron.  A dodecahedron has 12 sides.  If
you download my golf ball code from http://www2.fwi.com/~parkerr/traces.html
you'll find that it subdivides an icosahedron to generate the centers
for the dimples; perhaps the original poster could adapt it to his needs.


Post a reply to this message

From: Alberto
Subject: Re: Creating Spheres of Triangles
Date: 1 Jul 1999 11:28:47
Message: <377B89A3.8E70F961@ma.usb.ve>
I've posted the second iteration of a version of your idea in the binaries
news. I have to say that it looks
a little bit strange.

Alberto.

"Edward C." wrote:

> I think your best bet is a dodecahedron, a regular shape made from 20
> equilateral triangles.  From there you could sub-divide the faces at will to
> however many triangles you want.  See also the previous thread titled "How
> to distribute points equally on a sphere surface?".


Post a reply to this message

From: Edward C 
Subject: Re: Creating Spheres of Triangles
Date: 1 Jul 1999 20:23:47
Message: <377c0693@news.povray.org>
OK, OK, so geometry was never my favourite maths topic (calculus is my
thing).  The great thing about the 'net is that you can embarras yourself in
front of so many people at once.


Post a reply to this message

From: Edward C 
Subject: Re: Creating Spheres of Triangles
Date: 1 Jul 1999 20:37:09
Message: <377c09b5@news.povray.org>
But there are other ways to subdivide...

Alberto wrote in message <377B89A3.8E70F961@ma.usb.ve>...
>I've posted the second iteration of a version of your idea in the binaries
>news. I have to say that it looks
>a little bit strange.


Post a reply to this message

From: Lance Birch
Subject: Re: Creating Spheres of Triangles
Date: 1 Jul 1999 20:59:47
Message: <377c0f03@news.povray.org>
>: I wan't to construct an Sphere out of triangles ,( i know the standard
>: POV-Sphere is faster and better and
>: so on, but i need a trianglesphere ), does anybody know of resources, or
has
>: an tutorial by him self
>: for doing that. it should be possible to say, how complex the sphere
should
>: be, and it should
>: NOT look like an globe, best would be an sphere out of evenly sized
>: triangles.
>
>  Distributing objects evenly on the surface of a sphere is a non-trivial
>task.
>  If making a earth-looking globe (with latitude and longitude lines) is
>enough, that's pretty easy with povray (you need some math, though).

But the triangles won't be the same sizes right?

If you really want to do it perfectly you can use a geosphere with a
geodesic base type of a 20-sided icosahedron.  The facets are all equally
sized equilateral triangles.  From there the sphere can be divided into any
number of segments based on multiples and divisions of the 20 faces.

Right?

Alternatively you could try a polyhedron base type like a tetrahedron or
octahedron (all of which can be made as spacial spherical subdivisions) but
these won't look as even as the icosahedron will.

If you want I can post an example of such an object.

--
Lance.


---
For the latest 3D Studio MAX plug-ins, images and much more, go to:
The Zone - http://come.to/the.zone
For a totally different experience, visit my Chroma Key Website:
Colorblind - http://listen.to/colorblind


Post a reply to this message

From: Ken
Subject: Re: Creating Spheres of Triangles
Date: 1 Jul 1999 21:08:04
Message: <377C1081.6959EAEA@pacbell.net>
"Lars W." wrote:
> 
> Hi
> 
> I wan't to construct an Sphere out of triangles ,( i know the standard
> POV-Sphere is faster and better and
> so on, but i need a trianglesphere ), does anybody know of resources, or has
> an tutorial by him self
> for doing that. it should be possible to say, how complex the sphere should
> be, and it should
> NOT look like an globe, best would be an sphere out of evenly sized
> triangles.
> 
> thanks in advance.
> 
> Lars Wolter

  For the record the older dos utility called geodome was perfect for this
task. If you would like a copy I could email it to you.

-- 
Ken Tyler

mailto://tylereng@pacbell.net


Post a reply to this message

From: Ken
Subject: Re: Creating Spheres of Triangles
Date: 1 Jul 1999 21:18:03
Message: <377C12D8.F74033DF@pacbell.net>
Ken wrote:
> 
> "Lars W." wrote:
> >
> > Hi
> >
> > I wan't to construct an Sphere out of triangles ,( i know the standard
> > POV-Sphere is faster and better and
> > so on, but i need a trianglesphere ), does anybody know of resources, or has
> > an tutorial by him self
> > for doing that. it should be possible to say, how complex the sphere should
> > be, and it should
> > NOT look like an globe, best would be an sphere out of evenly sized
> > triangles.
> >
> > thanks in advance.
> >
> > Lars Wolter
> 
>   For the record the older dos utility called geodome was perfect for this
> task. If you would like a copy I could email it to you.
> 
> --
> Ken Tyler
> 
> mailto://tylereng@pacbell.net

  I also have the C source for that program if anyone would rather
tinker with that for inspiration.

-- 
Ken Tyler

mailto://tylereng@pacbell.net


Post a reply to this message

From: Lars W 
Subject: Re: Creating Spheres of Triangles
Date: 3 Jul 1999 15:33:30
Message: <377e658a@news.povray.org>
That would be great,  if can send me the source, it shouldn't be a Problem
to make some POV Code out of it, and if i can't get it to work, i can write
my own c-Programm creating triangle spheres.

E-Mail  mailto:lar### [at] snafude

Thanks
Ken <tyl### [at] pacbellnet> schrieb in im Newsbeitrag:
377C12D8.F74033DF@pacbell.net...
>
>
> Ken wrote:
> >
> > "Lars W." wrote:
> > >
> > > Hi
> > >
> > > I wan't to construct an Sphere out of triangles ,( i know the standard
> > > POV-Sphere is faster and better and
> > > so on, but i need a trianglesphere ), does anybody know of resources,
or has
> > > an tutorial by him self
> > > for doing that. it should be possible to say, how complex the sphere
should
> > > be, and it should
> > > NOT look like an globe, best would be an sphere out of evenly sized
> > > triangles.
> > >
> > > thanks in advance.
> > >
> > > Lars Wolter
> >
> >   For the record the older dos utility called geodome was perfect for
this
> > task. If you would like a copy I could email it to you.
> >
> > --
> > Ken Tyler
> >
> > mailto://tylereng@pacbell.net
>
>   I also have the C source for that program if anyone would rather
> tinker with that for inspiration.
>
> --
> Ken Tyler
>
> mailto://tylereng@pacbell.net


Post a reply to this message

From: Lars W 
Subject: Re: Creating Spheres of Triangles
Date: 3 Jul 1999 15:33:31
Message: <377e658b@news.povray.org>
Thanks for the tip, i see what i can get out of the Programm that Ken sends
me, and if
it doesn't work in any way i would be happy for an example from you.

greetings Lars


Lance Birch <lan### [at] usanet> schrieb in im Newsbeitrag:
377c0f03@news.povray.org...
> >: I wan't to construct an Sphere out of triangles ,( i know the standard
> >: POV-Sphere is faster and better and
> >: so on, but i need a trianglesphere ), does anybody know of resources,
or
> has
> >: an tutorial by him self
> >: for doing that. it should be possible to say, how complex the sphere
> should
> >: be, and it should
> >: NOT look like an globe, best would be an sphere out of evenly sized
> >: triangles.
> >
> >  Distributing objects evenly on the surface of a sphere is a non-trivial
> >task.
> >  If making a earth-looking globe (with latitude and longitude lines) is
> >enough, that's pretty easy with povray (you need some math, though).
>
> But the triangles won't be the same sizes right?
>
> If you really want to do it perfectly you can use a geosphere with a
> geodesic base type of a 20-sided icosahedron.  The facets are all equally
> sized equilateral triangles.  From there the sphere can be divided into
any
> number of segments based on multiples and divisions of the 20 faces.
>
> Right?
>
> Alternatively you could try a polyhedron base type like a tetrahedron or
> octahedron (all of which can be made as spacial spherical subdivisions)
but
> these won't look as even as the icosahedron will.
>
> If you want I can post an example of such an object.
>
> --
> Lance.
>
>
> ---
> For the latest 3D Studio MAX plug-ins, images and much more, go to:
> The Zone - http://come.to/the.zone
> For a totally different experience, visit my Chroma Key Website:
> Colorblind - http://listen.to/colorblind
>
>


Post a reply to this message

From: Alberto
Subject: Re: Creating Spheres of Triangles
Date: 3 Jul 1999 19:22:41
Message: <377E9BB9.D800357A@ma.usb.ve>
"Edward C." wrote:

> But there are other ways to subdivide...

Of course you are right. Your answer make me think harder. Finally I arrived
to a version of your idea that creates equilateral triangles. Again I posted
the result in the povray.bin.images.

Alberto.


Post a reply to this message

From: Uwe Zimmermann
Subject: Re: Creating Spheres of Triangles
Date: 5 Jul 1999 09:07:52
Message: <3780AE26.A6CCE30F@ele.kth.se>
"Lars W." wrote:
 
> That would be great,  if can send me the source, it shouldn't be a Problem
> to make some POV Code out of it, and if i can't get it to work, i can write
> my own c-Programm creating triangle spheres.

I just found a basic source code on the net that should do. I'll also
try to translate it to POV code - shouldn't be too complicated:

http://www.freenet.edmonton.ab.ca/domes/geometry.bas

Uwe.


Post a reply to this message

From: Uwe Zimmermann
Subject: Re: Creating Spheres of Triangles
Date: 5 Jul 1999 09:19:06
Message: <3780B0C9.A4605D1A@ele.kth.se>
Here is another link (including DOS/Win executable and C++ source):
http://www.cris.com/~rjbono/html/domes.html

Uwe.


Post a reply to this message

From: Uwe Zimmermann
Subject: Re: Creating Spheres of Triangles
Date: 7 Jul 1999 03:18:30
Message: <3782FF46.57ED1C57@ele.kth.se>
Trying to revive this thread...

I succeeded in translating the basic version to POV only to notice that
it only creates the symmetry triangle. However, I got back to the
basics, took out pencil and paper, did some geometry and finally I got
it:

A POV macro that does an intersection of the three triangular faced
polyhedrons (tetrahedron, octahedron, icosahedron) to any number of
splittings (also called frequency) resulting in a geodesic sphere.

Up to now the macro is still experimental and I have to add a little bit
of documentation and remove those nasty #debug messages. But then -
hopefully by the end of this week - I'll post it on this server.

What it does
------------

  - intersects the triangular shaped faces of polyhedrons and projects
the new 
    vertices on a unit sphere

  - gives back an array with the coordinates of these vertices

  - a second macro gives the resulting geodesic sphere as an object with
a native 
    radius of 1 POV unit, centered at the origin

  - user-defined macros determine the shapes/objects drawn at the vertex
coordinates 
    ("corners") and as the links ("edges") between each two neighbouring
vertices

  - a third macro (not yet written) is going to create a mesh structure
representing 
    the triangular faces of the geodesic sphere

You can have a look at the first testpicture which I post in
povray.binaries.images under the same thread name.


Uwe.


Post a reply to this message

From: Uwe Zimmermann
Subject: Re: Creating Spheres of Triangles
Date: 8 Jul 1999 04:49:03
Message: <378465FE.336E88C5@ele.kth.se>
Hej Lars, hej all!

"Lars W." wrote:

> I wan't to construct an Sphere out of triangles ,( i know the standard
> POV-Sphere is faster and better and so on, but i need a trianglesphere )...

Here it is: my newly written (and first published) POV macro package
"geodesic.inc".
You can see a sample scene under the thread "Creating Spheres of
Triangles II) in povray.binaries.images and you can get the package
itself under the same subject in povray.binaries.utilities.


Uwe.


Post a reply to this message

From: David Arcoleo
Subject: Re: Creating Spheres of Triangles
Date: 12 Jul 1999 12:03:32
Message: <378A11B6.782645ED@njmedicine.com>
> I wan't to construct an Sphere out of triangles ,( i know the standard
> POV-Sphere is faster and better and
> so on, but i need a trianglesphere ), does anybody know of resources, or has
> an tutorial by him self
> for doing that. it should be possible to say, how complex the sphere should
> be, and it should
> NOT look like an globe, best would be an sphere out of evenly sized
> triangles.


I created a package that will take an image in Mathematica and convert
it to povray.  I put some examples up at

http://members.wri.com/davida/povlink/povlink.html

The first three are the same surface of revolution object and the last
is a torus.  The the sphere, the torus can also be created by povray,
but I those to do it in Mathematica and convert it.

-Dave


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.