org.jscience.mathematics.geometry
Class CompositeCurve2D

java.lang.Object
  extended by org.jscience.mathematics.geometry.GeometryElement
      extended by org.jscience.mathematics.geometry.AbstractParametricCurve
          extended by org.jscience.mathematics.geometry.ParametricCurve2D
              extended by org.jscience.mathematics.geometry.BoundedCurve2D
                  extended by org.jscience.mathematics.geometry.CompositeCurve2D
All Implemented Interfaces:
java.io.Serializable

public class CompositeCurve2D
extends BoundedCurve2D

�Q���� : ��?���?��\���N���X?B

��?���?�Ƃ�?A (�[�_�ŘA������) ��‚��̗L� �?��܂Ƃ߂� ��{�̋�?�Ɍ����Ă���̂ł���?B

���̃N���X�̃C���X�^���X��?A

��ێ?����?B

��?���?�̒�`��͗L��?A ��?���?�‚����`���ł���Ύ��I?A �����łȂ���Δ���I�Ȃ�̂ɂȂ�?B �p���??[�^��`��� [0, (�Z�O�?���g�̃p���??[�^��Ԃ̑?���l�̑?�a)] �ɂȂ�?B

See Also:
CompositeCurveSegment2D, Serialized Form

Constructor Summary
CompositeCurve2D(BoundedCurve2D[] segments, boolean[] sense)
          �Z�O�?
CompositeCurve2D(CompositeCurveSegment2D[] segments, boolean periodic)
          �Z�O�?
 
Method Summary
 CommonNormal2D[] commonNormal(ParametricCurve2D mate)
          ���̋�?
 CommonTangent2D[] commonTangent(ParametricCurve2D mate)
          ���̋�?
 Point2D coordinates(double param)
          ���̋�?
 CurveCurvature2D curvature(double param)
          ���̋�?
 CompositeCurve2D[] divideIntoSimpleLoopsIfClosed(int cmcWise, int validSide)
          �‚�����?
protected  ParametricCurve2D doTransformBy(boolean reverseTransform, CartesianTransformationOperator2D transformationOperator, java.util.Hashtable transformedGeometries)
          ���̋�?
 Point2D endPoint()
          ���̕�?
 CurveDerivative2D evaluation(double param)
          ���̋�?
protected  boolean hasPolyline()
          ���̋�?
 PointOnCurve2D[] inflexion()
          ���̋�?
 CurveCurveInterference2D[] interfere(BoundedCurve2D mate)
          ���̗L� �?
 IntersectionPoint2D[] intersect(ParametricCurve2D mate)
          ���̋�?
protected  boolean isComposedOfOnlyPolylines()
          ���̋�?
 boolean isFreeform()
          ���̊􉽗v�f�����R�`?
 double length(ParameterSection pint)
          �^����ꂽ�p���??
 int nSegments()
          ���̕�?
 BoundedCurve2D offsetByBoundedCurve(ParameterSection pint, double magni, int side, ToleranceForDistance tol)
          ���̋�?
 BsplineCurve2D offsetByBsplineCurve(ParameterSection pint, double magni, int side, ToleranceForDistance tol)
          ���̋�?
 CompositeCurve2D offsetByCompositeCurve(ParameterSection pint, double magni, int side, ToleranceForDistance tol)
          ���̋�?
protected  void output(java.io.PrintWriter writer, int indent)
          ?
 boolean periodic()
          ���̕�?
 PointOnCurve2D[] projectFrom(Point2D point)
          �^����ꂽ�_���炱�̋�?
 CompositeCurveSegment2D segmentAt(int ith)
          ���̕�?
 PointOnCurve2D[] singular()
          ���̋�?
 Point2D startPoint()
          ���̕�?
 Vector2D tangentVector(double param)
          ���̋�?
 BsplineCurve2D toBsplineCurve(ParameterSection pint)
          ���̋�?
 Polyline2D toPolyline(ParameterSection pint, ToleranceForDistance tol)
          ���̋�?
 
Methods inherited from class org.jscience.mathematics.geometry.BoundedCurve2D
fillet, length, offsetByBoundedCurve, offsetByBsplineCurve, toBsplineCurve, toPolyline
 
Methods inherited from class org.jscience.mathematics.geometry.ParametricCurve2D
checkProjection, dimension, fillet, identicalParameter, is2D, 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, is3D, 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

CompositeCurve2D

public CompositeCurve2D(CompositeCurveSegment2D[] segments,
                        boolean periodic)
�Z�O�?���g�̔z��ƊJ�ƒt���O��^���ăI�u�W�F�N�g��?\�z����?B

Parameters:
segments - ��?���?��?\?�����Z�O�?���g�̔z��
periodic - �‚����`�����ۂ���\���t���O

CompositeCurve2D

public CompositeCurve2D(BoundedCurve2D[] segments,
                        boolean[] sense)
�Z�O�?���g�̕��?�̔z���^���ăI�u�W�F�N�g��?\�z����?B

segments �̗v�f?��� sense �̗v�f?�����v���Ă��Ȃ�?�?��ɂ� InvalidArgumentValueException �̗�O��?�����?B

���̃R���X�g���N�^�ł� segments[i] �� sense[i] ���� ��?���?�Z�O�?���g (CompositeCurveSegment2D) ��?\�z���邪?A ����?ۂ̊e�Z�O�?���g��?u���̃Z�O�?���g�Ƃ̘A��?�?v�ɂ‚��Ă�?A ���ꂼ��̋�?�̊􉽓I�ȓ�?�����?A�����I�ɔ��f����?B

?Ō�̃Z�O�?���g��?I�_��?�?��̃Z�O�?���g�̎n�_�� ��v���Ă��Ȃ���ΊJ�����`��?A ��v���Ă���Ε‚����`�� �̕�?���?��?\�z����?B

�ׂ�?����Z�O�?���g���􉽓I�ɘA���łȂ�?�?��ɂ� InvalidArgumentValueException �̗�O��?�����?B

Parameters:
segments - ��?���?��?\?�����Z�O�?���g�̕��?�̔z��
sense - ��?���?��?\?�����Z�O�?���g�̌���t���O�̔z��
See Also:
CompositeCurveSegment2D, InvalidArgumentValueException
Method Detail

periodic

public boolean periodic()
���̕�?���?�‚����`�����ۂ���Ԃ�?B

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

nSegments

public int nSegments()
���̕�?���?��?\?�����Z�O�?���g��?���Ԃ�?B

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

segmentAt

public CompositeCurveSegment2D segmentAt(int ith)
���̕�?���?�� ith �Ԗڂ̃Z�O�?���g��Ԃ�?B

Parameters:
ith - �Z�O�?���g�̃C���f�b�N�X
Returns:
ith �Ԗڂ̃Z�O�?���g

startPoint

public Point2D startPoint()
���̕�?���?�̊J�n�_��Ԃ�?B

���̕�?���?�‚����`����?�?��ɂ� null ��Ԃ�?B

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

endPoint

public Point2D endPoint()
���̕�?���?��?I���_��Ԃ�?B

���̕�?���?�‚����`����?�?��ɂ� null ��Ԃ�?B

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

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 Point2D coordinates(double param)
���̋�?��?A�^����ꂽ�p���??[�^�l�ł�?W�l��Ԃ�?B

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

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

tangentVector

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

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

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

curvature

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

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

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

evaluation

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

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

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

singular

public PointOnCurve2D[] singular()
                          throws IndefiniteSolutionException
���̋�?�̓Hٓ_��Ԃ�?B

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

Specified by:
singular in class ParametricCurve2D
Returns:
�Hٓ_�̔z��
Throws:
IndefiniteSolutionException - �⪕s��ł���

inflexion

public PointOnCurve2D[] inflexion()
                           throws IndefiniteSolutionException
���̋�?�̕ϋȓ_��Ԃ�?B

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

Specified by:
inflexion in class ParametricCurve2D
Returns:
�ϋȓ_�̔z��
Throws:
IndefiniteSolutionException - �⪕s��ł���

projectFrom

public PointOnCurve2D[] projectFrom(Point2D point)
                             throws IndefiniteSolutionException
�^����ꂽ�_���炱�̋�?�ւ̓��e�_��?�߂�?B

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

Specified by:
projectFrom in class ParametricCurve2D
Parameters:
point - ���e���̓_
Returns:
���e�_
Throws:
IndefiniteSolutionException - �⪕s��ł���

toPolyline

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

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

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

toBsplineCurve

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

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

intersect

public IntersectionPoint2D[] intersect(ParametricCurve2D mate)
���̋�?�Ƒ��̋�?�̌�_��?�߂�?B

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

Specified by:
intersect in class ParametricCurve2D
Parameters:
mate - ���̋�?�
Returns:
��_�̔z��

interfere

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

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

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

offsetByCompositeCurve

public CompositeCurve2D offsetByCompositeCurve(ParameterSection pint,
                                               double magni,
                                               int side,
                                               ToleranceForDistance tol)
���̋�?�̎w��̋�Ԃ�I�t�Z�b�g������?��?A �^����ꂽ��?��ŋߎ����镡?���?��?�߂�?B

Parameters:
pint - �I�t�Z�b�g����p���??[�^���
magni - �I�t�Z�b�g��
side - �I�t�Z�b�g�̌� (WhichSide.LEFT/RIGHT)
tol - �����̋��e��?�
Returns:
���̋�?�̎w��̋�Ԃ̃I�t�Z�b�g��?��ߎ����镡?���?�
See Also:
WhichSide

offsetByBsplineCurve

public BsplineCurve2D offsetByBsplineCurve(ParameterSection pint,
                                           double magni,
                                           int side,
                                           ToleranceForDistance tol)
���̋�?�̎w��̋�Ԃ�I�t�Z�b�g������?��?A �^����ꂽ��?��ŋߎ����� Bspline ��?��?�߂�?B

Specified by:
offsetByBsplineCurve in class ParametricCurve2D
Parameters:
pint - �I�t�Z�b�g����p���??[�^���
magni - �I�t�Z�b�g��
side - �I�t�Z�b�g�̌� (WhichSide.LEFT/RIGHT)
tol - �����̋��e��?�
Returns:
���̋�?�̎w��̋�Ԃ̃I�t�Z�b�g��?��ߎ����� Bspline ��?�
See Also:
WhichSide

offsetByBoundedCurve

public BoundedCurve2D offsetByBoundedCurve(ParameterSection pint,
                                           double magni,
                                           int side,
                                           ToleranceForDistance tol)
���̋�?�̎w��̋�Ԃ�I�t�Z�b�g������?��?A �^����ꂽ��?��ŋߎ�����L� �?��?�߂�?B

Overrides:
offsetByBoundedCurve in class ParametricCurve2D
Parameters:
pint - �I�t�Z�b�g����p���??[�^���
magni - �I�t�Z�b�g��
side - �I�t�Z�b�g�̌� (WhichSide.LEFT/RIGHT)
tol - �����̋��e��?�
Returns:
���̋�?�̎w��̋�Ԃ̃I�t�Z�b�g��?��ߎ�����L� �?�
See Also:
WhichSide

divideIntoSimpleLoopsIfClosed

public CompositeCurve2D[] divideIntoSimpleLoopsIfClosed(int cmcWise,
                                                        int validSide)
                                                 throws OpenCurveException
�‚�����?�Ȍ�?������?��ŕ�������?A���Ȍ�?����Ȃ��P?��ȕ‹�?��?W?��ɂ���?B

���̃?�\�b�h��Ă΂��?ۂ̕‚�����?��?A�����?�� offsetByCompositeCurve(ParameterSection, double, int, ToleranceForDistance) �ŃI�t�Z�b�g�������ʂł����̂Ƒz�肵�Ă���?B

cmcWise �͕‚�����?���?�̉�����l��?A ���v��� (�E���) �ɉ�BĂ��� (�ƌ��Ȃ�����) �̂ł���� LoopWise.CW?A �����v��� (?����) �ɉ�BĂ��� (�ƌ��Ȃ�����) �̂ł���� LoopWise.CCW ��w�肷��?B

valid_side �� this �����̋�?��ǂ��瑤�ɃI�t�Z�b�g������̂ł��邩���l��?A this �����̋�?��Ѥ�ɃI�t�Z�b�g������̂ł���� WhichSide.IN?A �����łȂ� this �����̋�?��O���ɃI�t�Z�b�g������̂ł���� WhichSide.OUT ��w�肷��

Parameters:
cmcWise - �‚�����?���?�̉�����l
validSide - ���̋�?��ǂ��瑤�ɃI�t�Z�b�g������̂ł��邩���l
Returns:
���Ȍ�?����Ȃ��P?��ȕ‹�?��?W?�
Throws:
OpenCurveException - �J������?�ł���
See Also:
LoopWise, WhichSide

commonTangent

public CommonTangent2D[] commonTangent(ParametricCurve2D mate)
���̋�?�Ƒ��̋�?�Ƃ̋���?�?��?�߂�?B

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

�����_�ł͎�����Ă��Ȃ�����?A UnsupportedOperationException �̗�O��?�����?B

Specified by:
commonTangent in class ParametricCurve2D
Parameters:
mate - ���̋�?�
Returns:
����?�?�̔z��
Throws:
java.lang.UnsupportedOperationException - ���܂̂Ƃ���?A������Ȃ��@�\�ł���

commonNormal

public CommonNormal2D[] commonNormal(ParametricCurve2D mate)
���̋�?�Ƒ��̋�?�Ƃ̋��ʖ@?��?�߂�?B

���ʖ@?�?݂��Ȃ�?�?��ɂ͒��� 0 �̔z���Ԃ�?B

�����_�ł͎�����Ă��Ȃ�����?A UnsupportedOperationException �̗�O��?�����?B

Specified by:
commonNormal in class ParametricCurve2D
Parameters:
mate - ���̋�?�
Returns:
���ʖ@?�̔z��
Throws:
java.lang.UnsupportedOperationException - ���܂̂Ƃ���?A������Ȃ��@�\�ł���

isFreeform

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

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

doTransformBy

protected ParametricCurve2D doTransformBy(boolean reverseTransform,
                                          CartesianTransformationOperator2D 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 ParametricCurve2D
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 ParametricCurve2D
Returns:
���̋�?�|�����C���ł��邩?A �܂��͎�?g��?\?����镔�i�Ƃ��ă|�����C����܂ނȂ�� true?A �����łȂ���� false

isComposedOfOnlyPolylines

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

Overrides:
isComposedOfOnlyPolylines in class ParametricCurve2D
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