Animate Pan Slider On Old MathMap Filter By Bruno

31 views
Skip to first unread message

Tas Mania

unread,
May 13, 2020, 1:42:27 AM5/13/20
to hugin and other free panoramic software
I'm currently maintaining the MathMap plugin for Gimp.

I would like to animate the pan slider on Vedutismo as output frames in 1 degree increments.
The filter alters the current image. Could it be made into an animation filter?
This is the code:

filter panini_FX (image in, float FoV: 1-360 (230.07), float pan: -180-180 (0.0))
# Vedutismo / Panini effect
# Bruno Postle December 2008
# input is any 360 cylindrical image
maxphi=atan(pi/2);
newphi=FoV*pi/360/2;
scale=tan(newphi)/tan(maxphi);
phi=atan(x*scale*pi/W);
yscale=cos(phi)*cos(phi);
in(xy:[phi/pi*W+(W*pan/360),y*scale*yscale])
end


I would appreciate any help on this.

Tas Mania

unread,
May 14, 2020, 8:20:01 PM5/14/20
to hugin and other free panoramic software
Thanks and I was able to solve this myself.
It just needed the 't' for time value. Now the Vedutismo filter can be animated.
Here is where the 't'  was added - second line from bottom.

filter panini_FX (image in, float FoV: 1-360 (230.07), float pan: -180-180 (0.0))
# Vedutismo / Panini effect
# Bruno Postle December 2008
# input is any 360 cylindrical image
maxphi=atan(pi/2);
newphi=FoV*pi/360/2;
scale=tan(newphi)/tan(maxphi);
phi=atan(x*scale*pi/W);
yscale=cos(phi)*cos(phi);
in(xy:[phi/pi*W+(W*pan/360*t),y*scale*yscale])
end

For anyone is interested MathMap is a language developed for graphic design.

Tas Mania

unread,
May 15, 2020, 8:43:43 PM5/15/20
to hugin and other free panoramic software
I ended-up using this line:
in(xy:[phi/pi*W+(W*pan/360*t*2),y*scale*yscale])

The filter works as animation. Here is an example.

Cheers


Reply all
Reply to author
Forward
0 new messages