示例#1
0
        private void button4_Click(object sender, EventArgs e)
        {
            ClearPictureBox();

            // Setup Orig Vector
            MyVector origVector = new MyVector(9, 0, 0);

            DrawVector(origVector, Color.Silver);

            MyQuaternion multiRotationQuat = new MyQuaternion(new MyVector(0, 0, 0), Utility3D.GetDegreesToRadians(0));

            // Rotate around Z
            MyQuaternion anotherRotationQuat = new MyQuaternion(new MyVector(0, 0, 1), Utility3D.GetDegreesToRadians(1));

            //List<double> lengths = new List<double>();

            for (int outerCntr = 1; outerCntr <= 100000; outerCntr++)
            {
                //lengths.Add(multiRotationQuat.GetMagnitude());
                for (int innerCntr = 1; innerCntr <= 360; innerCntr++)
                {
                    multiRotationQuat = MyQuaternion.Multiply(anotherRotationQuat, multiRotationQuat);
                }
                //multiRotationQuat.BecomeUnitQuaternion();
            }

            // Draw the final output
            MyVector subRotation = multiRotationQuat.GetRotatedVector(origVector, true);

            DrawVector(subRotation, Color.Yellow);
        }
示例#2
0
        private void PropsChangedSprtThrusters()
        {
            if (_type != ShipTypeQual.SolidBall)
            {
                return;  // the ball just has the thruster in the center
            }

            MyVector thrusterSeed = new MyVector(0, _ship.Ball.Radius, 0);
            MyVector zAxis        = new MyVector(0, 0, 1);

            // Bottom Thrusters
            _thrusterOffset_BottomRight = thrusterSeed.Clone();
            _thrusterOffset_BottomRight.RotateAroundAxis(zAxis, Utility3D.GetDegreesToRadians(_thrusterAngle * -1));

            _thrusterOffset_BottomLeft = thrusterSeed.Clone();
            _thrusterOffset_BottomLeft.RotateAroundAxis(zAxis, Utility3D.GetDegreesToRadians(_thrusterAngle));

            // Top Thrusters
            thrusterSeed             = new MyVector(0, _ship.Ball.Radius * -1, 0);
            _thrusterOffset_TopRight = thrusterSeed.Clone();
            _thrusterOffset_TopRight.RotateAroundAxis(zAxis, Utility3D.GetDegreesToRadians(_thrusterAngle));

            _thrusterOffset_TopLeft = thrusterSeed.Clone();
            _thrusterOffset_TopLeft.RotateAroundAxis(zAxis, Utility3D.GetDegreesToRadians(_thrusterAngle * -1));
        }
示例#3
0
        private void trkSweepAngle_Scroll(object sender, EventArgs e)
        {
            toolTip1.SetToolTip(trkSweepAngle, trkSweepAngle.Value.ToString());

            _sweepAngle = Utility3D.GetDegreesToRadians(trkSweepAngle.Value);

            foreach (TractorBeamCone tractor in _shipController.TractorBeams)
            {
                tractor.SweepAngle = _sweepAngle;
            }
        }
示例#4
0
        private void chkIncludeShip_CheckedChanged(object sender, EventArgs e)
        {
            const double THRUSTERANGLE = 75;

            if (chkIncludeShip.Checked)
            {
                if (_ship == null)
                {
                    #region Create Ship

                    // Set up the ship
                    double    radius = MINRADIUSMASS + (_rand.NextDouble() * (MAXRADIUSMASS - MINRADIUSMASS));
                    SolidBall ship   = new SolidBall(Utility3D.GetRandomVector(_boundryLower, _boundryUpper), new DoubleVector(0, 1, 0, 1, 0, 0), radius, GetMass(radius), GetElasticity(), 1, 1, _boundryLower, _boundryUpper);

                    // Set up the thrusters
                    MyVector thrusterSeed = new MyVector(0, ship.Radius, 0);
                    MyVector zAxis        = new MyVector(0, 0, 1);

                    // Bottom Thrusters
                    _shipThrusterOffset_BottomRight = thrusterSeed.Clone();
                    _shipThrusterOffset_BottomRight.RotateAroundAxis(zAxis, Utility3D.GetDegreesToRadians(THRUSTERANGLE * -1));

                    _shipThrusterOffset_BottomLeft = thrusterSeed.Clone();
                    _shipThrusterOffset_BottomLeft.RotateAroundAxis(zAxis, Utility3D.GetDegreesToRadians(THRUSTERANGLE));

                    // Top Thrusters
                    thrusterSeed = new MyVector(0, ship.Radius * -1, 0);
                    _shipThrusterOffset_TopRight = thrusterSeed.Clone();
                    _shipThrusterOffset_TopRight.RotateAroundAxis(zAxis, Utility3D.GetDegreesToRadians(THRUSTERANGLE));

                    _shipThrusterOffset_TopLeft = thrusterSeed.Clone();
                    _shipThrusterOffset_TopLeft.RotateAroundAxis(zAxis, Utility3D.GetDegreesToRadians(THRUSTERANGLE * -1));

                    // Add to the map
                    _ship = new BallBlip(ship, CollisionStyle.Standard, RadarBlipQual.BallUserDefined03, TokenGenerator.NextToken());
                    _map.Add(_ship);

                    #endregion
                }
            }
            else
            {
                if (_ship != null)
                {
                    _map.Remove(_ship.Token);
                    _ship = null;
                }
            }
        }
