|
|
Hmmm, I still don't succeed. I want to randomly place a number of green
cylinders onto the blob, just above and below the horizontal rectangular cut
in the blob (lower edge of the picture).
What exactly do I do wrong? Please see below a simplified scene code.
Sven
#version 3.5;
#include "colors.inc"
#declare MittelRumpf=blob
// 4er Frontgebilde
{
threshold 0.3
sphere { < 0.0, 0.0, 400.0 > 300.0, 1.5 }
cylinder { < -450.0, 0.0, 400.0 > < 450.0, 0.0, 400.0 > 300.0, 1.0 scale <
1.0, 1.0, 1.0 > }
sphere { < 0.0, 0.0, 500.0 > 200.0, 1.0 }
cylinder { < -50.0, 0.0, 500.0 > < 50.0, 0.0, 500.0 > 600.0, 1.0 scale <
0.12, 1.0, 0.5 > }
sphere { < 0.0, 0.0, 800.0 > 280.0, 1.0 scale < 1.0, 1.43, 1.0 > }
cylinder { < 0.0, -50.0, 500.0 > < 0.0, 50.00, 500.0 > 300.0, 1.0 }
scale < 1.0, 0.7, 1.0 >
}
#declare MitteFront=difference
{
object { MittelRumpf }
box { < -60.0, -400.0, -400.0 > < 60.0, 400.0, 1000.0 > } //
...........................................................................
Wegfall der vorderen Rumpfmitte
box { < -400.0, -400.0, 250.0 > < 400.0, 400.0, 550.0 > } //
...........................................................................
Wegfall der Mitte quer
box { < -200.0, -400.0, 400.0 > < 200.0, 400.0, 1000.0 > } //
..........................................................................
Wegfall der Mitte bis nach hinten
pigment { Red }
}
#declare MitteSeite=difference
{
object { MittelRumpf }
box { < -400.0, -400.0, -400.0 > < 400.0, 400.0, 650.0 > } //
..........................................................................
Wegfall der Mitte und von Vorne
box { < -150.0, -400.0, 400.0 > < 150.0, 400.0, 1000.0 > } //
..........................................................................
Wegfall der Mitte bis nach hinten
box { < 200.0, -400.0, 400.0 > < 400.0, 400.0, 1000.0 > } //
...........................................................................
Wegfall der hinteren Seite
box { < -400.0, -400.0, 400.0 > < -200.0, 400.0, 1000.0 > } //
.........................................................................
Wegfall der hinteren Seite
pigment { Red }
}
#declare MitteOben=difference
{
object { MittelRumpf }
box { < -400.0, -400.0, -400.0 > < -60.0, 400.0, 250.0 > }
box { < 60.0, -400.0, -400.0 > < 400.0, 400.0, 250.0 > }
box { < -400.0, -400.0, 550.0 > < -200.0, 400.0, 1000.0 > }
box { < 200.0, -400.0, 550.0 > < 400.0, 400.0, 1000.0 > }
box { < -400.0, -400.0, 650.0 > < -150.0, 400.0, 1000.0 > }
box { < 150.0, -400.0, 650.0 > < 400.0, 400.0, 1000.0 > }
pigment { Red }
}
#declare Basisrumpf=union
{
object { MitteFront }
object { MitteSeite }
object { MitteOben }
}
#declare SechseckSensor=cylinder
{
< 0.0, 0.0, 0.0 > < 0.0, 0.0, -5.0 > 5.0
pigment { Green }
}
#declare Mittelsegment=difference
{
union
{
object { Basisrumpf } //
#declare Runde=200;
#declare Next=seed(60);
#while(Runde<360)
#declare MyNext=rand(Next);
#declare Normal=< 0.0, 0.0, 0.0 >;
#declare MySurface=trace( Basisrumpf, < Runde, 40, 2000.0 >, < Runde,
40.0, 0.0 >, Normal );
#if(vlength(Normal)>0)
object { SechseckSensor scale < 1.0, 1.0, -1.0 > translate MySurface
scale < 1.0, 1.0, 1.0 > }
object { SechseckSensor scale < 1.0, 1.0, -1.0 > translate MySurface
scale < -1.0, 1.0, 1.0 > }
object { SechseckSensor scale < 1.0, 1.0, -1.0 > translate MySurface
scale < 1.0, -1.0, 1.0 > }
object { SechseckSensor scale < 1.0, 1.0, -1.0 > translate MySurface
scale < -1.0, -1.0, 1.0 > }
#end
#declare Runde=Runde+5+(10*MyNext);
#end
}
box { < -400.0, -400.0, 750.0 > < 400.0, 400.0, 1000.0 > pigment { Red } }
box { < -460.0, -20.0, 0.0 > < 460.0, 20.0, 800.0 > pigment { Red } }
}
camera
{
location < -400.0, 500.0, -1300.0 >
look_at < -500.0, 300.0, -500.0 >
}
light_source
{
< -1000000.0, -1000000.0, -5000.0 >
color rgb < 0.99, 0.80, 0.47 > *4
}
light_source
{
< -1000000.0, 1000000.0, 1000000.0 >
color rgb < 0.2, 0.2, 0.3 > *4
}
object { Mittelsegment rotate < 0.0, 180.0, 0.0 > }
Post a reply to this message
|
|