|
|
How can I fraction a sphere in slices as those of the oranges or lemons and
that, furthermore, they have different widths? For example, one a 40
percent, other a 10 percent, other a 30 percent and other a 20 percent?
Thanks!
Post a reply to this message
|
|
|
|
miro wrote in message <6i5ceh$7vt$1@oz.aussie.org>...
>How can I fraction a sphere in slices as those of the oranges or lemons and
>that, furthermore, they have different widths? For example, one a 40
>percent, other a 10 percent, other a 30 percent and other a 20 percent?
>
>Thanks!
>
Here's a quick example I just whipped up. I only did one slice, tho.
#include "colors.inc" // Standard Color definitions
#include "textures.inc" // Standard Texture definitions
camera
{
location <3.0 , 0.0 ,-3.0>
look_at <0.0 , 0.0 , 0.0>
}
light_source
{
0*x
color red 1.0 green 1.0 blue 1.0
translate <-20, 40, -20>
}
#declare Spheroid =
sphere { <0,1,0> 1 texture { Chrome_Metal } }
plane { z,2 texture { pigment { checker color White color Black } } }
union
difference
intersection
object { Spheroid }
plane { x,0 texture { Chrome_Metal } rotate <0,20,0> }
plane { x,0 inverse texture { Chrome_Metal } rotate <0,-20,0> }
}
object { Spheroid scale .9 translate <0,.1,0>}
}
intersection
object { Spheroid pigment{ Blue} scale .9 translate <0,0.1,0>}
plane { x,0 texture { Chrome_Metal pigment { Blue } } rotate
<0,20,0> }
plane { x,0 inverse texture { Chrome_Metal pigment { Blue }} rotate
<0,-20,0> }
}
rotate <45,-120,0>
}
--end--
The rotation on the planes, is what makes the slice wide. Make each rotation
HALF of what you want the final width.
Hope it helps.
Twyst================================
EFnet and NewNet #povray Channel Operator
Website: http://www.geocities.com/~twystedmynd
E-Mail: twy### [at] v-wavecom
=====================================
Post a reply to this message
|
|
|
|
On Tue, 28 Apr 1998, miro wrote:
>How can I fraction a sphere in slices as those of the oranges or lemons and
>that, furthermore, they have different widths? For example, one a 40
>percent, other a 10 percent, other a 30 percent and other a 20 percent?
intersection {
sphere{ <0,0,0>,1}
plane {<0,0,1>,0}
plane{ <0.618034,0,0.7861514>,0}
}
If the sector is more than 90 degrees, do a difference, or take the
intersection of the sphere with the union of two planes.
phma
Post a reply to this message
|
|