|
|
Gilles Tran wrote:
>
> > f_rbox(x,y,z) - f_def(x,y,z) = threshold
>
> Just wondering: is it possible to "warp" a rounded box (bending, shearing,
> twisting...) or another shape? Simple surface displacement can be done using
> the formula above, but I've not been able to create more drastic
> deformations.
'bending' is somewhat unprecise mathematically. Shrearing is even a
linear transformation (can be done with a matrix transform, of course
possible with functions as well). Twisting is probably meant as 'rotating
with varying rotation angle' - rotation is
#declare fn_rotated=
function {
fn_original(
x*cos(Angle)+y*sin(Angle),
-x*sin(Angle)+y*cos(Angle), z
)
}
therefore twisting would be something like:
#declare fn_twisted=
function {
fn_original(
x*cos(AngleFactor*z)+y*sin(AngleFactor*z),
-x*sin(AngleFactor*z)+y*cos(AngleFactor*z), z
)
}
Christoph
--
POV-Ray tutorials, include files, Sim-POV,
HCR-Edit and more: http://www.tu-bs.de/~y0013390/
Last updated 28 Feb. 2003 _____./\/^>_*_<^\/\.______
Post a reply to this message
|
|