POV-Ray : Newsgroups : povray.general : solid parametric : Re: solid parametric Server Time
10 Jun 2024 17:18:01 EDT (-0400)
  Re: solid parametric  
From: Mike Horvath
Date: 24 Feb 2015 18:59:27
Message: <54ed105f$1@news.povray.org>
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

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.