geom.affine

MMCoordinateSystem

image

code


package geom.affine;

import net.mumie.mathletfactory.appletskeleton.g2d.SingleG2DCanvasApplet;
import net.mumie.mathletfactory.display.g2d.MMG2DCanvas;
import net.mumie.mathletfactory.math.number.MDouble;
import net.mumie.mathletfactory.mmobject.geom.affine.MMCoordinateSystem;

public class MMCoordinateSystem_Test extends SingleG2DCanvasApplet{
    final Class NC = MDouble.class;
    MMCoordinateSystem ouT;

    public void init(){
        super.init();
        setTitle("MMCoordinateSystem-Test");

        ouT = new MMCoordinateSystem();

        getCanvas().addObject(ouT);

        ((MMG2DCanvas)getCanvas()).getW2STransformationHandler().setUniformWorldDim(30);
    }
    public void reset() {}
}

setMinTickDistance


ouT.setMinTickDistance(10);

setLog10table, setXAxisLabelColor


ouT.setLog10table(MMCoordinateSystem.TRIGONOMETRIC_TABLE);

ouT.setXAxisLabelColor(Color.red);
ouT.setYAxisLabelColor(Color.blue);

center, DISPLAY_X


double centerX = 10;
double centerY = 0;

ouT = new MMCoordinateSystem(MMCoordinateSystem.DISPLAY_X, -centerX, -centerY);

MMAffine2DPoint

image

code


package geom.affine;

import net.mumie.mathletfactory.appletskeleton.g2d.SingleG2DCanvasApplet;
import net.mumie.mathletfactory.display.g2d.MMG2DCanvas;
import net.mumie.mathletfactory.math.number.MDouble;
import net.mumie.mathletfactory.mmobject.geom.affine.MMAffine2DPoint;
import net.mumie.mathletfactory.mmobject.geom.affine.MMCoordinateSystem;

public class MMAffine2DPoint_Test extends SingleG2DCanvasApplet{
    final Class NC = MDouble.class;
    MMCoordinateSystem cs;

    MMAffine2DPoint ouT; //object under test

    public void init(){
        super.init();
        setTitle("MMFunctionDefByOp-Test");
        cs = new MMCoordinateSystem();

        getCanvas().addObject(cs);

        ouT = new MMAffine2DPoint(NC, 1,2);

        ouT.setLabel("MMAffine2DPoint(1,2)");

        getCanvas().addObject(ouT);

        ((MMG2DCanvas)getCanvas()).getW2STransformationHandler().setUniformWorldDim(10);
    }
    public void reset() {}    
}

image

setColor, setPointRadius, setBorderWidth


ouT.setColor(Color.red);

((PointDisplayProperties)ouT.getDisplayProperties()).setPointRadius(10);
((PointDisplayProperties)ouT.getDisplayProperties()).setBorderWidth(2);
((PointDisplayProperties)ouT.getDisplayProperties()).setBorderColor(Color.black);

MMAffine2DLineSegment

image

code


package geom.affine;

import java.awt.Color;
import net.mumie.mathletfactory.appletskeleton.g2d.SingleG2DCanvasApplet;
import net.mumie.mathletfactory.display.LineDisplayProperties;
import net.mumie.mathletfactory.display.g2d.MMG2DCanvas;
import net.mumie.mathletfactory.math.number.MDouble;
import net.mumie.mathletfactory.mmobject.geom.affine.MMAffine2DLineSegment;
import net.mumie.mathletfactory.mmobject.geom.affine.MMCoordinateSystem;

public class MMAffine2DLineSegment_Test2 extends SingleG2DCanvasApplet{
    final Class NC = MDouble.class;
    MMCoordinateSystem cs;

    MMAffine2DLineSegment ouT; //object under test

    public void init(){
        super.init();
        setTitle("MMAffine2DLineSegment-Test");
        cs = new MMCoordinateSystem();

        getCanvas().addObject(cs);

        ouT = new MMAffine2DLineSegment(NC,-3,3,4,3);

        ouT.setLabel("MMAffine2DLineSegment(-3,3,4,3)");

        ouT.setColor(Color.blue);
        ((LineDisplayProperties)ouT.getDisplayProperties()).setLineWidth(7);

        getCanvas().addObject(ouT);

        ((MMG2DCanvas)getCanvas()).getW2STransformationHandler().setUniformWorldDim(10);
    }
    public void reset() {}    
}

image

setColor, setLineWidth


ouT.setColor(Color.blue);
((LineDisplayProperties)ouT.getDisplayProperties()).setLineWidth(7);

MMAffine2DRay

image

code


package geom.affine;

import java.awt.Color;

import net.mumie.mathletfactory.appletskeleton.g2d.SingleG2DCanvasApplet;
import net.mumie.mathletfactory.display.g2d.MMG2DCanvas;
import net.mumie.mathletfactory.math.number.MDouble;
import net.mumie.mathletfactory.mmobject.geom.affine.MMAffine2DRay;
import net.mumie.mathletfactory.mmobject.geom.affine.MMCoordinateSystem;

