|
|
"HarryK" <hko### [at] t-onlinede> wrote in message
news:web.47c5c35db1099ea68e94e7980@news.povray.org...
> Hi folks
>
> I want to map a prism with n vertices, height_1=0 and height_2=0.001 onto
> the
> surface of a sphere. Then I want to create the intersection of the sphere
> and
> the mapped prism so that only the prism is visible. Can anybody help me?
>
> Thanks in advance
>
>
> HarryK
>
Hi Harry,
I'm wondering whether a prism defined using a conic_sweep would do what you
want.
You could use it to make a prism that's 0.001 units higher than the radius
of the sphere you wish to map the prism onto. Then use two spheres to slice
a 0.001 unit thick spherical layer out of the prism.
For example:
light_source {<2,7.5,-15>, rgb 1}
camera {location <0,1.4,-1> look_at <0,1,0>}
difference {
intersection {
prism {
cubic_spline conic_sweep
0, 1.001, 14,
// Outer Rim
<-0.4,-0.4>, <-0.3,-0.3>, <0.3,-0.3>,
<0.3,0.5>, <-0.3,0.5>, <-0.3,-0.3>,
<-0.4,-0.2>
// Inner Cutout
<-0.1,-0.3>, <-0.2,-0.2>, <0.2,-0.2>,
<0.2,0.4>, <-0.2,0.4>, <-0.2,-0.2>,
<-0.3,-0.1>
}
sphere {0,1.001}
}
sphere {0,1}
pigment {rgb <1,1,0>}
}
Post a reply to this message
|
|