|
|
Wasn't it JYR who wrote:
>Hi everybody!
>I attempted to use "wrinkles" in a "normal" statement to give a rough finish
>to the outer walls of some imaginary building. It is constructed
>recursively and implies that its modules be rotated by 0, 90, 180, 270
>degrees around the y-axis to take place at each corner. Now, i noticed a
>slight difference in the appearance of the different modules. Investigating
>further, i gathered the following minimal source to demonstrate a strange
>behaviour...
I don't know why it happens, but if you're interested in a workround,
it's possible to arrange rotate the normals in the opposite direction to
the rotation of the quadrants, so that the cubes rotate but the wrinkles
don't.
#version 3.6;
global_settings {assumed_gamma 1.0}
#declare degre=3;
#declare pdd=pow(2,degre);
camera {
location <-.25*pdd, .85*pdd, -1.6*pdd>
look_at (2-pdd)*y
}
light_source {<-500, 260, -240> rgb 1}
#macro cell (n,Rot)
box {-n, n}
texture {
pigment {rgb 1}
normal {wrinkles scale .2 rotate -Rot*90*y}
}
#end //macro cell (n)
#macro pyramide (n,Rot)
#if (n=1)
object {cell (1,Rot)}
#else
union {
#local quadrant=0;
#while (quadrant<4)
object {
pyramide (n-1,Rot+quadrant)
translate -pow(2,n-1)/2
rotate quadrant*90*y
}
#local quadrant=quadrant+1;
#end //while
}
#end //if
#end //macro pyramide (n)
object {pyramide (degre,0)}
--
Mike Williams
Gentleman of Leisure
Post a reply to this message
|
|