示例#5
0
        private void trackBar1_Scroll(object sender, EventArgs e)
        {
            _prevRadians    = _currentRadians;
            _currentRadians = Utility3D.GetDegreesToRadians(trackBar1.Value);

            #region Draw Current

            Graphics graphics = pictureBox2.CreateGraphics();
            graphics.Clear(pictureBox1.BackColor);

            DrawVector(graphics, _sphere.Position, _sphere.Position + (_sphere.DirectionFacing.Standard * 100d), Color.White);
            DrawVector(graphics, _sphere.Position, _sphere.Position + (_sphere.DirectionFacing.Orth * 100d), Color.Silver);

            MyVector rotatedOffset = _sphere.Rotation.GetRotatedVector(_offset, true);

            DrawVector(graphics, _sphere.Position, _sphere.Position + rotatedOffset, Color.Orange);
            DrawDot(graphics, _sphere.Position + rotatedOffset, 3, Color.Gold);

            #endregion

            double radians = _currentRadians - _prevRadians;

            if (radOffset.Checked)
            {
                // Remember where the offset is in world coords
                MyVector offsetRotated = _sphere.Rotation.GetRotatedVector(_offset, true);
                MyVector offsetWorld   = _sphere.Position + offsetRotated;

                DrawDot(graphics, offsetWorld, 5, Color.DodgerBlue);

                // Get the opposite of the local offset
                MyVector posRelativeToOffset = offsetRotated.Clone();
                posRelativeToOffset.Multiply(-1d);

                // Rotate the center of position around the center of mass
                posRelativeToOffset.RotateAroundAxis(_rotationAxis, radians);

                // Now figure out the new center of position
                _sphere.Position.X = offsetWorld.X + posRelativeToOffset.X;
                _sphere.Position.Y = offsetWorld.Y + posRelativeToOffset.Y;
                _sphere.Position.Z = offsetWorld.Z + posRelativeToOffset.Z;
            }

            _sphere.RotateAroundAxis(_rotationAxis, radians);
        }
示例#6
0
        private void PropsChangedSprtGuns()
        {
            //TODO:  Change the size and pain of the projectiles based on the size of the ship

            // Cannon
            _cannon.Barrels[0].Offset.BecomeUnitVector();
            _cannon.Barrels[0].Offset.Multiply(_ship.Ball.Radius + (_cannon.ProjectileRadius * 1.5d));
            _cannon.IgnoreOtherProjectiles = _ignoreOtherProjectiles;

            // Machine Guns
            MyVector zAxis   = new MyVector(0, 0, 1);
            MyVector gunSeed = new MyVector(0, _ship.Ball.Radius + (_machineGuns[0].ProjectileRadius * 1.5d), 0);
            bool     isLeft  = true;

            foreach (ProjectileWeapon weapon in _machineGuns)
            {
                // Misc
                weapon.IgnoreOtherProjectiles = _ignoreOtherProjectiles;

                double gunAngle = _machineGunAngle;
                if (isLeft)
                {
                    gunAngle *= -1;
                }

                // Offset
                weapon.Barrels[0].Offset.StoreNewValues(gunSeed);
                weapon.Barrels[0].Offset.RotateAroundAxis(zAxis, Utility3D.GetDegreesToRadians(gunAngle));

                // Rotation
                if (_isMachineGunCrossoverInfinity)
                {
                    weapon.Barrels[0].Rotation.StoreNewValues(new MyQuaternion(zAxis, 0));
                }
                else
                {
                    weapon.Barrels[0].Rotation.StoreNewValues(GetCrossoverRotation(weapon.Barrels[0].Offset, _machineGunCrossoverDistance, _ship.Ball.Radius, isLeft));
                }

                isLeft = false;
            }
        }
