|
|
#include "math.inc"
#macro dabox(p1,p2)
box{0, 1 texture {boxhm}
scale vlength(p2-p1)
rotate vcross(1,p2)*VRotationD(1, p2, vcross(1,p2))
translate p1
}
#end
With textures:
#include "colors.inc"
#include "metals.inc"
#include "woods.inc"
#include "math.inc"
#declare box_holz = texture {T_Wood10 scale 1 rotate y*20 };
#declare box_metal = texture {T_Silver_3D};
#declare box_metal_ab = 0.85;
#declare boxhm =
texture {
function{sqrt(y*y+(1-z)*(1-z))}
texture_map {
[ 0.0 box_holz ]
[ box_metal_ab box_holz ]
[ box_metal_ab*1.0107 box_metal ]
[ 1 box_metal ]
}
};
#macro dabox(p1,p2)
box{0, 1 texture {boxhm}
scale vlength(p2-p1)
rotate vcross(p1,p2)*VRotationD(p1, p2, vcross(p1,p2))
translate p1
}
#end
Post a reply to this message
|
|