public class MMAffine2DRay_Test extends SingleG2DCanvasApplet{
    MMCoordinateSystem cs;

    MMAffine2DRay ouT; //object under test

    public void init(){
        super.init();
        setTitle("MMAffine2DRay-Test");
        cs = new MMCoordinateSystem();

        getCanvas().addObject(cs);

        double p1_x = 0;
        double p1_y = 1;
        double p2_x = 2;
        double p2_y = 1;

        ouT = new MMAffine2DRay(MDouble.class, p1_x,p1_y,p2_x,p2_y);
        ouT.setColor(new Color(0,153,255));
        ouT.setLabel("Strahl");

        getCanvas().addObject(ouT);
        ((MMG2DCanvas)getCanvas()).getW2STransformationHandler().setWorldCentreCoordinates(1, 1);
        ((MMG2DCanvas)getCanvas()).getW2STransformationHandler().setUniformWorldDim(6);
    }
    public void reset() {}    
}

MMAffine2DLine

image

code


package geom.affine;

import net.mumie.mathletfactory.appletskeleton.g2d.SingleG2DCanvasApplet;
import net.mumie.mathletfactory.display.g2d.MMG2DCanvas;
import net.mumie.mathletfactory.math.number.MDouble;
import net.mumie.mathletfactory.mmobject.geom.affine.MMAffine2DLine;
import net.mumie.mathletfactory.mmobject.geom.affine.MMCoordinateSystem;

public class MMAffine2DLine_Test extends SingleG2DCanvasApplet{
    final Class NC = MDouble.class;
    MMCoordinateSystem cs;

    MMAffine2DLine ouT; //object under test

    public void init(){
        super.init();
        setTitle("MMAffine2DLine-Test");
        cs = new MMCoordinateSystem();

        getCanvas().addObject(cs);

        ouT = new MMAffine2DLine(NC, 0,0,4,3);

        getCanvas().addObject(ouT);

        ((MMG2DCanvas)getCanvas()).getW2STransformationHandler().setUniformWorldDim(10);
    }
    public void reset() {}    
}


h3. MMAffine2DAngle

image

code


package geom.affine;

import net.mumie.mathletfactory.appletskeleton.g2d.SingleG2DCanvasApplet;
import net.mumie.mathletfactory.display.g2d.MMG2DCanvas;
import net.mumie.mathletfactory.math.number.MDouble;
import net.mumie.mathletfactory.mmobject.geom.affine.MMAffine2DAngle;
import net.mumie.mathletfactory.mmobject.geom.affine.MMCoordinateSystem;

public class MMAffine2DAngle_Test extends SingleG2DCanvasApplet{
    final Class NC = MDouble.class;
    MMCoordinateSystem cs;

    MMAffine2DAngle ouT; //object under test

    public void init(){
        super.init();
        setTitle("MMAffine2DAngle-Test");
        cs = new MMCoordinateSystem();

        getCanvas().addObject(cs);

        ouT = new MMAffine2DAngle(MDouble.class);
        ouT.setVertex(0, 1); //center (0,1)
        ouT.setFirstPoint(1, 1);
        ouT.setDegrees(45);
        ouT.setFactor(1.0);//radius

        getCanvas().addObject(ouT);
        ((MMG2DCanvas)getCanvas()).getW2STransformationHandler().setWorldCentreCoordinates(0, 1);
        ((MMG2DCanvas)getCanvas()).getW2STransformationHandler().setUniformWorldDim(3);
    }
    public void reset() {}    
}

image

code


ouT.setVertex(0, 0); //center (0,0)
ouT.setFirstPoint(1, 0);
ouT.setSecondPoint(3, 3);
ouT.setFactor(2.0);//radius
ouT.setColor(Color.red);
ouT.setClosure(0);
ouT.getDisplayProperties().setFilled(false);
ouT.getDisplayProperties().setBorderWidth(10);

MMAffine2DEllipse

image

code


package geom.affine;

import java.awt.Color;

import net.mumie.mathletfactory.appletskeleton.g2d.SingleG2DCanvasApplet;
import net.mumie.mathletfactory.display.g2d.MMG2DCanvas;
import net.mumie.mathletfactory.math.number.MDouble;
import net.mumie.mathletfactory.mmobject.geom.affine.MMAffine2DEllipse;
import net.mumie.mathletfactory.mmobject.geom.affine.MMCoordinateSystem;

public class MMAffine2DEllipse_Test extends SingleG2DCanvasApplet{
    final Class NC = MDouble.class;
    MMCoordinateSystem cs;

    MMAffine2DEllipse ouT; //object under test

    public void init(){
        super.init();
        setTitle("MMAffine2DEllipse-Test");
        cs = new MMCoordinateSystem();

        getCanvas().addObject(cs);

        ouT = new MMAffine2DEllipse(new double[]{0,0}, 0, 5,1,NC);
        ouT.setBorderColor(Color.black);
        ouT.setObjectColor(Color.blue);

        getCanvas().addObject(ouT);
        ((MMG2DCanvas)getCanvas()).getW2STransformationHandler().setWorldCentreCoordinates(0, 1);
        ((MMG2DCanvas)getCanvas()).getW2STransformationHandler().setUniformWorldDim(10);
    }
    public void reset() {}    
}

