POV-Ray : Newsgroups : povray.newusers : help with arc 2... : Re: help with arc 2... Server Time
5 Jul 2024 03:32:01 EDT (-0400)
  Re: help with arc 2...  
From: Alain
Date: 2 Aug 2010 16:42:15
Message: <4c572da7$1@news.povray.org>

>
>
> Alain<azerty [at] qwertyorg>  wrote:

>>> 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.
>>>
> [snip]
>>
>> 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
>
>
> Thanks for your help!
>
> I've got it working now to some extent based on the splinefollow example, I can
> get the cylinder to start at one point (purple top), trace through the others in
> order but not have it end at the point I would like (purple bottom). It seems to
> go through no matter what I do...! Could it be a problem with the while? the
> file is pasted below.
>
> Thanks in advance,
>
> Jack
>

Played with that a bit and found that removing the following point seems 
to solve the overshot problem:
06, < 15.646700,9.031800,10.928100>,


Alain


Post a reply to this message

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