POV-Ray : Newsgroups : povray.newusers : Help with arc : Re: Help with arc Server Time
5 Jul 2024 02:28:26 EDT (-0400)
  Re: Help with arc  
From: Alain
Date: 23 Jul 2010 15:08:23
Message: <4c49e8a7$1@news.povray.org>

> 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:
>
> sphere {
> <0,0,0>, 0.400000
> translate<19.857401,2.216100,1.258800>
> pigment { rgbt<0.000000,0.000000,1.000000,0.000000>  }
> }
> sphere {
> <0,0,0>, 0.400000
> translate<21.089600,9.403000,4.822600>
> pigment { rgbt<0.000000,0.000000,1.000000,0.000000>  }
> }
> sphere {
> <0,0,0>, 0.400000
> translate<19.241899,0.224900,9.172700>
> pigment { rgbt<0.000000,0.000000,1.000000,0.000000>  }}
> }
> sphere {
> <0,0,0>, 0.400000
> translate<11.432800,2.216100,11.043700>
> pigment { rgbt<0.000000,0.000000,1.000000,0.000000>  }
> }
> sphere {
> <0,0,0>, 0.400000
> translate<10.200600,9.403000,7.479900>
> pigment { rgbt<0.000000,0.000000,1.000000,0.000000>  }
> }
>
>
> Help please!
>
>
> Thanks in Advance,
>
> Jack
>
>

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.

You can also use the spline feature and use it to place many spheres and 
short cylinders to create your curve.
The quadratic_spline neede 2 control points. The natural_spline may be 
beter suited to your need. Please read the documentation carefuly and 
take a look at some sample scenes that use that feature. The 
splinefollow.pov scene from the animations folder is a good sample to start.

Once the spline is defined, you travel through it using a #while() loop.


Alain


Post a reply to this message

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