jlp-GeneralDiskAutomorfism { ; By Javier López Peña, August 2002 ; transform: complex c = @center if (@centermove) c = #center endif z = (#pixel - c)*exp(1i*pi/180*@rot)/@radius #pixel = @radius*exp(-1i*pi/180*@rot)*(z+conj(@fpoint))/(1+z*@fpoint) + c default: title = "General Disk Automorfism" param center caption = "Center" default = (0,0) endparam param radius caption = "Radius" default = 1.0 endparam param fpoint caption = "Fixed Point" default = (0.5,0) endparam param rot caption = "Rotation" default = 0.0 endparam param centermove caption = "Use Screen Center" default = FALSE endparam } jlp-GeneralAstroid-Rose { ; by Javier López Peña, August 2002 ; ; Transforms a circled shpae into an (Order)-peeks ; thing similar to an astroid. ; Decimal values of Order can be used to get ; Tear-like effects (try as an example Order=0.75) ; Inverting the transform takes a circle into a ; Rose-Like shape (in this case, the miting box becomes ; an Hyper-Strength box). Again, decimal values of Order ; are interesting, too transform: complex c = @center IF (@centermove) c = #center ENDIF complex z2 = (#pixel - c)*exp(1i*pi/180*@rot) ; convert z2 into angle and distance float oldmod = cabs(z2) float oldarg = atan2(z2) float factor = @strength*cos(@order/2*oldarg) IF (@force) factor = factor*oldmod ENDIF IF (@inverted) factor = 1/factor ENDIF ; calculate the new relative coords. z2 = factor*z2 #pixel = (z2 + c)*exp(-1i*pi/180*@rot) default: title = "General Astroid-Rose" param center caption = "Center" default = (0,0) endparam param rot caption = "Rotation" default = 0.0 endparam param order caption = "Order" default = 3.0 endparam param strength caption = "Multiplying factor" default = 1.0 endparam param centermove caption = "Use Screen Center" default = FALSE endparam param force caption = "Mited" default = TRUE endparam param inverted caption = "Inverted" default = FALSE endparam } jlp-CayleysTransform { ; by Javier López Peña, August 2002 ; The Cayley's Transformation takes a circle into a half-plane ; transform: complex c = @center IF (@centermove) c = #center ENDIF complex z2 = (#pixel - c)*exp(1i*pi/180*@rot)/@rad ; calculate the new relative coords. if @inverted z2 = (z2^2-1i)/(z2^2+1i) else z2 = ((z2-1)/(z2+1))^2 endif #pixel = (z2 + c)*exp(-1i*pi/180*@rot)*@rad default: title = "Cayley's Transformation" param center caption = "Center" default = (0,0) endparam param rot caption = "Rotation" default = 0.0 endparam param rad caption = "Radius" default = 1.0 endparam param centermove caption = "Use Screen Center" default = FALSE endparam param inverted caption = "Inverse Transform" default = FALSE endparam } jlp-MöbiusTransform { ; by Javier López Peña, August 2002 ; The Möbius' Transformation is the general extended ; plane automorphism, it takes z into ; (a1*z+b1)/(a2*z+b2). It's required that a1*b2 != a2*b1. transform: complex c = @center IF (@centermove) c = #center ENDIF complex z2 = (#pixel - c)*exp(1i*pi/180*@rot)/@rad ; calculate the new relative coords. z2 = (@a1*z2+@b1)/(@a2*z2+@b2) #pixel = (z2 + c)*exp(-1i*pi/180*@rot)*@rad default: title = "Möbius' Transformation" param a1 caption = "a1" default = (1,1) endparam param b1 caption = "b1" default = (1,2) endparam param a2 caption = "a2" default = (-3,-2) endparam param b2 caption = "b2" default = (-1,0) endparam param center caption = "Center" default = (0,0) endparam param rot caption = "Rotation" default = 0.0 endparam param rad caption = "Radius" default = 1.0 endparam param centermove caption = "Use Screen Center" default = FALSE endparam } jlp-SimplePorwering { ; by Javier López Peña, August 2002 ; transform: complex c = @center IF (@centermove) c = #center ENDIF complex z2 = (#pixel - c)*exp(1i*pi/180*@rot)/@rad ; calculate the new relative coords. z2 = z2^@order #pixel = (z2 + c)*exp(-1i*pi/180*@rot)*@rad default: title = "SimplePowering" param order caption = "Exponent" default = 2.0 endparam param center caption = "Center" default = (0,0) endparam param rot caption = "Rotation" default = 0.0 endparam param rad caption = "Radius" default = 1.0 endparam param centermove caption = "Use Screen Center" default = FALSE endparam }