org.jscience.mathematics.geometry
Class Line2D

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.Line2D
All Implemented Interfaces:
java.io.Serializable

public class Line2D
extends ParametricCurve2D

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

��?��?A?�?�̂����_ pnt �ƕ��x�N�g�� dir �Œ�`�����?B

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

        P(t) = pnt + t * dir
 

��?��?u��?�?v�ł�?B

���̒�?�͖��Ȓ�?��\��?B �L�Ȓ�?��\������?�?��ɂ� BoundedLine2D �� TrimmedCurve2D �����p�ł���?B

See Also:
Serialized Form

Constructor Summary
Line2D(Point2D pnt1, Point2D pnt2)
          �ʉ߂����_��^���ăI�u�W�F�N�g��?
Line2D(Point2D pnt, Vector2D dir)
          �t�B?
 
Method Summary
 CommonNormal2D[] commonNormal(ParametricCurve2D mate)
          ���̋�?
 CommonTangent2D[] commonTangent(ParametricCurve2D mate)
          ���̋�?
 Point2D coordinates(double param)
          ���̋�?
 CurveCurvature2D curvature(double param)
          ���̋�?
 Vector2D dir()
          ���̒�?
protected  ParametricCurve2D doTransformBy(boolean reverseTransform, CartesianTransformationOperator2D transformationOperator, java.util.Hashtable transformedGeometries)
          ���̋�?
 CurveDerivative2D evaluation(double param)
          ���̋�?
 PointOnCurve2D[] inflexion()
          ���̋�?
 IntersectionPoint2D[] intersect(ParametricCurve2D mate)
          ���̋�?
 IntersectionPoint2D intersect1Line(Line2D mate)
          ���̒�?
 double length(ParameterSection pint)
          ���̋�?
 BoundedCurve2D offsetByBoundedCurve(ParameterSection pint, double magni, int side, ToleranceForDistance tol)
          ���̋�?
 BsplineCurve2D offsetByBsplineCurve(ParameterSection pint, double magni, int side, ToleranceForDistance tol)
          ���̋�?
protected  void output(java.io.PrintWriter writer, int indent)
          ?
 Point2D pnt()
          ���̒�?
 PointOnCurve2D project1From(Point2D point)
          �^����ꂽ�_���炱�̒�?
 PointOnCurve2D[] projectFrom(Point2D point)
          �^����ꂽ�_���炱�̋�?
 PointOnCurve2D[] singular()
          ���̋�?
 Vector2D tangentVector(double param)
          ���̋�?
 BsplineCurve2D toBsplineCurve(ParameterSection pint)
          ���̋�?
 Polyline2D toPolyline(ParameterSection pint, ToleranceForDistance tol)
          ���̋�?
 
Methods inherited from class org.jscience.mathematics.geometry.ParametricCurve2D
checkProjection, dimension, fillet, hasPolyline, identicalParameter, is2D, isComposedOfOnlyPolylines, 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, isFreeform, 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

Line2D

public Line2D(Point2D pnt,
              Vector2D dir)
�t�B?[���h��?ݒ肷��l�⻂̂܂ܗ^���ăI�u�W�F�N�g��?\�z����?B

pnt ��p���??[�^�l 0 �̓_�Ƃ�?A dir ����x�N�g���Ƃ��钼?��?�?�����?B

dir �̑傫����?A ��?�?ݒ肳��Ă��鉉�Z?�?�̋����̋��e��?�����?�����?�?��ɂ� InvalidArgumentValueException �̗�O��?�����?B

Parameters:
pnt - ?�?�̂����_ (�p���??[�^�l 0 �ɑΉ�����)
dir - ���x�N�g��
See Also:
ConditionOfOperation, InvalidArgumentValueException

Line2D

public Line2D(Point2D pnt1,
              Point2D pnt2)
�ʉ߂����_��^���ăI�u�W�F�N�g��?\�z����?B

pnt1 ��p���??[�^�l 0 �̓_�Ƃ�?A pnt2 ��p���??[�^�l 1 �̓_�Ƃ��� ��?��?�?�����?B

pnt �� dir ��?A�ȉ��̂悤��?ݒ肳���?B

                pnt = pnt1
                dir = pnt2 - pnt1
 

pnt1 �� pnt2 ��?A ��?�?ݒ肳��Ă��鉉�Z?�?�̋����̋��e��?��̉���?A ����̓_�ƌ��Ȃ���?�?��ɂ� InvalidArgumentValueException �̗�O��?�����?B

Parameters:
pnt1 - ?�?�̂����_ (�p���??[�^�l 0 �ɑΉ�����)
pnt2 - ?�?�̂����_ (�p���??[�^�l 1 �ɑΉ�����)
See Also:
ConditionOfOperation, InvalidArgumentValueException, Point2D.identical(Point2D)
Method Detail

pnt

public Point2D pnt()
���̒�?���`���Ă���?�?�̂����_ (�p���??[�^�l 0 �ɑΉ�����_) ��Ԃ�?B

Returns:
?�?�̂����_ (�p���??[�^�l 0 �ɑΉ�����_)

dir

public Vector2D dir()
���̒�?���`���Ă�����x�N�g����Ԃ�?B

���̃x�N�g����?A���̒�?��?ڃx�N�g���ɓ�����?B

Returns:
���x�N�g��

length

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

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

coordinates

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

Specified by:
coordinates in class ParametricCurve2D
Parameters:
param - �p���??[�^�l
Returns:
?W�l

tangentVector

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

��?��?ڃx�N�g����?A?�� dir �ɓ�����?B

Specified by:
tangentVector in class ParametricCurve2D
Parameters:
param - �p���??[�^�l
Returns:
?ڃx�N�g��

curvature

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

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

Specified by:
curvature in class ParametricCurve2D
Parameters:
param - �p���??[�^�l
Returns:
�ȗ�

evaluation

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

Specified by:
evaluation in class ParametricCurve2D
Parameters:
param - �p���??[�^�l
Returns:
����?�

singular

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

��?�ɂ͓Hٓ_�͑�?݂��Ȃ��̂�?A?�ɗv�f?� 0 �̔z���Ԃ�?B

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

inflexion

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

��?�ɂ͕ϋȓ_�͑�?݂��Ȃ��̂�?A?�ɗv�f?� 0 �̔z���Ԃ�?B

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

projectFrom

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

���钼?�ւ̔C�ӂ̓_����̓��e�_��?��͕K�� 1 �ɂȂ�?B

���̃?�\�b�h��?A ParametricCurve2D �N���X�� ��?ۃ?�\�b�h�Ƃ���?錾����Ă����̂ł��邪?A ���̃N���X�ɂ͓��e�_��?�߂�?�\�b�h�Ƃ���?A���� project1From(Point2D) ������?B project1From(Point2D) ��?A ?u���e�_�̔z��?v�ł͂Ȃ�?A ��‚���������?u���e�_?v�⻂̂܂ܕԂ�?B

Specified by:
projectFrom in class ParametricCurve2D
Parameters:
point - ���e���̓_
Returns:
���e�_�̔z��
See Also:
project1From(Point2D)

toPolyline

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

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

�Ȃ�?A ���ʂƂ��ĕԂ����|�����C����?A ���̒�?�̎w�肳�ꂽ��Ԃ�?u�ߎ�?v�ł͂Ȃ�?A������?u?Č�?v�ł���?B ���̃?�\�b�h�̓Ք�ł� tol �̒l�͎Q?Ƃ��Ȃ�?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

���ʂƂ��ĕԂ����L�? Bspline ��?�� �P����?���_?��� 2?A���[��?d�̃��j�t�H?[���ȃm�b�g���?��?B

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

intersect

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

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

����Ҽ?��?A��?�I?[�o?[���b�v���Ă���?�?��ɂ�?A �⪕s��ł���Ƃ��� IndefiniteSolutionException ��?�����?B ��?�I?[�o?[���b�v���Ă���Ɣ��f����?�?�� intersect1Line(Line2D) �Ɠ��l�ł���?B

Specified by:
intersect in class ParametricCurve2D
Parameters:
mate - ���̋�?�
Returns:
��_�̔z��
Throws:
IndefiniteSolutionException - mate �Ҽ?��?A��?�̓I?[�o?[���b�v���Ă���?A�⪕s��ł���

intersect1Line

public IntersectionPoint2D intersect1Line(Line2D mate)
                                   throws IndefiniteSolutionException
���̒�?�Ƒ��̒�?�Ƃ� (��‚�����) ��_��?�߂�?B

��?�?s�ł���?�?��ɂ� null ��Ԃ�?B ��?�̕��x�N�g���̂Ȃ��p�x�� (�µ���̓� - ��) �� ��?�?ݒ肳��Ă��鉉�Z?�?��?u�p�x�̋��e��?��ȓ�?v�ł����?A ��?�͕�?s�ł����̂Ɣ��f����?B

������?A��?�?s�ł���?�?���?A �����ꂩ�� pnt ���瑊��ւ̋����� ��?�?ݒ肳��Ă��鉉�Z?�?��?u�����̋��e��?��ȓ�?v�ł����?A ��?�̓I?[�o?[���b�v���Ă����̂Ƃ���?A IndefiniteSolutionException �̗�O��?�������?B

Parameters:
mate - ���̒�?�
Returns:
��_
Throws:
IndefiniteSolutionException - ��?�̓I?[�o?[���b�v���Ă���?A�⪕s��ł���
See Also:
ConditionOfOperation, Vector2D.parallelDirection(Vector2D)

offsetByBsplineCurve

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

�Ȃ�?A ���ʂƂ��ĕԂ���� Bspline ��?��?A ���̒�?�̎w�肳�ꂽ��Ԃ̃I�t�Z�b�g��?u�ߎ�?v�ł͂Ȃ�?A ������?u?Č�?v�ł���?B ���̃?�\�b�h�̓Ք�ł� tol �̒l�͎Q?Ƃ��Ȃ�?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

���ʂƂ��ĕԂ����L� �?��?A BoundedLine2D �̃C���X�^���X�ł���?B

�Ȃ�?A ���ʂƂ��ĕԂ����L� �?��?A ���̒�?�̎w�肳�ꂽ��Ԃ̃I�t�Z�b�g��?u�ߎ�?v�ł͂Ȃ�?A ������?u?Č�?v�ł���?B ���̃?�\�b�h�̓Ք�ł� tol �̒l�͎Q?Ƃ��Ȃ�?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

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������Ȃ��@�\�ł���

project1From

public PointOnCurve2D project1From(Point2D point)
�^����ꂽ�_���炱�̒�?�ւ� (��‚�����?݂���) ���e�_��?�߂�?B

�Ք?��?�͈ȉ��̒ʂ�?B
(point - this.pnt) �� (this.dir �̒P�ʃx�N�g��) �̓�?ς̒l�� ���̒�?�ɑ΂��铊�e�_�̃p���??[�^�l�Ƃ�?A ���̃p���??[�^�l��?�� PointOnCurve2D �̃C���X�^���X��Ԃ�?B

Parameters:
point - ���e���̓_
Returns:
���e�_
See Also:
projectFrom(Point2D)

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

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