|
![](/i/fill.gif) |
I would like to represent a length of metal 1 inch wide by 3/16 inch thick
that has a 90 degree twist over a 1 inch length.
Following the examples in the documentation (6.5.4.3.7 for twist) I have the
basic shape, but would prefer a less dramatic change from straight to twist.
Can the twist function be changed to start with no rotation, quickly
increase to the desired turns/unit and then back to no rotation?
Stephen
background { color <1.000,1.000,1.000> }
camera {
location < -58.033, -87.696, 83.175>
sky < 0.00000, 0.00000, 1.00000>
up < 0.0, 0.0, 1.0>
right < 1.33343, 0.0, 0.0>
angle 2.56896
look_at < -3.480, -4.962, 4.713>
}
light_source {
<0.0, 0.0, 0.0>
color rgb <1.000, 1.000, 1.000>
translate <-65.474138, -85.344511, 105.18157>
}
#local fn_A=function{abs(x)-.5};
#local fn_B=function{abs(z)-3/16/2};
#local fn_C=function{abs(y)-.5};
#local N=.25;
#local fn_twistY=function{z*sin(x*2*pi*N) + y*cos(x*2*pi*N)};
#local fn_twistZ=function{z*cos(x*2*pi*N) - y*sin(x*2*pi*N)};
#local fn_twist_Box=function{
max(
fn_A(x-.5,y,z),
fn_B(x,fn_twistY(x,y,z),fn_twistZ(x,y,z)),
fn_C(x,fn_twistY(x,y,z),fn_twistZ(x,y,z))
)
};
#local fn_Box=function{max(fn_A(x,y,z),fn_B(x,y,z),fn_C(x,y,z))};
isosurface {
function {
min(fn_Box(x-2,z,y),fn_twist_Box(x-.5,y,z),fn_Box(x,y,z))
}
contained_by {box{
<
-.5,
-.5,
-.5>,
<
2.5,
.5,
.5>}}
threshold 0
accuracy 0.001
max_gradient 1.294
max_trace 5
pigment { rgb<.8,.8,.8> }
}
Post a reply to this message
Attachments:
Download 'twist.jpg' (3 KB)
Preview of image 'twist.jpg'
![twist.jpg](/povray.binaries.images/attachment/%3C422a8719%40news.povray.org%3E/twist.jpg?preview=1)
|
![](/i/fill.gif) |