示例#7
0
        private void trackBar_Scroll(object sender, EventArgs e)
        {
            // Figure out the vector to rotate around
            MyVector rotateAround = new MyVector(trkXAxis.Value, trkYAxis.Value, trkZAxis.Value);

            if (rotateAround.X == 0 && rotateAround.Y == 0 && rotateAround.Z == 0)
            {
                pictureBox1.CreateGraphics().Clear(Color.Tomato);
                return;
            }

            // Rotate a vector
            MyVector rotatedVector = new MyVector(9, 0, 0);

            rotatedVector.RotateAroundAxis(rotateAround, Utility3D.GetDegreesToRadians(trackBar1.Value));

            // Draw it
            ClearPictureBox();
            DrawVector(rotateAround, Color.LightSteelBlue);
            DrawVector(rotatedVector, Color.GhostWhite);
        }
示例#8
0
        private void trackBar1_Scroll(object sender, EventArgs e)
        {
            MyVector thrusterSeed = new MyVector(0, _ship.Radius, 0);
            MyVector zAxis        = new MyVector(0, 0, 1);
            double   angle        = trackBar1.Value;

            // Bottom Thrusters
            _shipThrusterOffset_BottomRight = thrusterSeed.Clone();
            _shipThrusterOffset_BottomRight.RotateAroundAxis(zAxis, Utility3D.GetDegreesToRadians(angle * -1));

            _shipThrusterOffset_BottomLeft = thrusterSeed.Clone();
            _shipThrusterOffset_BottomLeft.RotateAroundAxis(zAxis, Utility3D.GetDegreesToRadians(angle));

            // Top Thrusters
            thrusterSeed = new MyVector(0, _ship.Radius * -1, 0);
            _shipThrusterOffset_TopRight = thrusterSeed.Clone();
            _shipThrusterOffset_TopRight.RotateAroundAxis(zAxis, Utility3D.GetDegreesToRadians(angle));

            _shipThrusterOffset_TopLeft = thrusterSeed.Clone();
            _shipThrusterOffset_TopLeft.RotateAroundAxis(zAxis, Utility3D.GetDegreesToRadians(angle * -1));
        }
示例#9
0
        private void button5_Click(object sender, EventArgs e)
        {
            // This button tests TorqueBall.OrthonormalizeOrientation



            ClearPictureBox();

            // Setup Orig Vector
            MyVector origVector = new MyVector(9, 0, 0);

            DrawVector(origVector, Color.Silver);

            // Rotate around Z
            MyQuaternion rotationQuat = new MyQuaternion(new MyVector(0, 0, 1), Utility3D.GetDegreesToRadians(30));

            MyVector rotated = rotationQuat.GetRotatedVector(origVector, true);

            DrawVector(rotated, Color.Black);

            MyMatrix3 rotationMatrix = rotationQuat.ToMatrix3FromUnitQuaternion();



            // See if this affects the rotation matrix
            TorqueBall.OrthonormalizeOrientation(rotationMatrix);



            rotationQuat = null;
            rotationQuat = new MyQuaternion();
            rotationQuat.FromRotationMatrix(rotationMatrix);

            rotationMatrix = null;


            // Draw the results
            rotated = rotationQuat.GetRotatedVector(origVector, true);
            DrawVector(rotated, Color.DodgerBlue);
        }
示例#10
0
        private void btnRotationMatrix_Click(object sender, EventArgs e)
        {
            ClearPictureBox();

            // Setup Orig Vector
            MyVector origVector = new MyVector(9, 0, 0);

            DrawVector(origVector, Color.Silver);

            // Rotate around Z
            MyQuaternion rotationQuat = new MyQuaternion(new MyVector(0, 0, 1), Utility3D.GetDegreesToRadians(30));

            MyVector rotated = rotationQuat.GetRotatedVector(origVector, true);

            DrawVector(rotated, Color.Black);

            MyMatrix3 rotationMatrix;

            for (int cntr = 1; cntr <= 10000000; cntr++)
            {
                rotationMatrix = rotationQuat.ToMatrix3FromUnitQuaternion();

                rotationQuat = null;
                rotationQuat = new MyQuaternion();
                rotationQuat.FromRotationMatrix(rotationMatrix);

                rotationMatrix = null;
            }


            rotated = rotationQuat.GetRotatedVector(origVector, true);
            DrawVector(rotated, Color.DodgerBlue);

            rotationQuat.W *= -1;
            MyVector rotatedNegated = rotationQuat.GetRotatedVector(origVector, true);

            DrawVector(rotatedNegated, Color.Yellow);
        }
