|
|
The right honourable Georg Olesen spake:
> Hi,
> I have a very simple question, and yet I can't figure it out my self:-(
> How do I, say color a sphere with the one half red and the other half
> green? Or how do I make a box, where all the sides are blue except for one
> which i red with a white cross on it?
>
> In advance thanx
>
> Kind Regards
> Georg
CSG should do nicely. Check in the Pov documentation - to make a sphere with
two colors, for example, take a sphere, "difference" this with a cube (see
the docs), then intersect the whole sphere with another cube with the color
you want set in the CSG.
Something like (coordinates are ephemeral)
difference{
sphere
{
<0,0,0>,1
}
box
{
<-1,-1,-1>,<1,1,1>
}
material{texture{pigment{color Green}}}
}//difference
intersect{
sphere
{
<0,0,0>,1
}
box
{
<-1,-1,-1>,<1,1,1>
}
material{texture{pigment{color Red}}}
}//intersect
Take a look at the CSG section in the Pov docs - it should be obvious
immediately how to do this.
--
---
Stefan Viljoen
Software Support Technician
Polar Design Solutions
Post a reply to this message
|
|