Package org.jlab.geom.prim
Class Helix3D
java.lang.Object
org.jlab.geom.prim.Helix3D
- All Implemented Interfaces:
- Transformable,- Showable
- Author:
- jnhankins
- 
Constructor SummaryConstructorsConstructorDescriptionHelix3D()Constructs a newHelix3Dcentered around the origin, with its origin point at (1, 0, 0), looping once clockwise up the y-axis and ending at (1, 1, 0).Creates a newHelix3Didentical to the given helix.Helix3D(Point3D origin, Point3D center, Vector3D normal, double totalHeight, double loopHeight, boolean clockwise) Constructs a helix from the given parameters.
- 
Method SummaryModifier and TypeMethodDescriptioncenter()Returns the central point of the helix.booleanReturns true if the helix spirals clockwise around its central axis.voidCopies the parameters of the given helix so this helix is is identical to the given helix.booleanisPointOnHelix(Point3D point) Returns true if the point is on the helix (within 100nm).doubleReturns the distance between winds of the helix.normal()Returns the direction vector of the central axis.origin()Returns the origin point on the helix.point(double height) Returns the point on the helix at the specified height.voidrotateX(double angle) Rotates this object clockwise around the x axis.voidrotateY(double angle) Rotates this object clockwise around the y axis.voidrotateZ(double angle) Rotates this object clockwise around the z axis.voidset(Point3D origin, Point3D center, Vector3D normal, double totalHeight, double loopHeight, boolean clockwise) Sets the parameters of this helix.voidSets the center point of the helix.voidsetClockwise(boolean clockwise) Sets the clockwisedness of the loop.voidsetLoopHeight(double loopHeight) Sets the distance between winds of the helix.voidSets the orientation of the central axis of the helix.voidSets the starting point on the helix.voidsetTotalHeight(double totalHeight) Sets the total height of the helix measured along the central axis.voidshow()doubletheta(double height) Returns the angle of the point on the helix at the specified height relative to the origin point around the central axis.toString()doubleReturns the total height of the helix as measured along the central axis.voidtranslateXYZ(double dx, double dy, double dz) Translates this object linearly by the amounts specified.
- 
Constructor Details- 
Helix3Dpublic Helix3D()Constructs a newHelix3Dcentered around the origin, with its origin point at (1, 0, 0), looping once clockwise up the y-axis and ending at (1, 1, 0).
- 
Helix3Dpublic Helix3D(Point3D origin, Point3D center, Vector3D normal, double totalHeight, double loopHeight, boolean clockwise) Constructs a helix from the given parameters.- Parameters:
- origin- the starting point on the helix
- center- a point at the center of the spiral of the helix
- normal- the overall direction of the helix
- totalHeight- the total height of the helix
- loopHeight- the distance between points on the helix after rotating through a full circle
- clockwise- true if the helix orbits clockwise around its central axis
 
- 
Helix3DCreates a newHelix3Didentical to the given helix.- Parameters:
- helix- the helix to copy
 
 
- 
- 
Method Details- 
copyCopies the parameters of the given helix so this helix is is identical to the given helix.- Parameters:
- helix- the helix to copy
 
- 
setpublic void set(Point3D origin, Point3D center, Vector3D normal, double totalHeight, double loopHeight, boolean clockwise) Sets the parameters of this helix.- Parameters:
- origin- the starting point on the helix
- center- a point at the center of the spiral of the helix
- normal- the overall direction of the helix
- totalHeight- the total height of the helix
- loopHeight- the distance between points on the helix after rotating through a full circle
- clockwise- true if the helix orbits clockwise around its central axis
 
- 
setOriginSets the starting point on the helix.- Parameters:
- origin- the origin point
 
- 
setCenterSets the center point of the helix.- Parameters:
- center- the center point
 
- 
setNormalSets the orientation of the central axis of the helix.- Parameters:
- normal- the normal
 
- 
setTotalHeightpublic void setTotalHeight(double totalHeight) Sets the total height of the helix measured along the central axis.- Parameters:
- totalHeight- the total height
 
- 
setLoopHeightpublic void setLoopHeight(double loopHeight) Sets the distance between winds of the helix. The distance between some starting point on the helix and a point arrived at by traveling a complete 360 degrees around a loop the helix.- Parameters:
- loopHeight- the loop height
 
- 
setClockwisepublic void setClockwise(boolean clockwise) Sets the clockwisedness of the loop. If true the loop spirals clockwise around the central axis/normal.- Parameters:
- clockwise- if true then the helix spirals clockwise
 
- 
originReturns the origin point on the helix.- Returns:
- the origin point
 
- 
centerReturns the central point of the helix.- Returns:
- the center point
 
- 
normalReturns the direction vector of the central axis.- Returns:
- the normal vector
 
- 
totalHeightpublic double totalHeight()Returns the total height of the helix as measured along the central axis.- Returns:
- the total height
 
- 
loopHeightpublic double loopHeight()Returns the distance between winds of the helix. The distance between some starting point on the helix and a point arrived at by traveling a complete 360 degrees around a loop the helix.- Returns:
- the loop height
 
- 
clockwisepublic boolean clockwise()Returns true if the helix spirals clockwise around its central axis.- Returns:
- true if the helix spirals clockwise around its central axis
 
- 
pointReturns the point on the helix at the specified height.- Parameters:
- height- the height
- Returns:
- the point on the helix at the specified height.
 
- 
thetapublic double theta(double height) Returns the angle of the point on the helix at the specified height relative to the origin point around the central axis.- Parameters:
- height- the height
- Returns:
- the angle of the point on the helix at that height
 
- 
isPointOnHelixReturns true if the point is on the helix (within 100nm).- Parameters:
- point- the point
- Returns:
- true if the point is on the helix
 
- 
translateXYZpublic void translateXYZ(double dx, double dy, double dz) Description copied from interface:TransformableTranslates this object linearly by the amounts specified.- Specified by:
- translateXYZin 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
 
- 
rotateXpublic void rotateX(double angle) Description copied from interface:TransformableRotates this object clockwise around the x axis.- Specified by:
- rotateXin interface- Transformable
- Parameters:
- angle- rotation angle in radians
 
- 
rotateYpublic void rotateY(double angle) Description copied from interface:TransformableRotates this object clockwise around the y axis.- Specified by:
- rotateYin interface- Transformable
- Parameters:
- angle- rotation angle in radians
 
- 
rotateZpublic void rotateZ(double angle) Description copied from interface:TransformableRotates this object clockwise around the z axis.- Specified by:
- rotateZin interface- Transformable
- Parameters:
- angle- rotation angle in radians
 
- 
showpublic void show()
- 
toString
 
-