hi chris,
if I understand it correctly, the destination-point is at the same angle
(seen from the originion of the distortion) as the original point, just
the distance (polarDest) changes.
so you have:
destX/destY = sourceX/sourceY
and
sqrt(power(destX,2) + power(destY,2) ) = polarDest
and therefor
destX = sourceX * polarDest / polarOrigin
destY = sourceY * polarDest / polarOrigin
cheers,
valentin
[EMAIL PROTECTED] wrote:
Hi,
Iâ?Tm trying to do a spherize filter in imaging Lingo, but i got
stuck on the mathâ?¦
What Iâ?Tve got so far using the formula I found here:
www.eng.iastate.edu/ee528/Projects/Project1-s2001/results/gtkavithachen.doc
polarOrigin = sqrt(power(sourceX,2) + power(sourceY,2))
Ro = centerX / (1/2 * (1 + (cos(angle / 2) / sin(angle / 2))))
R = Ro / (sqrt(sin(angle / 2)))
polarDest = centerY + sqrt(power(R,2) - power(polarOrigin - centerX ,
2))
The problem is I can't get the destination X and Y out of this...
Anyone have a clue?
Thanks,
Chris.
[To remove yourself from this list, or to change to digest mode, go
to http://www.penworks.com/lingo-l.cgi To post messages to the list,
email [email protected] (Problems, email
[EMAIL PROTECTED]). Lingo-L is for learning and helping with
programming Lingo. Thanks!]
[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/lingo-l.cgi To post messages to the list, email
[email protected] (Problems, email [EMAIL PROTECTED]). Lingo-L is for
learning and helping with programming Lingo. Thanks!]