image

code


double centerX = 2;
double centerY = 1;
double tiltAngle = Math.PI/4;
double lengthFirstSemiAxis = 3;
double lengthSecondSemiAxis = 1;

ouT = new MMAffine2DEllipse(new double[]{centerX,centerY}, 
            tiltAngle, 
            lengthFirstSemiAxis,
            lengthSecondSemiAxis,
            NC);

ouT.setBorderColor(Color.red);
ouT.setObjectColor(Color.white);

MMAffine2DPolygon

image

code


package geom.affine;

import java.awt.Color;

import net.mumie.mathletfactory.appletskeleton.g2d.SingleG2DCanvasApplet;
import net.mumie.mathletfactory.display.PolygonDisplayProperties;
import net.mumie.mathletfactory.display.g2d.MMG2DCanvas;
import net.mumie.mathletfactory.math.number.MDouble;
import net.mumie.mathletfactory.mmobject.geom.affine.MMAffine2DPoint;
import net.mumie.mathletfactory.mmobject.geom.affine.MMAffine2DPolygon;
import net.mumie.mathletfactory.mmobject.geom.affine.MMCoordinateSystem;

public class MMAffine2DPolygon_Test extends SingleG2DCanvasApplet{
    final Class NC = MDouble.class;
    MMCoordinateSystem cs;

    MMAffine2DPolygon ouT; //object under test

    public void init(){
        super.init();
        setTitle("MMAffine2DPolygon-Test");
        cs = new MMCoordinateSystem();

        getCanvas().addObject(cs);
        MMAffine2DPoint[] point_arr = new MMAffine2DPoint[]{
                new MMAffine2DPoint(NC,0,0),
                new MMAffine2DPoint(NC,2,0),
                new MMAffine2DPoint(NC,2,1),
                new MMAffine2DPoint(NC,0,1)
        };
        ouT = new MMAffine2DPolygon(point_arr);

        ((PolygonDisplayProperties)ouT.getDisplayProperties()).setBorderWidth(4);
        ouT.setColor(Color.orange);

        getCanvas().addObject(ouT);
        ((MMG2DCanvas)getCanvas()).getW2STransformationHandler().setWorldCentreCoordinates(1, 0.5);
        ((MMG2DCanvas)getCanvas()).getW2STransformationHandler().setUniformWorldDim(3);
    }
    public void reset() {}    
}

mmcoordinatesystem_test.jpg (24.6 KB) Marek Grudzinski, 04/07/2013 11:38 AM

mmcoordinatesystem_test2.jpg (32.3 KB) Marek Grudzinski, 04/07/2013 11:38 AM

mmcoordinatesystem_test3.jpg (24.8 KB) Marek Grudzinski, 04/07/2013 11:38 AM

mmcoordinatesystem_test4.jpg (21.8 KB) Marek Grudzinski, 04/07/2013 11:38 AM

mmaffine2dpoint_test.jpg (24 KB) Marek Grudzinski, 04/07/2013 11:38 AM

mmaffine2dpoint_test2.jpg (24.3 KB) Marek Grudzinski, 04/07/2013 11:38 AM

mmaffine2dlinesegment_test.jpg (29.7 KB) Marek Grudzinski, 04/07/2013 11:38 AM

mmaffine2dlinesegment_test2.jpg (28.6 KB) Marek Grudzinski, 04/07/2013 11:38 AM

mmaffine2dray_test.png (31.8 KB) Marek Grudzinski, 04/07/2013 11:38 AM

mmaffine2dline_test.jpg (24.2 KB) Marek Grudzinski, 04/07/2013 11:38 AM

mmaffine2dangle_test.jpg (24.1 KB) Marek Grudzinski, 04/07/2013 11:39 AM

mmaffine2dangle_test2.jpg (23.6 KB) Marek Grudzinski, 04/07/2013 11:39 AM

mmaffine2dellipse_test.jpg (24.1 KB) Marek Grudzinski, 04/07/2013 11:39 AM

mmaffine2dellipse_test2.jpg (24.1 KB) Marek Grudzinski, 04/07/2013 11:39 AM

mmaffine2dpolygon_test.jpg (23.7 KB) Marek Grudzinski, 04/07/2013 11:39 AM

mmaffine2dangle_test2b.jpg (24.5 KB) Marek Grudzinski, 04/07/2013 11:39 AM

Mmcoordinatesystem_test Mmcoordinatesystem_test2 Mmcoordinatesystem_test3 Mmcoordinatesystem_test4 Mmaffine2dpoint_test Mmaffine2dpoint_test2 Mmaffine2dlinesegment_test Mmaffine2dlinesegment_test2 Mmaffine2dray_test Mmaffine2dline_test Mmaffine2dangle_test Mmaffine2dangle_test2 Mmaffine2dellipse_test Mmaffine2dellipse_test2 Mmaffine2dpolygon_test Mmaffine2dangle_test2b
Add picture from clipboard (Maximum size: 500 MB)