POV-Ray : Newsgroups : povray.general : A filled sphere Server Time
2 Nov 2024 15:24:11 EDT (-0400)
  A filled sphere (Message 1 to 7 of 7)  
From: Amir ni
Subject: A filled sphere
Date: 10 Feb 2009 22:50:00
Message: <web.49924a668a9cfca3792c7d270@news.povray.org>
Hi guys, I want to have the difference of a filled sphere and a box, but the
results is an empty sphere (a spherical shell) while I want it acts as cross
section of a filled sphere that looks like a plane. Would you please let me
know how can I make a solid filled sphere and not a hollow spherical shell?

Here is the code:

// Camera location
camera {
 location  <10,8,-16>
 up        0.21*y
 right     0.21*x*image_width/image_height
 look_at   <0,0,0>
}

// White background
background{rgb 1}

// Light sources
light_source {<30,70,-60> color rgb <0.6,0.6,0.7>}
light_source {<-10,-5,-40> color rgb <0.5,0.5,0.4>}

// Particles and their Voronoi cells


difference {

 sphere{
  <0,0,0>, 2
  pigment{rgb<0.8,0.7,0.2>}
  finish{ambient 0.3 specular 0.2 reflection 0.4}
 }

 box{
 <0,0,-1>, <2,2,-2>
 pigment{rgb<0.8,0.0,0.0>}
 finish{ambient 0.3 specular 0.2 reflection 0.4}
 }

}


Post a reply to this message

From: Mike Williams
Subject: Re: A filled sphere
Date: 11 Feb 2009 00:12:46
Message: <hsn+9tAL5lkJFwJG@econym.demon.co.uk>
Wasn't it Amir_ni who wrote:
>Hi guys, I want to have the difference of a filled sphere and a box, but the
>results is an empty sphere (a spherical shell) while I want it acts as cross
>section of a filled sphere that looks like a plane. Would you please let me
>know how can I make a solid filled sphere and not a hollow spherical shell?

That code does generate a solid sphere with a bit cut out of it. The red 
surfaces are the interior of the sphere. It just looks a bit strange 
because of the reflections and the position of the lights.

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

From: stevenvh
Subject: Re: A filled sphere
Date: 11 Feb 2009 02:35:00
Message: <web.49927f9cb26941ecc0721a1d0@news.povray.org>
Mike is right, you do have a solid sphere. The result should be more clear if
you set reflection to 0.

BTW, I see you mention Voronoi in your code. You don't happen to have an
algorithm or source code for a Voronoi diagram on a sphere?
Regards,
Steven


Post a reply to this message

From: Amir ni
Subject: Re: A filled sphere
Date: 11 Feb 2009 09:15:00
Message: <web.4992dc41b26941ec792c7d270@news.povray.org>
Both of you are right. Sorry!


Post a reply to this message

From: stevenvh
Subject: Re: A filled sphere
Date: 11 Feb 2009 11:55:00
Message: <web.499302a6b26941ecc0721a1d0@news.povray.org>
"Amir_ni" <nomail@nomail> wrote:
> Both of you are right. Sorry!

Oh no you don't! :-)
What happened to Voronoi?


Post a reply to this message

From: Amir ni
Subject: Re: A filled sphere
Date: 18 Feb 2009 11:50:00
Message: <web.499c3b2db26941ec792c7d270@news.povray.org>
Hi Steven, sorry to be late. I was out for a while. I didn't get the point with
your question about Voronoi construction on an sphere. My Voronoi tessellation
is related to some point particles in a box and I am partitioning the space.
Have fun.


Post a reply to this message

From: stevenvh
Subject: Re: A filled sphere
Date: 27 Feb 2009 06:35:00
Message: <web.49a7cfd2b26941ecc0721a1d0@news.povray.org>
"Amir_ni" <nomail@nomail> wrote:
> Hi Steven, sorry to be late. I was out for a while. I didn't get the point with
> your question about Voronoi construction on an sphere. My Voronoi tessellation
> is related to some point particles in a box and I am partitioning the space.
> Have fun.

Voronoi on a sphere is a special case of a 3D Voronoi tessellation. It's just
that the site points are all on the surface of a sphere. If you happen to have
code and/or an algorithm for producing 3D Voronoi diagrams which you would like
to share, I'd be happy to study them. Thanks

Steven


Post a reply to this message

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