예제 #1
0
        private void ViewObliqueProjection(object sender, EventArgs e)
        {
            currentPlane = PlaneFactory.CreateXY(DefaultPoint);
            projection   = ProjectionsFactory.CreateFrontalProjection();
            var transformation = ProjectionsFactory.CreateObliqueProjection(
                (double)-angleAlpha.Value,
                (double)lengthOblique.Value);

            ApplyTransformation(transformation);
        }
예제 #2
0
        private void ViewAxonometricProjection(object sender, EventArgs e)
        {
            projection   = ProjectionsFactory.CreateFrontalProjection();
            currentPlane = PlaneFactory.CreateXY(DefaultPoint);
            var transformation = ProjectionsFactory.CreateAxonometricProjection(
                (double)anglePsi.Value,
                (double)angleFi.Value);

            ApplyTransformation(transformation);
        }
예제 #3
0
        private void ViewViewTransformationProjection(object sender, EventArgs e)
        {
            projection             = ProjectionsFactory.CreatePerspectiveProjection((double)d.Value);
            currentPlane           = PlaneFactory.CreateXY(DefaultPoint);
            currentPlane.ViewPoint = MathExtensions.CreatePolarPoint(
                (double)anglePhiView.Value,
                (double)angleTheta.Value,
                (double)rho.Value);
            var viewTransformation = TransformationsFactory.CreateViewTransformation(
                (double)anglePhiView.Value,
                (double)angleTheta.Value,
                (double)rho.Value,
                (double)d.Value);

            projection = viewTransformation;
            RedrawFigures();
        }
예제 #4
0
        private void Create(object sender, EventArgs e)
        {
            DddObjects.Point lightPoint = new DddObjects.Point(0, 0, 5000);
            currentPlane = PlaneFactory.CreateXY(DefaultPoint);
            var l      = (int)length.Value;
            var w      = (int)width.Value;
            var h      = (int)height.Value;
            var r      = (int)radius.Value;
            var n      = (int)interpolationN.Value;
            var figure = DddFigureFactory.Create(new DddObjects.Point(0, 0, 0), l, w, h, r, n);
            var cone   = DddFigureFactory.CreateCone(new DddObjects.Point(0, 0, 0), l, w, h, r, n);

            projection = ProjectionsFactory.CreateFrontalProjection();

            figures = new List <DddObjects.Figure> {
                cone, figure
            };
            RedrawFigures();
        }
예제 #5
0
 private void ViewFrontalProjection(object sender, EventArgs e)
 {
     currentPlane = PlaneFactory.CreateXY(DefaultPoint);
     projection   = ProjectionsFactory.CreateFrontalProjection();
     RedrawFigures();
 }