UpperHalfPlane() 공개 메소드

This will transform the unit disk to the upper half plane.
public UpperHalfPlane ( ) : void
리턴 void
예제 #1
0
 private static Vector3D DiskToUpper( Vector3D input )
 {
     Mobius m = new Mobius();
     m.UpperHalfPlane();
     return m.Apply( input );
 }
예제 #2
0
        public static void Test()
        {
            S3.HopfOrbit();

            Mobius m = new Mobius();
            m.UpperHalfPlane();

            Vector3D test = m.Apply( new Vector3D() );
            test *= 1;
        }
예제 #3
0
        private Vector3D ApplyTransformationToSphere( Vector3D v, double t )
        {
            v = H3Models.BallToUHS( v );

            // 437 (hyperbolic)
            //v *= Math.Pow( 4.259171776329806, t*10-5 );

            // 36i (parabolic)
            //v += new Vector3D( Math.Cos( Math.PI / 6 ), Math.Sin( Math.PI / 6 ) ) * t;

            // iii (loxodromic)
            //Complex c = v.ToComplex();
            //double x = Math.Sqrt( 2 ) - 1;
            //Mobius m = new Mobius( new Complex( x, 0 ), Complex.One, new Complex( -x, 0 ) );

            // 12,12,12 loxodromic
            //m = new Mobius( new Complex( 0, 1 ), Complex.One, new Complex( 0, -1 ) );

            /*
            c = m.Apply( c );
            c *= Complex.Exp( new Complex( 2.5, 4 * Math.PI ) * t );
            c = m.Inverse().Apply( c );
            v = Vector3D.FromComplex( c );
            */

            // Center cell head in KolorEyes.
            Mobius m = new Mobius();
            m.UpperHalfPlane();
            v = m.Inverse().Apply( v );

            return H3Models.UHSToBall( v );
        }
예제 #4
0
 private static Mobius ToUpperHalfPlaneMobius()
 {
     Mobius m = new Mobius();
     m.UpperHalfPlane();
     return m;
 }
예제 #5
0
        /// <summary>
        /// Using this to move the view around in interesting ways.
        /// </summary>
        private Vector3D ApplyTransformation( Vector3D v, double t = 0.0 )
        {
            //v.RotateXY( Math.PI / 4 + 0.01 );
            bool applyNone = true;
            if( applyNone )
                return v;

            Mobius m0 = new Mobius(), m1 = new Mobius(), m2 = new Mobius(), m3 = new Mobius();
            Sphere unitSphere = new Sphere();

            // self-similar scale for 437
            //v*= 4.259171776329806;

            double s = 6.5;
            v *= s;
            v += new Vector3D( s/3, -s/3 );
            v = unitSphere.ReflectPoint( v );
            v.RotateXY( Math.PI/6 );
            //v /= 3;
            //v.RotateXY( Math.PI );
            //v.RotateXY( Math.PI/2 );
            return v;

            //v.Y = v.Y / Math.Cos( Math.PI / 6 );	// 637 repeatable
            //return v;

            // 12,12,12
            m0.Isometry( Geometry.Hyperbolic, 0, new Complex( .0, .0 ) );
            m1 = Mobius.Identity();
            m2 = Mobius.Identity();
            m3 = Mobius.Identity();
            v = (m0 * m1 * m2 * m3).Apply( v );
            return v;

            // i64
            m0.Isometry( Geometry.Hyperbolic, 0, new Complex( .5, .5 ) );
            m1.UpperHalfPlane();
            m2 = Mobius.Scale( 1.333333 );
            m3.Isometry( Geometry.Euclidean, 0, new Vector3D( 0, -1.1 ) );
            v = (m1 * m2 * m3).Apply( v );
            return v;

            // 464
            // NOTE: Also, don't apply rotations during simplex generation.
            m1.UpperHalfPlane();
            m2 = Mobius.Scale( 1.3 );
            m3.Isometry( Geometry.Euclidean, 0, new Vector3D( 1.55, -1.1 ) );
            v = ( m1 * m2 * m3 ).Apply( v );
            return v;

            // iii
            m1.Isometry( Geometry.Hyperbolic, 0, new Complex( 0, Math.Sqrt( 2 ) - 1 ) );
            m2.Isometry( Geometry.Euclidean, -Math.PI / 4, 0 );
            m3 = Mobius.Scale( 5 );
            //v = ( m1 * m2 * m3 ).Apply( v );

            // Vertical Line
            /*v = unitSphere.ReflectPoint( v );
            m1.MapPoints( new Vector3D(-1,0), new Vector3D(), new Vector3D( 1, 0 ) );
            m2 = Mobius.Scale( .5 );
            v = (m1*m2).Apply( v ); */

            /*
            m1 = Mobius.Scale( 0.175 );
            v = unitSphere.ReflectPoint( v );
            v = m1.Apply( v );
             * */

            // Inversion
            //v = unitSphere.ReflectPoint( v );
            //return v;

            /*Mobius m1 = new Mobius(), m2 = new Mobius(), m3 = new Mobius();
            m1.Isometry( Geometry.Spherical, 0, new Complex( 0, 1 ) );
            m2.Isometry( Geometry.Euclidean, 0, new Complex( 0, -1 ) );
            m3 = Mobius.Scale( 0.5 );
            v = (m1 * m3 * m2).Apply( v );*/

            //Mobius m = new Mobius();
            //m.Isometry( Geometry.Hyperbolic, 0, new Complex( -0.88, 0 ) );
            //m.Isometry( Geometry.Hyperbolic, 0, new Complex( 0, Math.Sqrt(2) - 1 ) );
            //m = Mobius.Scale( 0.17 );
            //m.Isometry( Geometry.Spherical, 0, new Complex( 0, 3.0 ) );
            //v = m.Apply( v );

            // 63i, 73i
            m1 = Mobius.Scale( 6.0 ); // Scale {3,i} to unit disk.
            m1 = Mobius.Scale( 1.0 / 0.14062592996431983 ); // 73i	(constant is abs of midpoint of {3,7} tiling, if we want to calc later for other tilings).
            m2.MapPoints( Infinity.InfinityVector, new Vector3D( 1, 0 ), new Vector3D() ); // swap interior/exterior
            m3.UpperHalfPlane();
            v *= 2.9;

            // iii
            /*m1.MapPoints( new Vector3D(), new Vector3D(1,0), new Vector3D( Math.Sqrt( 2 ) - 1, 0 ) );
            m2.Isometry( Geometry.Euclidean, -Math.PI / 4, 0 );
            m3 = Mobius.Scale( 0.75 );*/

            Mobius m = m3 * m2 * m1;
            v = m.Inverse().Apply( v );	// Strange that we have to do inverse here.

            return v;
        }