|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Is there any way I can turn this into something with thickness? I want
to create a spiral ramp for people to walk upon.
#local Fx = function(u,v) {u*cos(v)}
#local Fy = function(u,v) {u*sin(v)}
#local Fz = function(u,v) {v}
#local platform_ramp_1 = object
{
Parametric(Fx,Fy,Fz,<0,0>,<1,pi>,12,12,"")
rotate +x * 90
rotate -y * 90
scale y/pi
translate y
}
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Le 23/02/2015 08:53, Mike Horvath a écrit :
> Is there any way I can turn this into something with thickness? I want
> to create a spiral ramp for people to walk upon.
>
> #local Fx = function(u,v) {u*cos(v)}
> #local Fy = function(u,v) {u*sin(v)}
> #local Fz = function(u,v) {v}
> #local platform_ramp_1 = object
> {
> Parametric(Fx,Fy,Fz,<0,0>,<1,pi>,12,12,"")
> rotate +x * 90
> rotate -y * 90
> scale y/pi
> translate y
> }
Fx, Fy and Fz describes so far a single segment (in regard to u) that is
rotated and translated according to v.
If you want some thickness, you probably want v to keep its current
effect, but need to describe more than a segment with u. basic idea
would be to have u runs along a rectangle.
Such rectangle could be the vertical section, so Fz would be impacted,
or it could be the horizontal section (keeping Fz simple)
As an horizontal section, it does not have to be a rectangle, a kind of
triangle could do it too (with a round edge at the exterior of the ramp).
To break the functions of Fx and Fy in three parts, you can use
select(), especially the form with 4 arguments.
#local Fx = function(u,v){ select( floor(u)-1, u*cos(v),
cos(v+factor*(u-1)), (3-u)*cos(v) ) }
#local Fy = function(u,v){ select( floor(u)-1, u*sin(v),
sin(v+factor*(u-1)), (3-u)*sin(v) ) }
and of course, the range of u is now 0 to 3 insteand of 0 to 1.
Notice: untested code, you might have to test and amend it. (factor
should be replaced with hardcoded value, it is in radian the angle of
the triangle (at the axis of the ramp))
--
Just because nobody complains does not mean all parachutes are perfect.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On 2/23/2015 4:05 AM, Le_Forgeron wrote:
> Fx, Fy and Fz describes so far a single segment (in regard to u) that is
> rotated and translated according to v.
>
> If you want some thickness, you probably want v to keep its current
> effect, but need to describe more than a segment with u. basic idea
> would be to have u runs along a rectangle.
> Such rectangle could be the vertical section, so Fz would be impacted,
> or it could be the horizontal section (keeping Fz simple)
>
> As an horizontal section, it does not have to be a rectangle, a kind of
> triangle could do it too (with a round edge at the exterior of the ramp).
>
> To break the functions of Fx and Fy in three parts, you can use
> select(), especially the form with 4 arguments.
>
> #local Fx = function(u,v){ select( floor(u)-1, u*cos(v),
> cos(v+factor*(u-1)), (3-u)*cos(v) ) }
> #local Fy = function(u,v){ select( floor(u)-1, u*sin(v),
> sin(v+factor*(u-1)), (3-u)*sin(v) ) }
>
> and of course, the range of u is now 0 to 3 insteand of 0 to 1.
>
> Notice: untested code, you might have to test and amend it. (factor
> should be replaced with hardcoded value, it is in radian the angle of
> the triangle (at the axis of the ramp))
>
This is beyond me. My algebra is not very good.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|