POV-Ray : Newsgroups : povray.newusers : Help with arc : Re: Help with arc Server Time
5 Jul 2024 03:18:44 EDT (-0400)
  Re: Help with arc  
From: Alain
Date: 24 Jul 2010 16:59:29
Message: <4c4b5431$1@news.povray.org>

> Alain wrote:

>>> Hi All,
>>>
>>> I'm new to POV-Ray and I'm trying to create a "bent cylinder" or a thick arc
>>> that passes through 5 points. I think that a quadratic spline might do it, but
>>> I'm not sure exactly how to go about it... The five points I would like it to go
>>> through are the following and I would like are:
> [snip]
>>
>> You can use the sphere_sweep primitive. Try the b_spline and
>> cubic_spline. Be warned that those splines uses the first and last
>> points as control points and that the actual ubject don't reatch those.
>>
> [snip]
>
> I just wrote something similar and found a sphere_sweep with a cubic_spline
> works well by making the first point equal to the second, and the next-to-last
> equal to the last.  In my case I was only connecting (for example) two corner
> points c1 and c2 through a side point s5 in two dimensions.  The radius of the
> "bent cylinder" is r.
>
> sphere_sweep{ cubic_spline 5
> <c1.x, c1.y, 0>, r
> <c1.x, c1.y, 0>, r
> <s5.x, s5.y, 0>, r
> <c2.x, c2.y, 0>, r
> <c2.x, c2.y, 0>, r
> }
>
> However, I have not figured out why this sometimes makes some odd loopy
> artifacts.
>
>
>

Up until the 2 last 3.7 betas, the sphere_sweep had some bugs causing 
all sort of artefacts.
Also, if you have a control point coincident with an end point, it can 
missbehave. It can work some times, and have some strange effects at others.



Alain


Post a reply to this message

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