|
|
Greetings.
I have the following code which should create a number of cylindrical towers
with a rounded roof (cylinder and sphere). But it seems the code is not
working. Who can help?
Thanks,
Sven
#declare BayTowers=difference
{
#declare Turn=0;
#declare Diameter=seed(1);
#declare Tall=seed(2);
#declare Wide=seed(3);
#declare Deep=seed(4);
#while(Turn<200)
cylinder
{
< 0.0, 0.0, 0.0 > < 0.0, 30*rand(Tall), 0.0 > 100.0*rand(Diameter)
translate < 0.0, -330.0, 0.0 >
texture { Licht }
texture {InnenAufbaut }
translate < -100.0+(200*rand(Wide)), 0.0, 0.0+(1600*rand(Deep)) >
}
sphere
{
< 0.0, 0.0, 0.0 > 100.0*rand(Diameter)
scale < 1.0, 0.3, 1.0 >
translate < 0.0, -330.0-(30*rand(Tall)), 0.0 >
texture { InnenOben }
translate < -100.0+(200*rand(Wide)), 0.0, 0.0+(1600*rand(Deep)) >
}
cylinder
{
< 0.0, 0.0, 0.0 > < 0.0, 30*rand(Tall), 0.0 > 100.0*rand(Diameter)
translate < 0.0, -330.0, 0.0 >
texture { Licht }
texture {InnenAufbaut }
translate < -100.0+(200*rand(Wide)), 0.0, 0.0+(1600*rand(Deep)) >
scale < 1.0, -1.0, 1.0 >
}
sphere
{
< 0.0, 0.0, 0.0 > 100.0*rand(Diameter) scale < 1.0, 0.3, 1.0 >
translate < 0.0, -330.0-(30*rand(Tall)), 0.0 >
texture { InnenOben }
translate < -100.0+(200*rand(Wide)), -0.0, 0.0+(1600*rand(Deep)) >
scale < 1.0, -1.0, 1.0 >
}
#declare Turn=Turn+1;
#end
}
difference
{
cylinder { < 0.0, 0.0, -200.0 > < 0.0, 0.0, 1800.0 > 500.0 texture {
Licht } texture { Innen } }
cylinder { < 0.0, 0.0, -200.01 > < 0.0, 0.0, 1800.01 > 330.0 texture {
Licht } texture { Innen } }
}
}
Post a reply to this message
|
|
|
|
Wasn't it Sven Littkowski who wrote:
>Greetings.
>
>I have the following code which should create a number of cylindrical towers
>with a rounded roof (cylinder and sphere). But it seems the code is not
>working. Who can help?
All the objects in a difference are removed from the first object. In
the BayTowers difference, that first object is a random cylinder. By the
time you've cut out 399 other random cylinders and 400 random spheres
from it, it's unlikely that there's be anything left of it.
The second, unnamed, difference works OK, except that there's an extra
"}" at the end.
Is it possible that you meant to difference that second object from the
*union* of the 400 cylinders and spheres?
--
Mike Williams
Gentleman of Leisure
Post a reply to this message
|
|
|
|
Hi Mike,
thanks for your time and intentions! I solved the problem meanwhile. The
thought was, to have a giant hollow tube (or pole) with many of these towers
inside, cut by the walls of the giant tube.
So all what is supposed to be left of the towers, is what is inside the
hollow tube. I had problems with the Intersection but I will try again.
You can see what it all is about in my next download, the "Preview 09:
Imperial Carrier" (inside the "Preview 03: Imperial Carrier" thread). There
you can already see in which "tubes" the towers are going to be...
Greetings and thanks again,
Sven
"Mike Williams" <nos### [at] econymdemoncouk> schrieb im Newsbeitrag
news:yHWf+IAx### [at] econymdemoncouk...
> Wasn't it Sven Littkowski who wrote:
>>Greetings.
>>
>>I have the following code which should create a number of cylindrical
>>towers
>>with a rounded roof (cylinder and sphere). But it seems the code is not
>>working. Who can help?
>
> All the objects in a difference are removed from the first object. In
> the BayTowers difference, that first object is a random cylinder. By the
> time you've cut out 399 other random cylinders and 400 random spheres
> from it, it's unlikely that there's be anything left of it.
>
> The second, unnamed, difference works OK, except that there's an extra
> "}" at the end.
>
>
> Is it possible that you meant to difference that second object from the
> *union* of the 400 cylinders and spheres?
>
> --
> Mike Williams
> Gentleman of Leisure
Post a reply to this message
|
|