示例#11
0
        private void DrawVelocity(PieMenuDrawButtonArgs e)
        {
            const double MINLENGTHPERCENT = 0d;
            const double MAXLENGTHPERCENT = 1d;
            const double MINTARGET        = 10d;
            const double MAXTARGET        = 250d;

            #region Figure out the length

            // Figure out how long the real velocity will be
            double realVelocity = 0d;

            if (this.ExposedProps.RandomVelocity)
            {
                realVelocity = this.ExposedProps.MaxVelocity * .75d;
            }
            else
            {
                if (this.ExposedProps.Velocity != null && !this.ExposedProps.Velocity.IsZero)
                {
                    realVelocity = this.ExposedProps.Velocity.GetMagnitude();
                }
            }

            // Figure out the velocity to draw
            double velocityPercent = 0d;
            if (realVelocity >= MINLENGTHPERCENT)
            {
                velocityPercent = UtilityCore.GetScaledValue_Capped(MINLENGTHPERCENT, MAXLENGTHPERCENT, MINTARGET, MAXTARGET, realVelocity);
            }

            #endregion

            // Figure out the color
            Color velocityColor = GetGreenRedColor(MINTARGET, MAXTARGET, realVelocity, velocityPercent);

            float halfSize = e.ButtonSize * .5f;

            e.Graphics.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality;

            if (velocityPercent > 0d)
            {
                #region Draw Vector

                double drawLength = (e.ButtonSize / 2d) * velocityPercent;

                // Draw Vector
                using (Pen vectorPen = new Pen(velocityColor, 2f))
                {
                    vectorPen.StartCap = LineCap.Round; // LineCap.RoundAnchor;
                    vectorPen.EndCap   = LineCap.ArrowAnchor;

                    MyVector vectorLine;
                    if (this.ExposedProps.RandomVelocity)
                    {
                        // Draw a circle underneath
                        using (Pen circlePen = new Pen(SystemColors.ControlDark, 1f))
                        {
                            e.Graphics.DrawEllipse(circlePen, Convert.ToSingle(halfSize - drawLength), Convert.ToSingle(halfSize - drawLength), Convert.ToSingle(drawLength * 2d), Convert.ToSingle(drawLength * 2d));
                        }

                        vectorLine = new MyVector(drawLength, 0, 0);

                        vectorLine.RotateAroundAxis(new MyVector(0, 0, 1), Utility3D.GetDegreesToRadians(-60d));
                        e.Graphics.DrawLine(vectorPen, halfSize, halfSize, Convert.ToSingle(halfSize + vectorLine.X), Convert.ToSingle(halfSize + vectorLine.Y));

                        vectorLine.RotateAroundAxis(new MyVector(0, 0, 1), Utility3D.GetDegreesToRadians(-85d));
                        e.Graphics.DrawLine(vectorPen, halfSize, halfSize, Convert.ToSingle(halfSize + vectorLine.X), Convert.ToSingle(halfSize + vectorLine.Y));

                        vectorLine.RotateAroundAxis(new MyVector(0, 0, 1), Utility3D.GetDegreesToRadians(-150d));
                        e.Graphics.DrawLine(vectorPen, halfSize, halfSize, Convert.ToSingle(halfSize + vectorLine.X), Convert.ToSingle(halfSize + vectorLine.Y));
                    }
                    else
                    {
                        vectorLine = this.ExposedProps.Velocity.Clone();
                        vectorLine.BecomeUnitVector();
                        vectorLine.Multiply(drawLength);

                        e.Graphics.DrawLine(vectorPen, halfSize, halfSize, Convert.ToSingle(halfSize + vectorLine.X), Convert.ToSingle(halfSize + vectorLine.Y));
                    }
                }

                #endregion
            }
            else
            {
                e.Graphics.DrawString("Velocity", new Font("Arial", 8), Brushes.Black, 0, e.ButtonSize - 13);
            }
        }
