org.jscience.mathematics.geometry
Class Polyline3D

java.lang.Object
  extended by org.jscience.mathematics.geometry.GeometryElement
      extended by org.jscience.mathematics.geometry.AbstractParametricCurve
          extended by org.jscience.mathematics.geometry.ParametricCurve3D
              extended by org.jscience.mathematics.geometry.BoundedCurve3D
                  extended by org.jscience.mathematics.geometry.Polyline3D
All Implemented Interfaces:
java.io.Serializable

public class Polyline3D
extends BoundedCurve3D

�R���� : �|�����C����\���N���X?B

�|�����C����?A?ߓ_�̗� points �� �‚����`�����ۂ���\���t���O closed �Œ�`�����?B

closed �̒l�� true �ł���Ε‚����`���Ƃ���?Afalse �ł���ΊJ�����`���Ƃ��Ĉ�����?B �‚����`���̃|�����C����?A ?��?�?���?Ō��?ߓ_�싂�?�����̂Ƃ��Ĉ�����?B

�|�����C���̃p���??[�^��`���?A ��?ڂ���?ߓ_�̊Ԃ̃p���??[�^��Ԃ̑傫����?�� 1 �Ƃ���?A ��?�S��ł� [0, N] �ƂȂ�?B ������ N ��?A �|�����C�����J�����`���ł���� (?ߓ_��?� - 1)?A �‚����`���ł���� (?ߓ_��?�) �ɂȂ�?B

t ��p���??[�^�Ƃ���|�����C�� P(t) �̃p���?�g���b�N�\����?A�ȉ��̒ʂ�?B

        P(t) = (1 - (t - s)) * points[s] + (t - s) * points[s + 1]
 
������ s �� t ��z���Ȃ�?ő��?�?�?B

See Also:
Serialized Form

Constructor Summary
Polyline3D(BoundedCurve3D curve, ToleranceForDistance tol)
          �^����ꂽ�L� �?
Polyline3D(ParametricCurve3D curve, ParameterSection pint, ToleranceForDistance tol)
          �^����ꂽ��?
Polyline3D(Point3D[] points)
          ?
Polyline3D(Point3D[] points, boolean closed)
          ?
 
Method Summary
 boolean closed()
          ���̃|�����C�����‚����`���ł��邩�ۂ���Ԃ�?
 Point3D coordinates(double param)
          ���̋�?
 CurveCurvature3D curvature(double param)
          ���̋�?
protected  ParametricCurve3D doTransformBy(boolean reverseTransform, CartesianTransformationOperator3D transformationOperator, java.util.Hashtable transformedGeometries)
          ���̋�?
 Point3D endPoint()
          ���̗L� �?
 CurveDerivative3D evaluation(double param)
          ���̋�?
protected  boolean hasPolyline()
          ���̋�?
 PointOnCurve3D[] inflexion()
          ���̋�?
 CurveCurveInterference3D[] interfere(BoundedCurve3D mate)
          ���̗L� �?
 IntersectionPoint3D[] intersect(ParametricCurve3D mate)
          ���̋�?
 IntersectionPoint3D[] intersect(ParametricSurface3D mate)
          ���̋�?
protected  boolean isComposedOfOnlyPolylines()
          ���̋�?
 boolean isFreeform()
          ���̊􉽗v�f�����R�`?
 double length(ParameterSection pint)
          �^����ꂽ�p���??
 int nPoints()
          ���̃|�����C����?
 int nSegments()
          ���̃|�����C���̃Z�O�?
protected  void output(java.io.PrintWriter writer, int indent)
          ?
 ParametricCurve3D parallelTranslate(Vector3D moveVec)
          ���̋�?
 Point3D pointAt(int i)
          ���̃|�����C���� i �Ԃ߂�?
 Point3D[] points()
          ���̃|�����C����?
 PointOnCurve3D[] projectFrom(Point3D point)
          �^����ꂽ�_���炱�̋�?
 CurveCurveInterference3D[] selfInterfere()
          ���̃|�����C���̎��Ȋ�?
 IntersectionPoint3D[] selfIntersect()
          ���̃|�����C���̎��Ȍ�?
 PointOnCurve3D[] singular()
          ���̋�?
 Point3D startPoint()
          ���̗L� �?
 Vector3D tangentVector(double param)
          ���̋�?
 BoundedLine3D[] toBoundedLines()
          ���̃|�����C���S�̂�?
 BoundedLine3D[] toBoundedLines(ParameterSection pint)
          ���̃|�����C���̎w��̋�Ԃ�?
 BsplineCurve3D toBsplineCurve()
          ���̗L� �?
 BsplineCurve3D toBsplineCurve(ParameterSection pint)
          ���̋�?
 Polyline3D toPolyline(ParameterSection pint, ToleranceForDistance tol)
          ���̋�?
 double torsion(double param)
          ���̋�?
 
Methods inherited from class org.jscience.mathematics.geometry.BoundedCurve3D
length, toPolyline
 
Methods inherited from class org.jscience.mathematics.geometry.ParametricCurve3D
checkProjection, dimension, identicalParameter, is3D, nearestProjectFrom, nearestProjectWithDistanceFrom, pointToParameter, reverseTransformBy, transformBy, transformBy
 
Methods inherited from class org.jscience.mathematics.geometry.AbstractParametricCurve
checkValidity, checkValidity, isClosed, isCurve, isFinite, isInfinite, isNonPeriodic, isOpen, isParametric, isPeriodic, isValid, parameterDomain
 
Methods inherited from class org.jscience.mathematics.geometry.GeometryElement
getClassName, getToleranceForAngle, getToleranceForAngleAsObject, getToleranceForDistance, getToleranceForDistance2, getToleranceForDistanceAsObject, getToleranceForParameter, getToleranceForParameterAsObject, getToleranceForRealNumber, getToleranceForRealNumberAsObject, is1D, is2D, isPlacement, isPoint, isSurface, isTransformationOperator, isVector, makeIndent, output
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Polyline3D

public Polyline3D(Point3D[] points,
                  boolean closed)
?ߓ_�ƕ‚����`�����ۂ���\���t���O��^���ăI�u�W�F�N�g��?\�z����?B

closed �� false ��?�?�?A points �̗v�f?��� 2 ���?�������� InvalidArgumentValueException �̗�O��?�����?B

closed �� true ��?�?�?A points �̗v�f?��� 3 ���?�������� InvalidArgumentValueException �̗�O��?�����?B

Parameters:
points - ?ߓ_�̔z��
closed - �‚��Ă��邩�ۂ���\���t���O
See Also:
InvalidArgumentValueException

Polyline3D

public Polyline3D(Point3D[] points)
?ߓ_��^���ĊJ�����`���Ƃ��ăI�u�W�F�N�g��?\�z����?B

points �̗v�f?��� 2 ���?�������� InvalidArgumentValueException �̗�O��?�����?B

Parameters:
points - ?ߓ_�̔z��
See Also:
InvalidArgumentValueException

Polyline3D

public Polyline3D(BoundedCurve3D curve,
                  ToleranceForDistance tol)
�^����ꂽ�L� �?��w��̋��e��?��Œ�?�ߎ������̂Ƃ��ăI�u�W�F�N�g��?\�z����?B

Parameters:
curve - ��?�
tol - �����̋��e��?�
See Also:
BoundedCurve3D.toPolyline(ToleranceForDistance)

Polyline3D

public Polyline3D(ParametricCurve3D curve,
                  ParameterSection pint,
                  ToleranceForDistance tol)
�^����ꂽ��?�̎w��̋�Ԃ�w��̋��e��?��Œ�?�ߎ������̂Ƃ��ăI�u�W�F�N�g��?\�z����?B

Parameters:
curve - ��?�
pint - ��?�ߎ�����p���??[�^���
tol - �����̋��e��?�
See Also:
ParametricCurve3D.toPolyline(ParameterSection,ToleranceForDistance)
Method Detail

points

public Point3D[] points()
���̃|�����C����?ߓ_�̔z���Ԃ�?B

Returns:
?ߓ_�̔z��

pointAt

public Point3D pointAt(int i)
���̃|�����C���� i �Ԃ߂�?ߓ_��Ԃ�?B

���̃|�����C�����‚����`����?Ai ��?ߓ_��?��ɓ�����?�?���?A0 �Ԗڂ�?ߓ_��Ԃ�?B

Returns:
i �Ԃ߂�?ߓ_

closed

public boolean closed()
���̃|�����C�����‚����`���ł��邩�ۂ���Ԃ�?B

Returns:
�‚����`���ł���� true?A����Ȃ��� false

nPoints

public int nPoints()
���̃|�����C����?ߓ_��?���Ԃ�?B

Returns:
?ߓ_��?�

nSegments

public int nSegments()
���̃|�����C���̃Z�O�?���g��?���Ԃ�?B

���̃|�����C�����‚����`���ł����?A �Z�O�?���g��?���?ߓ_��?��ɓ�����?B �J�����`���ł���� (?ߓ_��?� - 1) ��Ԃ�?B

Returns:
�Z�O�?���g��?�

length

public double length(ParameterSection pint)
�^����ꂽ�p���??[�^��Ԃɂ����邱�̋�?�̎ ��?�ł̒��� (���̂�) ��Ԃ�?B

pint �̑?���l�͕��ł©�܂�Ȃ�?B

�^����ꂽ�p���??[�^��Ԃ���`���O��Ă���?�?��ɂ�?A ParameterOutOfRange �̗�O��?�����?B

Specified by:
length in class AbstractParametricCurve
Parameters:
pint - ��?�̒�����?�߂�p���??[�^���
Returns:
�w�肳�ꂽ�p���??[�^��Ԃɂ������?�̒���
See Also:
ParameterOutOfRange

coordinates

public Point3D coordinates(double param)
���̋�?��?A�^����ꂽ�p���??[�^�l�ł�?W�l��Ԃ�?B

�^����ꂽ�p���??[�^��Ԃ���`���O��Ă���?�?��ɂ�?A ParameterOutOfRange �̗�O��?�����?B

Specified by:
coordinates in class ParametricCurve3D
Parameters:
param - �p���??[�^�l
Returns:
?W�l
See Also:
AbstractParametricCurve.checkValidity(double), ParameterOutOfRange

tangentVector

public Vector3D tangentVector(double param)
���̋�?��?A�^����ꂽ�p���??[�^�l�ł�?ڃx�N�g����Ԃ�?B

�^����ꂽ�p���??[�^��Ԃ���`���O��Ă���?�?��ɂ�?A ParameterOutOfRange �̗�O��?�����?B

Specified by:
tangentVector in class ParametricCurve3D
Parameters:
param - �p���??[�^�l
Returns:
?ڃx�N�g��
See Also:
AbstractParametricCurve.checkValidity(double), ParameterOutOfRange

curvature

public CurveCurvature3D curvature(double param)
���̋�?��?A�^����ꂽ�p���??[�^�l�ł̋ȗ���Ԃ�?B

�|�����C���̋ȗ���?A?�� 0 �ł���?B

�^����ꂽ�p���??[�^��Ԃ���`���O��Ă���?�?��ɂ�?A ParameterOutOfRange �̗�O��?�����?B

Specified by:
curvature in class ParametricCurve3D
Parameters:
param - �p���??[�^�l
Returns:
�ȗ�
See Also:
AbstractParametricCurve.checkValidity(double), ParameterOutOfRange

torsion

public double torsion(double param)
���̋�?��?A�^����ꂽ�p���??[�^�l�ł̃��C����Ԃ�?B

�|�����C���̃��C����?A?�� 0 �ł���?B

�^����ꂽ�p���??[�^��Ԃ���`���O��Ă���?�?��ɂ�?A ParameterOutOfRange �̗�O��?�����?B

Specified by:
torsion in class ParametricCurve3D
Parameters:
param - �p���??[�^�l
Returns:
���C��
See Also:
AbstractParametricCurve.checkValidity(double), ParameterOutOfRange

evaluation

public CurveDerivative3D evaluation(double param)
���̋�?��?A�^����ꂽ�p���??[�^�l�ł̓���?���Ԃ�?B

�^����ꂽ�p���??[�^��Ԃ���`���O��Ă���?�?��ɂ�?A ParameterOutOfRange �̗�O��?�����?B

Specified by:
evaluation in class ParametricCurve3D
Parameters:
param - �p���??[�^�l
Returns:
����?�
See Also:
AbstractParametricCurve.checkValidity(double), ParameterOutOfRange

singular

public PointOnCurve3D[] singular()
���̋�?�̓Hٓ_��Ԃ�?B

�Hٓ_����?݂��Ȃ��Ƃ��͒��� 0 �̔z���Ԃ�?B

Specified by:
singular in class ParametricCurve3D
Returns:
�Hٓ_�̔z��

inflexion

public PointOnCurve3D[] inflexion()
���̋�?�̕ϋȓ_��Ԃ�?B

�|�����C���ɂ͕ϋȓ_�͑�?݂��Ȃ���̂Ƃ���?A���� 0 �̔z���Ԃ�?B

Specified by:
inflexion in class ParametricCurve3D
Returns:
�ϋȓ_�̔z��

projectFrom

public PointOnCurve3D[] projectFrom(Point3D point)
�^����ꂽ�_���炱�̋�?�ւ̓��e�_��?�߂�?B

���e�_����?݂��Ȃ��Ƃ��͒��� 0 �̔z���Ԃ�?B

Specified by:
projectFrom in class ParametricCurve3D
Parameters:
point - ���e���̓_
Returns:
���e�_

toPolyline

public Polyline3D toPolyline(ParameterSection pint,
                             ToleranceForDistance tol)
���̋�?�̎w��̋�Ԃ�?A�^����ꂽ��?��Œ�?�ߎ�����|�����C����Ԃ�?B

���ʂƂ��ĕԂ����|�����C����?\?�����_�� ���̋�?��x?[�X�Ƃ��� PointOnCurve3D �� ���邱�Ƃ��҂ł���?B

Specified by:
toPolyline in class ParametricCurve3D
Parameters:
pint - ��?�ߎ�����p���??[�^���
tol - �����̋��e��?�
Returns:
���̋�?�̎w��̋�Ԃ�?�ߎ�����|�����C��
See Also:
PointOnCurve3D

toBsplineCurve

public BsplineCurve3D toBsplineCurve()
���̗L� �?�S�̂쵖���?Č�����L�? Bspline ��?��Ԃ�?B

Overrides:
toBsplineCurve in class BoundedCurve3D
Returns:
���̋�?�S�̂�?Č�����L�? Bspline ��?�

toBsplineCurve

public BsplineCurve3D toBsplineCurve(ParameterSection pint)
���̋�?�̎w��̋�Ԃ쵖���?Č�����L�? Bspline ��?��Ԃ�?B

Specified by:
toBsplineCurve in class ParametricCurve3D
Parameters:
pint - �L�? Bspline ��?��?�����p���??[�^���
Returns:
���̋�?�̎w��̋�Ԃ�?Č�����L�? Bspline ��?�

intersect

public IntersectionPoint3D[] intersect(ParametricCurve3D mate)
                                throws IndefiniteSolutionException
���̋�?�Ƒ��̋�?�̌�_��?�߂�?B

��_����?݂��Ȃ��Ƃ��͒��� 0 �̔z���Ԃ�?B

Specified by:
intersect in class ParametricCurve3D
Parameters:
mate - ���̋�?�
Returns:
��_�̔z��
Throws:
IndefiniteSolutionException - �⪕s��ł���

intersect

public IntersectionPoint3D[] intersect(ParametricSurface3D mate)
���̋�?�Ƒ��̋Ȗʂ̌�_��?�߂�?B

��_����?݂��Ȃ��Ƃ��͒��� 0 �̔z���Ԃ�?B

Specified by:
intersect in class ParametricCurve3D
Parameters:
mate - ���̋Ȗ�
Returns:
��_�̔z��

interfere

public CurveCurveInterference3D[] interfere(BoundedCurve3D mate)
���̗L� �?�Ƒ��̗L� �?�̊�?‚�?�߂�?B

��?‚���?݂��Ȃ�?�?��ɂ͒��� 0 �̔z���Ԃ�?B

Specified by:
interfere in class BoundedCurve3D
Parameters:
mate - ���̋�?�
Returns:
���?�̊�?‚̔z��

selfIntersect

public IntersectionPoint3D[] selfIntersect()
���̃|�����C���̎��Ȍ�?��_��?�߂�?B

���Ȍ�?�����?݂��Ȃ��Ƃ��͒��� 0 �̔z���Ԃ�?B

Returns:
���Ȍ�?��_�̔z��

selfInterfere

public CurveCurveInterference3D[] selfInterfere()
���̃|�����C���̎��Ȋ�?‚�?�߂�?B

���Ȋ�?‚���?݂��Ȃ��Ƃ��͒��� 0 �̔z���Ԃ�?B

Returns:
���Ȋ�?‚̔z��

parallelTranslate

public ParametricCurve3D parallelTranslate(Vector3D moveVec)
���̋�?��?A�^����ꂽ�x�N�g����?]�Bĕ�?s�ړ�������?��Ԃ�?B

Specified by:
parallelTranslate in class ParametricCurve3D
Parameters:
moveVec - ��?s�ړ��̕��Ɨʂ�\���x�N�g��
Returns:
��?s�ړ���̋�?�

isFreeform

public boolean isFreeform()
���̊􉽗v�f�����R�`?󂩔ۂ���Ԃ�?B

Overrides:
isFreeform in class GeometryElement
Returns:
?�� true

startPoint

public Point3D startPoint()
���̗L� �?�̊J�n�_��Ԃ�?B

��?�‚����`����?�?��� null ��Ԃ�?B

Overrides:
startPoint in class BoundedCurve3D
Returns:
�J�n�_

endPoint

public Point3D endPoint()
���̗L� �?��?I���_��Ԃ�?B

��?�‚����`����?�?��� null ��Ԃ�?B

Overrides:
endPoint in class BoundedCurve3D
Returns:
?I���_

toBoundedLines

public BoundedLine3D[] toBoundedLines(ParameterSection pint)
���̃|�����C���̎w��̋�Ԃ�?��ɕϊ�����?B

Parameters:
pint - ?��ɕϊ�����p���??[�^���
Returns:
�w�肳�ꂽ��Ԃ�ϊ�����?��

toBoundedLines

public BoundedLine3D[] toBoundedLines()
���̃|�����C���S�̂�?��ɕϊ�����?B

Returns:
��?�S�̂�ϊ�����?��

doTransformBy

protected ParametricCurve3D doTransformBy(boolean reverseTransform,
                                          CartesianTransformationOperator3D transformationOperator,
                                          java.util.Hashtable transformedGeometries)
���̋�?��?A�^����ꂽ�􉽓I�ϊ����Z�q�ŕϊ�����?B

transformedGeometries ��?A �ϊ��O�̊􉽗v�f��L?[�Ƃ�?A �ϊ���̊􉽗v�f��l�Ƃ���n�b�V���e?[�u���ł���?B

this �� transformedGeometries ��ɃL?[�Ƃ��đ�?݂��Ȃ�?�?��ɂ�?A this �� transformationOperator �ŕϊ�������̂�Ԃ�?B ����?ۂɃ?�\�b�h�Ք�ł� this ��L?[?A �ϊ����ʂ�l�Ƃ��� transformedGeometries �ɒljB���?B

this �� transformedGeometries ��Ɋ�ɃL?[�Ƃ��đ�?݂���?�?��ɂ�?A ��?ۂ̕ϊ���?s�Ȃ킸?A���̃L?[�ɑΉ�����l��Ԃ�?B ����?��?��?ċA�I��?s�Ȃ���?B

transformedGeometries �� null �ł�?\��Ȃ�?B transformedGeometries �� null ��?�?��ɂ�?A ?�� this �� transformationOperator �ŕϊ�������̂�Ԃ�?B

Specified by:
doTransformBy in class ParametricCurve3D
Parameters:
reverseTransform - �t�ϊ�����̂ł���� true?A�����łȂ���� false
transformationOperator - �􉽓I�ϊ����Z�q
transformedGeometries - ��ɓ��l�̕ϊ���{�����􉽗v�f��܂ރn�b�V���e?[�u��
Returns:
�ϊ���̊􉽗v�f

hasPolyline

protected boolean hasPolyline()
���̋�?�|�����C���̕�����܂ނ��ۂ���Ԃ�?B

Overrides:
hasPolyline in class ParametricCurve3D
Returns:
���̋�?�|�����C���ł��邩?A �܂��͎�?g��?\?����镔�i�Ƃ��ă|�����C����܂ނȂ�� true?A �����łȂ���� false

isComposedOfOnlyPolylines

protected boolean isComposedOfOnlyPolylines()
���̋�?�|�����C���̕��������łł��Ă��邩�ۂ���Ԃ�?B

Overrides:
isComposedOfOnlyPolylines in class ParametricCurve3D
Returns:
���̋�?�|�����C���ł��邩?A �܂��͎�?g��?\?����镔�i�Ƃ��ă|�����C��������܂ނȂ�� true?A �����łȂ���� false

output

protected void output(java.io.PrintWriter writer,
                      int indent)
?o�̓X�g��?[���Ɍ`?�?���?o�͂���?B

Specified by:
output in class GeometryElement
Parameters:
writer - PrintWriter
indent - �C���f���g��?[��
See Also:
GeometryElement