src/main/java/de/javagl/geom/Points.java
/**
     * Interpolates linearly between the specified points, and stores the
     * result in the given result point. If the given result point 
     * is <code>null</code>, a new point will be created and returned.
     * 
     * @param x0 The x-coordinate of the first point
     * @param y0 The y-coordinate of the first point
     * @param x1 The x-coordinate of the second point
     * @param y1 The y-coordinate of the second point
     * @param alpha The position between the points (usually between 0 and 1)
     * @param result The result
     * @return The result
     */
Interpolates linearly between the specified points, and stores the
result in the given result point. If the given result point
is null, a new point will be created and returned.


Interpolates linearly between the specified points and stores the result in the given result point . If the given result point is null a new point will be created and returned .
public static Point2D interpolate(
        double x0, double y0, double x1, double y1, 
        double alpha, Point2D result)
    {
        if (result == null)
        {
            result = new Point2D.Double();
        }
        double dx = x1 - x0;
        double dy = y1 - y0;
        result.setLocation(x0 + alpha * dx, y0 + alpha * dy);
        return result;
    }
public static Point2D interpolate ( double x0 , double y0 , double x1 , double y1 , double alpha , Point2D result ) { if ( result == null ) { result = new Point2D . Double ( ) ; } double dx = x1 - x0 ; double dy = y1 - y0 ; result . setLocation ( x0 + alpha * dx , y0 + alpha * dy ) ; return result ; }
Interpolates linearly between the specified points, and stores the
 result in the given result point.
Interpolates linearly between the specified points and stores the result in the given result point .