示例#12
0
        private void DrawSize(PieMenuDrawButtonArgs e)
        {
            const double MINRADIUSPERCENT = .15d;
            const double MAXRADIUSPERCENT = 1d;
            const double MINTARGET        = 20d;
            const double MAXTARGET        = 1000d;

            #region Figure out the radius

            // Figure out how big the real ball will be
            double ballRadius = 0;

            switch (this.ExposedProps.SizeMode)
            {
            case BallProps.SizeModes.Draw:
                //TODO:  Use a different line color
                ballRadius = UtilityCore.GetScaledValue(MINTARGET, MAXTARGET, 0d, 1d, .75d);
                break;

            case BallProps.SizeModes.Fixed:
                ballRadius = this.ExposedProps.SizeIfFixed;
                break;

            case BallProps.SizeModes.Random:
                ballRadius = (this.ExposedProps.MinRandSize + this.ExposedProps.MaxRandSize) / 2d;
                break;

            default:
                throw new ApplicationException("Unknown BallProps.SizeModes: " + this.ExposedProps.SizeMode.ToString());
            }

            // Figure out the radius to draw
            double radiusPercent = UtilityCore.GetScaledValue_Capped(MINRADIUSPERCENT, MAXRADIUSPERCENT, MINTARGET, MAXTARGET, ballRadius);

            #endregion

            // Figure out the color
            Color radiusColor = GetGreenRedColor(MINTARGET, MAXTARGET, ballRadius, radiusPercent);

            float drawWidth     = Convert.ToSingle((e.ButtonSize - 2) * radiusPercent);
            float halfDrawWidth = drawWidth * .5f;
            float halfSize      = (e.ButtonSize - 2) * .5f;

            e.Graphics.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality;

            // Draw Radius
            using (Pen radiusPen = new Pen(radiusColor, 2f))
            {
                MyVector radiusLine = new MyVector(halfDrawWidth, 0, 0);
                radiusLine.RotateAroundAxis(new MyVector(0, 0, 1), Utility3D.GetDegreesToRadians(-30d));

                e.Graphics.DrawLine(radiusPen, halfSize, halfSize, Convert.ToSingle(halfSize + radiusLine.X), Convert.ToSingle(halfSize + radiusLine.Y));
            }

            // Draw Circle
            Color circleColor = Color.Black;
            if (this.ExposedProps.SizeMode == BallProps.SizeModes.Draw)
            {
                circleColor = SystemColors.ControlDark;
            }

            using (Pen circlePen = new Pen(circleColor, 2f))
            {
                e.Graphics.DrawEllipse(circlePen, halfSize - halfDrawWidth, halfSize - halfDrawWidth, drawWidth, drawWidth);
            }
        }
示例#13
0
        private Bitmap DrawVelocity()
        {
            const double MINLENGTHPERCENT = 0d;
            const double MAXLENGTHPERCENT = 1d;
            const double MINTARGET        = 10d;
            const double MAXTARGET        = 250d;

            #region Figure out the length

            // Figure out how long the real velocity will be
            double realVelocity = 0d;

            if (_exposedProps.RandomVelocity)
            {
                realVelocity = _exposedProps.MaxVelocity * .75d;
            }
            else
            {
                if (_exposedProps.Velocity != null && !_exposedProps.Velocity.IsZero)
                {
                    realVelocity = _exposedProps.Velocity.GetMagnitude();
                }
            }

            // Figure out the velocity to draw
            double velocityPercent = 0d;
            if (realVelocity >= MINLENGTHPERCENT)
            {
                velocityPercent = UtilityCore.GetScaledValue_Capped(MINLENGTHPERCENT, MAXLENGTHPERCENT, MINTARGET, MAXTARGET, realVelocity);
            }

            #endregion

            // Figure out the color
            Color velocityColor = GetGreenRedColor(MINTARGET, MAXTARGET, realVelocity, velocityPercent);

            float halfSize = _buttonSize * .5f;

            Bitmap retVal = new Bitmap(_buttonSize + 1, _buttonSize + 1);
            using (Graphics graphics = Graphics.FromImage(retVal))
            {
                graphics.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality;

                if (velocityPercent > 0d)
                {
                    double drawLength = (_buttonSize / 2d) * velocityPercent;

                    // Draw Vector
                    using (Pen vectorPen = new Pen(velocityColor, 2f))
                    {
                        vectorPen.StartCap = LineCap.Round;     // LineCap.RoundAnchor;
                        vectorPen.EndCap   = LineCap.ArrowAnchor;

                        MyVector vectorLine;
                        if (_exposedProps.RandomVelocity)
                        {
                            // Draw a circle underneath
                            using (Pen circlePen = new Pen(SystemColors.ControlDark, 1f))
                            {
                                graphics.DrawEllipse(circlePen, Convert.ToSingle(halfSize - drawLength), Convert.ToSingle(halfSize - drawLength), Convert.ToSingle(drawLength * 2d), Convert.ToSingle(drawLength * 2d));
                            }

                            vectorLine = new MyVector(drawLength, 0, 0);

                            vectorLine.RotateAroundAxis(new MyVector(0, 0, 1), Utility3D.GetDegreesToRadians(-60d));
                            graphics.DrawLine(vectorPen, halfSize, halfSize, Convert.ToSingle(halfSize + vectorLine.X), Convert.ToSingle(halfSize + vectorLine.Y));

                            vectorLine.RotateAroundAxis(new MyVector(0, 0, 1), Utility3D.GetDegreesToRadians(-85d));
                            graphics.DrawLine(vectorPen, halfSize, halfSize, Convert.ToSingle(halfSize + vectorLine.X), Convert.ToSingle(halfSize + vectorLine.Y));

                            vectorLine.RotateAroundAxis(new MyVector(0, 0, 1), Utility3D.GetDegreesToRadians(-150d));
                            graphics.DrawLine(vectorPen, halfSize, halfSize, Convert.ToSingle(halfSize + vectorLine.X), Convert.ToSingle(halfSize + vectorLine.Y));
                        }
                        else
                        {
                            vectorLine = _exposedProps.Velocity.Clone();
                            vectorLine.BecomeUnitVector();
                            vectorLine.Multiply(drawLength);

                            graphics.DrawLine(vectorPen, halfSize, halfSize, Convert.ToSingle(halfSize + vectorLine.X), Convert.ToSingle(halfSize + vectorLine.Y));
                        }
                    }
                }
            }

            // Exit Function
            return(retVal);
        }
