java.lang.Object
com.marginallyclever.convenience.bezier3.Bezier3

public class Bezier3 extends Object
3D Bezier curve implementation. All points are in the same space - p1 and p2 are not relative to p0 and p3, respectively. See Wikipedia
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    javax.vecmath.Vector3d
     
    javax.vecmath.Vector3d
     
    javax.vecmath.Vector3d
     
    javax.vecmath.Vector3d
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    javax.vecmath.Vector3d
    interpolate(double i)
    interpolate along the path.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • p0

      public javax.vecmath.Vector3d p0
    • p1

      public javax.vecmath.Vector3d p1
    • p2

      public javax.vecmath.Vector3d p2
    • p3

      public javax.vecmath.Vector3d p3
  • Constructor Details

    • Bezier3

      public Bezier3()
  • Method Details

    • interpolate

      public javax.vecmath.Vector3d interpolate(double i)
      interpolate along the path. This code is slow, intuitive, and it works.
      Parameters:
      i - 0...1 inclusive
      Returns:
      the interpolated Vector3d along the path.