POV-Ray : Newsgroups : povray.general : Tessellating a union of spheres Server Time
31 Jul 2024 16:32:03 EDT (-0400)
  Tessellating a union of spheres (Message 1 to 5 of 5)  
From: Jellby
Subject: Tessellating a union of spheres
Date: 14 Oct 2006 03:53:11
Message: <k1d204-roa.ln1@badulaque.unex.es>
Hi all,

I have a problem which is not really related to POV-Ray but I guess someone
here can help me.

I have to tesselate a union of spheres. I can create a polyhedron (pentakis
icosahedron, for instance) and then recursively subdivide each triangular
face, and that for each sphere. This is good enough for my needs. My
problem now is how to deal with with the intersections between the spheres.

I can just remove the points (vertices) that are inside some other sphere,
and that is also good enough. But I don't know how to deal with the seams,
since I would also like to have triangular faces there (of which I'd like
to calculate the area and normal as well). It's not important that the
triangles in the seam actually follow the spherical surface, they can just
"bridge" the "valley" between the spheres, so I don't need additional
vertices, all I need is to create the triangles joining the different
spheres.

Does anyone have a pointer to some algorithm or description on how to do
this? Or maybe some other suggestion?

Thanks in advance.

-- 
light_source{9+9*x,1}camera{orthographic look_at(1-y)/4angle 30location
9/4-z*4}light_source{-9*z,1}union{box{.9-z.1+x clipped_by{plane{2+y-4*x
0}}}box{z-y-.1.1+z}box{-.1.1+x}box{.1z-.1}pigment{rgb<.8.2,1>}}//Jellby


Post a reply to this message

From: Alain
Subject: Re: Tessellating a union of spheres
Date: 14 Oct 2006 10:48:33
Message: <4530f8c1$1@news.povray.org>
Jellby nous apporta ses lumieres en ce 12/10/2006 14:10:
> Hi all,

> I have a problem which is not really related to POV-Ray but I guess someone
> here can help me.

> I have to tesselate a union of spheres. I can create a polyhedron (pentakis
> icosahedron, for instance) and then recursively subdivide each triangular
> face, and that for each sphere. This is good enough for my needs. My
> problem now is how to deal with with the intersections between the spheres.

> I can just remove the points (vertices) that are inside some other sphere,
> and that is also good enough. But I don't know how to deal with the seams,
> since I would also like to have triangular faces there (of which I'd like
> to calculate the area and normal as well). It's not important that the
> triangles in the seam actually follow the spherical surface, they can just
> "bridge" the "valley" between the spheres, so I don't need additional
> vertices, all I need is to create the triangles joining the different
> spheres.

> Does anyone have a pointer to some algorithm or description on how to do
> this? Or maybe some other suggestion?

> Thanks in advance.

Are your objects opaque? If so, you don't have to remove anything, the 
intersecting parts will get hiden inside the other object.

If they are transparent, you can use a merge of the different shapes. That way, 
if your meshes have a clearly deffined inside(inside vector), it's possible to 
remove the parts that are inside the other object.

-- 
Alain
-------------------------------------------------
At the feast of ego everyone leaves hungry.
	Bentley's House of Coffee and Tea, Tucson, AZ


Post a reply to this message

From: Jellby
Subject: Re: Tessellating a union of spheres
Date: 14 Oct 2006 13:39:50
Message: <lij704-blt.ln1@badulaque.unex.es>
Among other things, Alain saw fit to write:

> Are your objects opaque? If so, you don't have to remove anything, the
> intersecting parts will get hiden inside the other object.
> 
> If they are transparent, you can use a merge of the different shapes. That
> way, if your meshes have a clearly deffined inside(inside vector), it's
> possible to remove the parts that are inside the other object.

Thanks for the reply. But as I said, this is not directly related to
POV-Ray, it's not a problem of rendering the object, but of getting a
definition for the surface, and I cannot have intersecting triangles, all
of them have to be in the surface.

I'm considering another method: projecting a tesselated sphere and then
subdividing the mesh when needed... This would the "advantage" of only
giving the outer surface (which is what I ultimately need, I believe).

-- 
light_source{9+9*x,1}camera{orthographic look_at(1-y)/4angle 30location
9/4-z*4}light_source{-9*z,1}union{box{.9-z.1+x clipped_by{plane{2+y-4*x
0}}}box{z-y-.1.1+z}box{-.1.1+x}box{.1z-.1}pigment{rgb<.8.2,1>}}//Jellby


Post a reply to this message

From: "Jérôme M. Berger"
Subject: Re: Tessellating a union of spheres
Date: 14 Oct 2006 16:08:18
Message: <453143b2$1@news.povray.org>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jellby wrote:
> Among other things, Alain saw fit to write:
> 
>> Are your objects opaque? If so, you don't have to remove anything, the
>> intersecting parts will get hiden inside the other object.
>>
>> If they are transparent, you can use a merge of the different shapes. That
>> way, if your meshes have a clearly deffined inside(inside vector), it's
>> possible to remove the parts that are inside the other object.
> 
> Thanks for the reply. But as I said, this is not directly related to
> POV-Ray, it's not a problem of rendering the object, but of getting a
> definition for the surface, and I cannot have intersecting triangles, all
> of them have to be in the surface.
> 
	Maybe the GNU triangulated surface library can help, have you looked?

http://gts.sourceforge.net/

		Jerome
- --
+------------------------- Jerome M. BERGER ---------------------+
|    mailto:jeb### [at] freefr      | ICQ:    238062172            |
|    http://jeberger.free.fr/     | Jabber: jeb### [at] jabberfr   |
+---------------------------------+------------------------------+
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)

iD8DBQFFMUOxd0kWM4JG3k8RAkgxAJ0bjGoEXvo/tqdwn+26Rmmysiko8ACeJnFi
XjZ0w7ymXdybMAB2rI+zXzg=
=8MpO
-----END PGP SIGNATURE-----


Post a reply to this message

From: Jellby
Subject: Re: Tessellating a union of spheres
Date: 15 Oct 2006 08:47:14
Message: <9qh904-k8e.ln1@badulaque.unex.es>


> Maybe the GNU triangulated surface library can help, have you looked?
> 
> http://gts.sourceforge.net/

Good, I didn't know that... may be worth a deeper study. Thanks!

-- 
light_source{9+9*x,1}camera{orthographic look_at(1-y)/4angle 30location
9/4-z*4}light_source{-9*z,1}union{box{.9-z.1+x clipped_by{plane{2+y-4*x
0}}}box{z-y-.1.1+z}box{-.1.1+x}box{.1z-.1}pigment{rgb<.8.2,1>}}//Jellby


Post a reply to this message

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