Package eas.math.geometry

Examples of eas.math.geometry.Polygon2D.scale()


    @Override
    public Vector2D getPointInVisualization(Vector3D fieldPos) {
        double scale = env.globalScale();
        Polygon2D b = env.getCurrentViewBox().toPol2D();

        b.scale(Vector2D.NULL_VECTOR, new Vector2D(scale, scale));
        Vector2D pos = new Vector2D(fieldPos.x, fieldPos.y);

        if (env.getVisualizationAngleCenterPoint() != null) {
            pos.rotate(env.getVisualizationAngleCenterPoint(), env.getVisualizationAngleRAD());
        }
View Full Code Here


     * @see eas.simulation.spatial.sim2D.AbstractAgent2D#getShape()
     */
    @Override
    public Polygon2D getAgentShape() {
        Polygon2D p = new Polygon2D(super.getAgentShape());
        p.scale(Vector2D.NULL_VECTOR, new Vector2D(0.5, 0.5));
        return super.getAgentShape();
    }

    /* (non-Javadoc)
     * @see eas.simulation.spatial.sim2D.AbstractAgent2D#getAgentColor()
View Full Code Here

                new Vector2D(this.anfFakt, this.anfFakt),
                new Vector2D(1, 1));
       
        p.translate(versch);
       
        p.scale(
                Vector2D.NULL_VECTOR,
                new Vector2D(1 / this.dicken.get(0), 1 / this.dicken.get(0)));
       
        p.rotate(Vector2D.NULL_VECTOR, winkel);
       
View Full Code Here

    public Polygon2D getPinkBorder() {
        double globalScale = this.globalScale();
        Rectangle2D visibleBox = this.getCurrentViewBox();

        Polygon2D b = visibleBox.toPol2D();
        b.scale(Vector2D.NULL_VECTOR, new Vector2D(globalScale, globalScale));
        Vector2D midTranslation = new Vector2D(screenWidth / 2, screenHeight / 2);
        midTranslation.sub(b.centerPoint());
        Polygon2D bound = visibleBox.toPol2D();
        bound.scale(Vector2D.NULL_VECTOR, new Vector2D(globalScale, globalScale));
        bound.translate(midTranslation);
View Full Code Here

        Polygon2D b = visibleBox.toPol2D();
        b.scale(Vector2D.NULL_VECTOR, new Vector2D(globalScale, globalScale));
        Vector2D midTranslation = new Vector2D(screenWidth / 2, screenHeight / 2);
        midTranslation.sub(b.centerPoint());
        Polygon2D bound = visibleBox.toPol2D();
        bound.scale(Vector2D.NULL_VECTOR, new Vector2D(globalScale, globalScale));
        bound.translate(midTranslation);
        return bound;
    }
   
    private Boolean isDetailedView;
View Full Code Here

        g.setBackground(this.backgroundColor);
        g.clearRect(0, 0, this.field.getWidth(), this.field.getHeight());

        double globalScale = this.globalScale();
        Polygon2D b = visibleBox.toPol2D();
        b.scale(Vector2D.NULL_VECTOR, new Vector2D(globalScale, globalScale));
        Vector2D midTranslation = new Vector2D(screenWidth / 2, screenHeight / 2);
        midTranslation.sub(b.centerPoint());
        Rectangle2D border = new Rectangle2D(
                new Vector2D(screenLeft, screenUp),
                new Vector2D(screenWidth - screenLeft, screenHeight - screenUp));
View Full Code Here

        midTranslation.sub(b.centerPoint());
        Rectangle2D border = new Rectangle2D(
                new Vector2D(screenLeft, screenUp),
                new Vector2D(screenWidth - screenLeft, screenHeight - screenUp));
        Polygon2D bound = visibleBox.toPol2D();
        bound.scale(Vector2D.NULL_VECTOR, new Vector2D(globalScale, globalScale));
        bound.translate(midTranslation);
        g.setColor(Color.red);
        g.drawPolygon(border.toPol());
       
        if (this.pars.getParValueBoolean("PaintPinkBoundingBox?")) {
View Full Code Here

        } else {
            g = g2;
        }
       
        Polygon2D pfeilSpitze = new Polygon2D(ArrowMaster.EINFACHE_SPITZE_1);
        pfeilSpitze.scale(pfeilSpitze.getBoundingBox().middle(), new Vector2D(0.139 / 1.5, 0.139 / 1.5));
        ArrowMaster pfeilMaster = new ArrowMaster(getParCollection());
        double leftBorder = -2;
        double rightBorder = (this.network.getNeuronCount() - 1) * this.distanceBetweenNeurons.x + 2;
       
        for (int i = 0; i < this.network.getNeuronCount(); i++) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.