POV-Ray : Newsgroups : povray.newusers : Smooth circular rotation using spline : Re: Smooth circular rotation using spline Server Time
3 Feb 2023 15:12:27 EST (-0500)
  Re: Smooth circular rotation using spline  
From: clipka
Date: 24 Oct 2016 21:25:13
Message: <580eb479$1@news.povray.org>
Am 25.10.2016 um 02:56 schrieb SecondCup:

> I'm trying to make my camera rotate around an object in a perfectly smooth
> circular manner. The reason I'm having
> trouble is that I want the camera to be slow in some parts sections of the
> rotation while fast in other parts. I'm no math whizz so I an using the spline
> identifiers rather than some complicated trigonometry code. Cubic_spline seems
> to work closest (smoothest) to what I want it to do.
> Ive used a total of 12 points per rotation so far and the camera still
> appears to 'wobble' in
> and out toward the centre object.

That's absolutely inevitable if you're using splines, as they cannot
exactly represent circular arcs (those types supported by POV-Ray at any
rate; you'd need the things called Rational B-Splines).

My recommendation would be not to use a 3D spline at all, but use a
1-dimensional spline to map time to angle, and use straightforward
trigonometry (or `vrotate`, or even just a `rotate` transformation) to
compute a position from the angle.

Post a reply to this message

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