|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Georg Olesen nous apporta ses lumieres en ce 2005-02-23 10:19:
> 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
>
>
For the sphere, you can use a gradient pattern with a colour_map like:
colour_map{[0.5 red][0.5 blue]} scaled a little larger than the sphere and translated
so the change
matches the center of the sphere.
For the box you mention, using an intersection of 6 planes, 5 with a blue pigment and
1 with an
image_map of the swiss flag.
Alain
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
In article <web.421c9f15c512c6a9a278c9190@news.povray.org>,
"Georg Olesen" <vib### [at] hotmailcom> wrote:
> 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 addition to the other suggestions, you could use an object pattern
with a simple plane for the first one...it'd actually be simpler than
using a gradient pattern.
The box would be difficult to do with an object pattern, though, the
suggestion of using an intersection of planes is probably best. However,
you should note that POV will not automatically bound such an
intersection. If you have a lot of them in the scene, you should
manually bound them.
--
Christopher James Huff <cja### [at] gmailcom>
POV-Ray TAG: <chr### [at] tagpovrayorg>
http://tag.povray.org/
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|