示例#14
0
        private void button3_Click(object sender, EventArgs e)
        {
            ClearPictureBox();

            // Setup Orig Vector
            MyVector origVector = new MyVector(9, 0, 0);

            DrawVector(origVector, Color.Silver);

            #region Single Rotation

            // Setup quat to do the whole rotation in one shot
            MyQuaternion largeRotationQuat = new MyQuaternion(new MyVector(0, 0, 1), Utility3D.GetDegreesToRadians(90));
            MyVector     largeRotation     = largeRotationQuat.GetRotatedVector(origVector, true);
            DrawVector(largeRotation, Color.White);

            #endregion

            #region Multi Rotations

            // Setup quat that holds a 30 degree angle
            MyQuaternion multiRotationQuat = new MyQuaternion(new MyVector(0, 0, 1), Utility3D.GetDegreesToRadians(30));
            MyVector     subRotation       = multiRotationQuat.GetRotatedVector(origVector, true);
            DrawVector(subRotation, Color.Orange);


            // Setup a quat that holds a 1 degree angle
            MyQuaternion anotherRotationQuat = new MyQuaternion(new MyVector(0, 0, 1), Utility3D.GetDegreesToRadians(1));

            // Apply this to the multi quat 60 times
            for (int cntr = 1; cntr <= 60; cntr++)
            {
                multiRotationQuat = MyQuaternion.Multiply(anotherRotationQuat, multiRotationQuat);
            }

            // Let's see what happened
            subRotation = multiRotationQuat.GetRotatedVector(origVector, true);
            DrawVector(subRotation, Color.HotPink);

            #endregion
            #region Multi Rotations (3D)

            /*
             *          // Rotate around Y
             *          multiRotationQuat = new MyQuaternion(new MyVector(0, 1, 0), Utility3D.GetDegreesToRadians(90));
             *
             *          // Rotate around X
             *          anotherRotationQuat = new MyQuaternion(new MyVector(1, 0, 0), Utility3D.GetDegreesToRadians(90));
             *          multiRotationQuat = MyQuaternion.Multiply(anotherRotationQuat, multiRotationQuat);
             *
             *          // Draw the final output
             *          subRotation = multiRotationQuat.GetRotatedVector(origVector, true);
             *          DrawVector(subRotation, Color.Yellow);
             */
            #endregion
            #region Multi Rotations (Vector3D)

            /*
             *          subRotation = origVector.Clone();
             *
             *          subRotation.RotateAroundAxis(new MyVector(0, 1, 0), Utility3D.GetDegreesToRadians(90));
             *          subRotation.RotateAroundAxis(new MyVector(1, 0, 0), Utility3D.GetDegreesToRadians(90));
             *
             *          DrawVector(subRotation, Color.Yellow);
             */
            #endregion
        }