|
|
/*
Don't know if this is a known bug but the functions min_extent()
and max_extent() are not correct with cylinders and cones whose
ends are not parallel to an axis. Have not tested in 3.7.
Works correctly when rotated and translated into position.
*/
#version 3.6;
camera {
location -10*z
look_at 0
right x*image_width/image_height
}
light_source {<-100, 100, -100> color rgb 1}
#declare Cylinder1 =
cylinder { 0, 5*y, 1
rotate degrees(atan(4/3))*-z
translate <-2, -3, 0>
pigment {color x}
}
#declare Cylinder2 = cylinder { <-2, 0, 0>, <2, 3, 0>, 1 pigment {color y}}
#debug concat("Min 1 = ", str(min_extent (Cylinder1).z, 0, -1), "\n")
//Returns "Min 1 = -1.000000"
#debug concat("Min 2 = ", str(min_extent (Cylinder2).z, 0, -1))
//Returns "Min 2 = -1.400000"
object {Cylinder1}
object {Cylinder2}
Post a reply to this message
|
|