POV-Ray : Newsgroups : povray.advanced-users : How to duplicate objects along a path/curve or spline... (!?) : Re: How to duplicate objects along a path/curve or spline... (!?) Server Time
29 Jul 2024 12:18:21 EDT (-0400)
  Re: How to duplicate objects along a path/curve or spline... (!?)  
From: David Wallace
Date: 24 Apr 2002 15:23:50
Message: <3cc70646@news.povray.org>
Actually what I want to do make a realistic "tube" follow a spline.

#macro PointSpline(spl,dst,ps)
 #local st = spl(dst);
 #local dr = vnormalize(spl(dst+1e-4)-spl(dst-1e-4));
 //#debug concat("Calculating <",vstr(3,dr,",",0,4),">.\n")
 #local theta = degrees(atan2(dr.x,dr.z));
 #local phi = degrees(asin(dr.y));
  #local Pt0 = st+vrotate(ps,<phi,theta,0>);
  Pt0
#end

// point function
#macro pnt(i, j, p, q, spl)
 #local mrad = rad1*j+rad0*(vMax-j);
 #local irad = 0.85 + 0.10*sin(i*5) + (p-.5)*.05;
 #local pt0 = <cos(i),sin(i),0>*mrad*irad;

 PointSpline(spl,j,pt0)
#end

I tried many different tactics and cannot yet get a tube without a serious
"twizzle stick" issue.

"Rune" <run### [at] mobilixnetdk> wrote in message
news:3cc4597e$1@news.povray.org...
> _Light_Beam_ wrote:
> > Can somobody know how to duplicate a number of 'n'
> > objects along a path (spline) ? And also made a mesh
> > object that follow it... (like a road) !?
>
> I presume you are using POV-Ray 3.5.
>
> You might find inspiration in this scene file included with POV-Ray 3.5:
> scenes\animations\splinefollow\splinefollow.pov
>
> It doesn't show how to make a mesh object follow a spline, but you might
> get enough clues to figure something out... :)
>
> Rune
> --
> 3D images and anims, include files, tutorials and more:
> Rune's World:  http://rsj.mobilixnet.dk (updated Apr 14)
> POV-Ray Users: http://rsj.mobilixnet.dk/povrayusers/
> POV-Ray Ring:  http://webring.povray.co.uk
>
>


Post a reply to this message

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