Package javax.vecmath

Examples of javax.vecmath.Point2d


        OptimizeeProblem testProblem = new TrivialProblem();

        Optimizer optimizer = new Optimizer(testProblem, "test/temp.txt");

        Point2d solutionPosition = new Point2d(TrivialProblem.SOLUTION_VALUE, TrivialProblem.SOLUTION_VALUE);
        OptimizationStrategyType strategy = OptimizationStrategyType.GLOBAL_SAMPLING;

        new OptimizerEvalFrame(optimizer, solutionPosition, strategy, testProblem);
    }
View Full Code Here


    public Point2d getRawPoint(int i) {
        return rawPoints_.get(i);
    }

    public Point getScaledPoint(int i) {
        Point2d pt = rawPoints_.get(i);
        return new Point(getScaledXValue(pt.x), getScaledYValue(pt.y));
        //return scaledPoints_.get(i);
    }
View Full Code Here

        if (rangeX == null) {
            rangeX = new Range(xParam.getMinValue(), xParam.getMaxValue());
            rangeY = new Range(yParam.getMinValue(), yParam.getMaxValue());
        }

        rawPoints_.add(new Point2d(xParam.getValue(), yParam.getValue()));
    }
View Full Code Here

        g2.setRenderingHint(
                RenderingHints.KEY_ANTIALIASING,
                useAntialiasing_ ? RenderingHints.VALUE_ANTIALIAS_ON : RenderingHints.VALUE_ANTIALIAS_OFF );

        Point2d newCenter = snake_.getCenter();
        Vector2d distanceDelta = new Vector2d( oldCenter_.x - newCenter.x, oldCenter_.y - newCenter.y );
        velocity_ = distanceDelta.length() / (getNumStepsPerFrame() * timeStep_);
        distance_.add( distanceDelta );

        BackgroundGridRenderer bgRenderer = new BackgroundGridRenderer(gridColor_);
View Full Code Here

    /**
     * @return the center point of the snake
     */
    public Point2d getCenter() {
        Point2d center = new Point2d( 0.0, 0.0 );
        int ct = 0;
        for ( int i = 0; i < snakeData_.getNumSegments(); i += 2 ) {
            ct++;
            center.add( segment_[i].getCenterParticle() );
        }
        center.scale( 1.0 / (double) ct );
        return center;
    }
View Full Code Here

    public Point2d getRawPoint(int i) {
        return rawPoints_.get(i);
    }

    public Point getScaledPoint(int i) {
        Point2d pt = rawPoints_.get(i);
        return new Point(getScaledXValue(pt.x), getScaledYValue(pt.y));
        //return scaledPoints_.get(i);
    }
View Full Code Here

        if (rangeX == null) {
            rangeX = new Range(xParam.getMinValue(), xParam.getMaxValue());
            rangeY = new Range(yParam.getMinValue(), yParam.getMaxValue());
        }

        rawPoints_.add(new Point2d(xParam.getValue(), yParam.getValue()));
    }
View Full Code Here

    final double llLon = ((Math.floor(index / numYPosts) * 360.0) / numXPosts) - 180.0;
    final double llLat = (((index % numYPosts) * 180.0) / numYPosts) - 90.0;
    final double urLon = llLon + (360.0 / numXPosts);
    final double urLat = llLat + (180.0 / numYPosts);
    return new Point2d[] {
      new Point2d(
          llLon,
          llLat),
      new Point2d(
          urLon,
          urLat)
    };
  }
View Full Code Here

    final double llLon = ((Math.floor(index / numYPosts) * 360.0) / numXPosts) - 180.0;
    final double llLat = (((index % numYPosts) * 180.0) / numYPosts) - 90.0;
    final double urLon = llLon + (360.0 / numXPosts);
    final double urLat = llLat + (180.0 / numYPosts);
    return new Point2d[] {
      new Point2d(
          llLon,
          llLat),
      new Point2d(
          urLon,
          urLat)
    };
  }
View Full Code Here

        JChemPaintPanel panel = (JChemPaintPanel)jcppanel.target;
        applet.button("hexagon").click();
        applet.click();
        applet.panel("renderpanel").robot.click(applet.panel("renderpanel").component(), new Point(100,100), MouseButton.LEFT_BUTTON,1);
        applet.button("eraser").click();
        Point2d moveto=getAtomPoint(panel,0,1);
        applet.panel("renderpanel").robot.click(applet.panel("renderpanel").component(), new Point((int)moveto.x, (int)moveto.y), MouseButton.LEFT_BUTTON,1);
        moveto=getAtomPoint(panel,0,1);
        applet.panel("renderpanel").robot.click(applet.panel("renderpanel").component(), new Point((int)moveto.x, (int)moveto.y), MouseButton.LEFT_BUTTON,1);
        moveto=getAtomPoint(panel,0,1);
        applet.panel("renderpanel").robot.click(applet.panel("renderpanel").component(), new Point((int)moveto.x, (int)moveto.y), MouseButton.LEFT_BUTTON,1);
View Full Code Here

TOP

Related Classes of javax.vecmath.Point2d

Copyright © 2018 www.massapicom. 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.