POV-Ray : Newsgroups : povray.newusers : Help with arc : Re: Help with arc Server Time
5 Jul 2024 02:29:56 EDT (-0400)
  Re: Help with arc  
From: waggy
Date: 23 Jul 2010 15:45:00
Message: <web.4c49f12baac6f43cf99d05c80@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.


Post a reply to this message

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