POV-Ray : Newsgroups : povray.animations : camera-spline behaves weird : Re: camera-spline behaves weird Server Time
26 Jun 2024 14:20:59 EDT (-0400)
  Re: camera-spline behaves weird  
From: Marc Roth
Date: 13 Feb 2004 21:43:21
Message: <402d8b49@news.povray.org>
ABX wrote:
> On Fri, 13 Feb 2004 19:00:30 +0100, "Marc Roth" <mar### [at] rothconsultcom> wrote:
> 
>>so basically i need to know how to create a spline that produces
>>a path similar to a quarter of a circle.
> 
> 
> Use something like this not tested macro. It approximates circle with linear
> spline. Use Accuracy between 0 and 1
> 
> #macro QuarterOfCircleSpline(Center,Radius,Accuracy,Angle)
>   #local S=spline{
>     #local Counter=0;
>     #while (Counter<Angle)
>       Counter (vrotate(x*Radius,y*Counter)+Center)
>       #local Counter=Counter+Angle*Accuracy;
>     #end
>     Angle (vrotate(x*Radius,y*Angle)+Center)
>   };
>   spline{S}
> #end
> 
> Adjust further to your needs.
> 
> ABX

Hi ABX,
thanks a lot for your answer, but i'm afraid i don't quite understand it 
as i'm not very familiar with macros. i understand that 
QuarterOfCircleSpline is a macro that creates a spline named S which 
looks like a quarter circle with a radius of Radius and the center 
Center. the accuracy is understandable as well, the smaller it is, the 
smaller are the steps in which the circle is drawn. but what is angle 
for? do i use S(clock) for the cam-movement? it doesn't seem to work 
quite right as i get an error: "Parse Error: Expected 'object or 
directive', spline found instead" in the line with spline(S).
ciao,
	Marc


Post a reply to this message

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