|
![](/i/fill.gif) |
Is this what you were after?
Done like this...
#declare XM = (15/20)*cos(degrees(60));
#declare ZM = (15/20)*sin(degrees(60));
#declare F1 =
function
{
ceil((-((x-(15/20))^2 + y^2 + z^2) + (1^2)))
}
#declare F2 =
function
{
((ceil((-((x+(XM))^2 + y^2 + (z-(ZM))^2) + (1^2)))))
}
#declare F3 =
function
{
((ceil((-((x+(XM))^2 + y^2 + (z+(ZM))^2) + (1^2)))))
}
#declare RGBPig =
pigment
{
function
{
(if((F1),1,0) +
if(F2,2,0) +
if(F3,4,0))/7
}
scale 20
colour_map
{
[0/7 rgb <0,0,0>]
[1/7 rgb <1,0,0>]
[2/7 rgb <0,1,0>]
[3/7 rgb <1,1,0>]
[4/7 rgb <0,0,1>]
[5/7 rgb <1,0,1>]
[6/7 rgb <0,1,1>]
[7/7 rgb <1,1,1>]
}
}
difference
{
union
{
sphere
{
<15,0,0>
19.99
}
sphere
{
<-20*XM,0,20*ZM>
19.99
}
sphere
{
<-20*XM,0,-20*ZM>
19.99
}
}
box
{
<-50,0,-50>
<50,50,50>
}
texture { pigment {RGBPig} finish { diffuse 1}}
}
Post a reply to this message
Attachments:
Download 'colouradd.png' (6 KB)
Preview of image 'colouradd.png'
![colouradd.png](/povray.binaries.images/attachment/%3C3AB05C07.35607BDE%40yahoo.com.au%3E/colouradd.png?preview=1)
|
![](/i/fill.gif) |