Title: Problems with generating frames for fractal zoom movies Post by: Softology on September 21, 2016, 12:37:11 AM Hoping someone can shed some light on this. I have had this problem for years now and have only just revisited it hoping to fix it once and for all.
The problem is that when I generate a movie zooming into a fractal the movie gets faster as it zooms in. Here is a recent example showing the problem https://youtu.be/sZeJeTTsjwE You should notice that every part of the movie gets faster towards the end as the zoom gets deeper. I want the zoom speed to be smooth from start to finish without speeding up or slowing down. I am currently using a bezier spline to generate points from a set of control points in the form... Code: Point 1 and this is the main bezier routine that "tweens" the points between the control points above. Code: function DoBezier(p:array of SplinePoint;n:integer;mu:double):SplinePoint; Any ideas why the zooms get faster? It is almost like I need to scale the zoom steps/magnification as it goes in (this is the mu parameter above usually between 0 and 1), but how? Any snippets of code for handling zooming that does not show this issue? Thanks for any help. Title: Re: Problems with generating frames for fractal zoom movies Post by: claude on September 21, 2016, 03:36:52 PM You're working in linear space, while perceptual scaling for zooms is logarithmic/exponential (depending which way you look at it). No easy fix if you're using Xmin/Xmax representation, but if you switch to Xcenter/Xsize representation, you can do something like Xsize:=exp(interpolate(log(Xsize1), log(Xsize2), ..., t)).
For a different approach: https://mathr.co.uk/blog/2011-12-26_poincare_half-plane_metric_for_zoom_animation.html Title: Re: Problems with generating frames for fractal zoom movies Post by: Softology on September 21, 2016, 11:03:33 PM That got me going in the right direction. I tried logarithmic scaling but that didn't work in my case (as you suspected). Then I tried various ease in and ease out functions. Finally what seems to work is a variation on the Cubic Out here http://joshondesign.com/2013/03/01/improvedEasingEquations Rather than using Code: 1-Math.pow(1-t,3) Code: 1-Math.pow(1-t,1.8) All the code change needed was to first put the above mu variable (evenly spaced from 0 to 1) through the equation Code: 1-Math.pow(1-t,1.8) I do need to change to the more logical Xcenter/Ycenter/Zoom positioning one of these days. Thanks for the pointer. |