POV-Ray : Newsgroups : povray.animations : camera-spline behaves weird : Re: camera-spline behaves weird Server Time
27 Sep 2024 18:12:19 EDT (-0400)
  Re: camera-spline behaves weird  
From: ABX
Date: 13 Feb 2004 13:05:13
Message: <g14q20t197ugso0e550s3p246gvn721stg@4ax.com>
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


Post a reply to this message

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