Class Arc3D

java.lang.Object
org.jlab.geom.prim.Arc3D
All Implemented Interfaces:
Transformable, Showable

public final class Arc3D extends Object implements Transformable, Showable
An arc represented by a point at the center of the circle subtended by the arc, a point at the origin/beginning of the arc, the normal of the circle of the arc, and an angle theta which is the angle subtended by the arc clockwise around the normal.
Author:
jnhankins
  • Constructor Summary Link icon

    Constructors
    Constructor
    Description
    Constructs a new Arc3D from point centered around the origin with a unit radius in the xy plane such that the origin point is at (1, 0, 0) and the end point is at (0, 1, 0).
    Arc3D(Arc3D arc)
    Constructs a new Arc3D that is identical to the given arc.
    Arc3D(Point3D origin, Point3D center, Vector3D normal, double theta)
    Constructs a new Arc3D from the given parameters.
  • Method Summary Link icon

    Modifier and Type
    Method
    Description
     
    Returns the center point of the circle of the arc.
    void
    copy(Arc3D arc)
    Sets the core parameters of this Arc3D to be equal to those of the given arc such that this arc will coincide with the given arc.
    end()
    Constructs a new Point3D at the end of this arc.
    Constructs a new Vector3D from the center point of the circle of the arc to the end point on the arc.
    Returns the vector normal to the circle of the arc.
    Returns the origin point of this arc.
    Constructs a new Vector3D from the center point of the cirlce of the arc to the origin point on the arc.
    point(double t)
    Constructs a new Point3D object by using the given value as the parameter for the parametric equation describing this arc.
    double
    Returns the radius of the arc.
    void
    rotateX(double angle)
    Rotates this object clockwise around the x axis.
    void
    rotateY(double angle)
    Rotates this object clockwise around the y axis.
    void
    rotateZ(double angle)
    Rotates this object clockwise around the z axis.
    void
    set(Point3D origin, Point3D center, Vector3D normal, double theta)
    Sets the core parameters of this arc to equal the given parameters.
    void
    Sets the center point of the circle of the arc.
    void
    Sets the normal of the circle of the arc.
    void
    Sets the origin point at the beginning of the arc.
    void
    setRadius(double radius)
    Sets the radius of the arc.
    void
    setTheta(double theta)
    Sets the angle subtended by the arc.
    void
    Invokes System.out.println(this).
    double
    Returns the angle subtended by the arc.
     
    void
    translateXYZ(double dx, double dy, double dz)
    Translates this object linearly by the amounts specified.

    Methods inherited from class java.lang.Object Link icon

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details Link icon

    • Arc3D Link icon

      public Arc3D()
      Constructs a new Arc3D from point centered around the origin with a unit radius in the xy plane such that the origin point is at (1, 0, 0) and the end point is at (0, 1, 0).
    • Arc3D Link icon

      public Arc3D(Point3D origin, Point3D center, Vector3D normal, double theta)
      Constructs a new Arc3D from the given parameters.
      Parameters:
      origin - the origin point on the arc
      center - the center point of the circle the arc
      normal - the normal vector of the circle of the arc
      theta - the angle subtended by the arc
    • Arc3D Link icon

      public Arc3D(Arc3D arc)
      Constructs a new Arc3D that is identical to the given arc.
      Parameters:
      arc - the arc to copy
  • Method Details Link icon

    • copy Link icon

      public void copy(Arc3D arc)
      Sets the core parameters of this Arc3D to be equal to those of the given arc such that this arc will coincide with the given arc.
      Parameters:
      arc - the arc to copy
    • set Link icon

      public void set(Point3D origin, Point3D center, Vector3D normal, double theta)
      Sets the core parameters of this arc to equal the given parameters.
      Parameters:
      origin - the origin point on the arc
      center - the center point of the circle the arc
      normal - the normal vector of the circle of the arc
      theta - the angle subtended by the arc
    • setOrigin Link icon

      public void setOrigin(Point3D origin)
      Sets the origin point at the beginning of the arc.
      Parameters:
      origin - the origin point
    • setCenter Link icon

      public void setCenter(Point3D center)
      Sets the center point of the circle of the arc.
      Parameters:
      center - the center point of the circle
    • setNormal Link icon

      public void setNormal(Vector3D normal)
      Sets the normal of the circle of the arc.
      Parameters:
      normal - the normal of the circle of the arc.
    • setTheta Link icon

      public void setTheta(double theta)
      Sets the angle subtended by the arc. This value will be modulated to be within the range (0, 2*PI].
      Parameters:
      theta - the angle subtended by the arc
    • setRadius Link icon

      public void setRadius(double radius)
      Sets the radius of the arc.
      Parameters:
      radius - the radius
    • origin Link icon

      public Point3D origin()
      Returns the origin point of this arc.
      Returns:
      the origin point
    • end Link icon

      public Point3D end()
      Constructs a new Point3D at the end of this arc.
      Returns:
      the end point
    • originVector Link icon

      public Vector3D originVector()
      Constructs a new Vector3D from the center point of the cirlce of the arc to the origin point on the arc.
      Returns:
      a vector from the center to the arc's origin point
    • endVector Link icon

      public Vector3D endVector()
      Constructs a new Vector3D from the center point of the circle of the arc to the end point on the arc.
      Returns:
      a vector from the center to the arc's end point
    • center Link icon

      public Point3D center()
      Returns the center point of the circle of the arc.
      Returns:
      the center point of the circle
    • normal Link icon

      public Vector3D normal()
      Returns the vector normal to the circle of the arc.
      Returns:
      the normal vector
    • radius Link icon

      public double radius()
      Returns the radius of the arc.
      Returns:
      the radius
    • theta Link icon

      public double theta()
      Returns the angle subtended by the arc.
      Returns:
      the angle subtended
    • point Link icon

      public Point3D point(double t)
      Constructs a new Point3D object by using the given value as the parameter for the parametric equation describing this arc. If the value is zero, then the returned point coincides with the origin point. If the value is equal to theta, then the returned point coincides with the end point.
      Parameters:
      t - the parametric parameter
      Returns:
      the point
    • bisect Link icon

      public Vector3D bisect()
    • translateXYZ Link icon

      public void translateXYZ(double dx, double dy, double dz)
      Description copied from interface: Transformable
      Translates this object linearly by the amounts specified.
      Specified by:
      translateXYZ in interface Transformable
      Parameters:
      dx - amount to translate along the x axis
      dy - amount to translate along the y axis
      dz - amount to translate along the z axis
    • rotateX Link icon

      public void rotateX(double angle)
      Description copied from interface: Transformable
      Rotates this object clockwise around the x axis.
      Specified by:
      rotateX in interface Transformable
      Parameters:
      angle - rotation angle in radians
    • rotateY Link icon

      public void rotateY(double angle)
      Description copied from interface: Transformable
      Rotates this object clockwise around the y axis.
      Specified by:
      rotateY in interface Transformable
      Parameters:
      angle - rotation angle in radians
    • rotateZ Link icon

      public void rotateZ(double angle)
      Description copied from interface: Transformable
      Rotates this object clockwise around the z axis.
      Specified by:
      rotateZ in interface Transformable
      Parameters:
      angle - rotation angle in radians
    • show Link icon

      public void show()
      Invokes System.out.println(this).
      Specified by:
      show in interface Showable
    • toString Link icon

      public String toString()
      Overrides:
      toString in class Object