|
|
Help yourself,
Le 05/09/2016 à 21:04, StephenS a écrit :
> abs(x-Radius/2)-Radius/2+Block_gap // wrong except for 90 degrees
> )
What is abs(x-Radius/2)-Radius/2+Block_gap, but the projection of the coordinate on
the normal of the plane, for a very particular case,
Actually, abs is slicing twice, so
abs(x-Radius/2)-Radius/2+Block_gap can be replaced by -x+Block_gap for the same effect
of cutting along a plane.
now, replace the -x by the computation of the distance along the normal at 120° and
you are nearly done.
isosurface{
function {
max(
sqrt(pow(x,2)+pow(z,2))-Radius+Block_gap,
abs(y-Height/2)-Height/2+Block_gap, // cylinder height
abs(z-Radius/2)-Radius/2+Block_gap, // my reference edge
-x*sin(radians(120))+z*cos(radians(120))+Block_gap
)
}
contained_by { box { <-Radius,0,-Radius>, <Radius,Height,Radius> } }
texture { pigment { color rgb 1 } }
}
Have a good night.
Post a reply to this message
|
|