Class AlgorithmEllipseToCircle

  • All Implemented Interfaces:
    java.awt.event.ActionListener, java.awt.event.WindowListener, java.lang.Runnable, java.util.EventListener

    public class AlgorithmEllipseToCircle
    extends AlgorithmBase
    This program performs the conformal mapping of an ellipse to a circle. Consider the original ellipse as having a tilt theta with the x axis. Then the conformal mapping is done in 3 steps. 1.) Translate the circle from the center of the square image to the origin, rotate around the circle by -theta and convert to a unit disc by dividing the distance from the center by the radius. 2.) Map from the unit circle to a standard ellipse on the x axis with foci at +- 1 and with the same major axis/minor axis ratio as the original ellipse. 3.) Map from the standard ellipse to the original ellipse by rotating, scaling, and translating.

    References: 1.) Advanced Calculus For Applications Second Edition by F. B. Hildebrand, Section 10.4 Analytic Functions of a Complex Variable pages 550-554 and Section 11.4 Conformal Mapping pages 628-632, Prentice-Hall, Inc., 1976. 2.) "On Conformal Representations of the Interior of an Ellipse" by Stanislawa Kanas and Toshiyuki Sugawa, Annales Academiae Scientiarum Fennicae Mathematica, Volume 31, 2006, pp. 329-348. 3.) http://mathworld.com/InverseSine.html

    • Constructor Detail

      • AlgorithmEllipseToCircle

        public AlgorithmEllipseToCircle()
        AlgorithmEllipseToCircle - default constructor.
      • AlgorithmEllipseToCircle

        public AlgorithmEllipseToCircle​(ModelImage destImg,
                                        ModelImage srcImg)
        AlgorithmEllipseToCircle.
        Parameters:
        destImg - DOCUMENT ME!
        srcImg - DOCUMENT ME!
    • Method Detail

      • zmlt

        private void zmlt​(double ar,
                          double ai,
                          double br,
                          double bi,
                          double[] cr,
                          double[] ci)
        complex multiply c = a * b.
        Parameters:
        ar - double
        ai - double
        br - double
        bi - double
        cr - double[]
        ci - double[]
      • sqrtc

        private void sqrtc​(double zinr,
                           double zini,
                           double[] zsqr,
                           double[] zsqi)
      • zabs

        private double zabs​(double zr,
                            double zi)
        zabs computes the absolute value or magnitude of a double precision complex variable zr + j*zi.
        Parameters:
        zr - double
        zi - double
        Returns:
        double
      • zlog

        private void zlog​(double ar,
                          double ai,
                          double[] br,
                          double[] bi,
                          int[] ierr)
        complex logarithm b = clog(a).
        Parameters:
        ar - double
        ai - double
        br - double[]
        bi - double[]
        ierr - int[] ierr = 0, normal return ierr = 1, z = cmplx(0.0, 0.0)
      • zsin

        private void zsin​(double inr,
                          double ini,
                          double[] outr,
                          double[] outi)
      • cosh

        private double cosh​(double x)
      • sinh

        private double sinh​(double x)
      • selfTest

        private void selfTest()