org.jscience.mathematics.geometry
Class FreeformCurveWithControlPoints2D

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.FreeformCurveWithControlPoints2D
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
BsplineCurve2D, PureBezierCurve2D

public abstract class FreeformCurveWithControlPoints2D
extends BoundedCurve2D

�Q���� : ?���_��?�B����R��?��\����?ۃN���X?B

���̃N���X�̃C���X�^���X��?A ?���_ (Point2D) �̔z�� controlPoints �� ?d�� (double) �̔z�� weights ��?��?B

weights �� null ��?�?��ɂ͔�L�?��?� (��?�����?�) ��\��?B

weights �ɔz��?ݒ肳��Ă���?�?��ɂ͗L�?��?��\��?B weights[i] �� controlPoints[i] �ɑΉ�����?B �Ȃ�?A���܂̂Ƃ��� weights[i] �̒l��?��łȂ���΂Ȃ�Ȃ�?B

See Also:
Serialized Form

Field Summary
protected  Point2D[] controlPoints
          ?
protected  double[] weights
          ?
 
Constructor Summary
protected FreeformCurveWithControlPoints2D()
          ����^�����ɃI�u�W�F�N�g��?
protected FreeformCurveWithControlPoints2D(double[][] cpArray)
          ?
protected FreeformCurveWithControlPoints2D(Point2D[] controlPoints)
          ?
protected FreeformCurveWithControlPoints2D(Point2D[] controlPoints, double[] weights)
          ?
protected FreeformCurveWithControlPoints2D(Point2D[] controlPoints, double[] weights, boolean doCheck)
          ?
 
Method Summary
protected static double[][] allocateDoubleArray(boolean isPoly, int size)
          �^����ꂽ?
 Point2D controlPointAt(int i)
          ���̋�?
 Point2D[] controlPoints()
          ���̋�?
protected  void convRational0Deriv(double[] d0D)
          ����?
protected  void convRational1Deriv(double[] d0D, double[] d1D)
          ����?
protected  void convRational2Deriv(double[] d0D, double[] d1D, double[] d2D)
          ����?
 boolean isFreeform()
          ���̊􉽗v�f�����R�`?
 boolean isPolynomial()
          ���̋�?
 boolean isRational()
          ���̋�?
 double[] makeUniformWeights()
          ���̋�?
 int nControlPoints()
          ���̋�?
protected  void setCoordinatesToDoubleArray(boolean isPoly, int uicp, double[][] doubleArray)
          ���̋�?
protected  double[][] toDoubleArray(boolean isPoly)
          ���̋�?
 double weightAt(int i)
          ���̋�?
 double[] weights()
          ���̋�?
 
Methods inherited from class org.jscience.mathematics.geometry.BoundedCurve2D
endPoint, fillet, interfere, length, offsetByBoundedCurve, offsetByBsplineCurve, startPoint, toBsplineCurve, toPolyline
 
Methods inherited from class org.jscience.mathematics.geometry.ParametricCurve2D
checkProjection, commonNormal, commonTangent, coordinates, curvature, dimension, doTransformBy, evaluation, fillet, hasPolyline, identicalParameter, inflexion, intersect, is2D, isComposedOfOnlyPolylines, nearestProjectFrom, nearestProjectWithDistanceFrom, offsetByBoundedCurve, offsetByBsplineCurve, pointToParameter, projectFrom, reverseTransformBy, singular, tangentVector, toBsplineCurve, toPolyline, transformBy, transformBy
 
Methods inherited from class org.jscience.mathematics.geometry.AbstractParametricCurve
checkValidity, checkValidity, isClosed, isCurve, isFinite, isInfinite, isNonPeriodic, isOpen, isParametric, isPeriodic, isValid, length, 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, output
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

controlPoints

protected Point2D[] controlPoints
?���_�̔z��?B


weights

protected double[] weights
?d�݂̔z��?B

��?�����?�ł���� null �Ƃ���?B

Constructor Detail

FreeformCurveWithControlPoints2D

protected FreeformCurveWithControlPoints2D()
����^�����ɃI�u�W�F�N�g��?\�z����?B

�e�t�B?[���h�ɂ͒l��?ݒ肵�Ȃ�?B


FreeformCurveWithControlPoints2D

protected FreeformCurveWithControlPoints2D(Point2D[] controlPoints)
?���_���^���đ�?�����?�Ƃ��ăI�u�W�F�N�g��?\�z����?B

�ȉ��̂����ꂩ��?�?��ɂ�?AInvalidArgumentValueException �̗�O��?�����?B

Parameters:
controlPoints - ?���_�̔z��
See Also:
InvalidArgumentValueException

FreeformCurveWithControlPoints2D

protected FreeformCurveWithControlPoints2D(Point2D[] controlPoints,
                                           double[] weights)
?���_���?d�ݗ��^���ėL�?��?�Ƃ��ăI�u�W�F�N�g��?\�z����?B

�ȉ��̂����ꂩ��?�?��ɂ�?AInvalidArgumentValueException �̗�O��?�����?B

Parameters:
controlPoints - ?���_�̔z��
weights - ?d�݂̔z��
See Also:
InvalidArgumentValueException

FreeformCurveWithControlPoints2D

protected FreeformCurveWithControlPoints2D(double[][] cpArray)
?���_ (��?d��) ��񎟌��z��ŗ^���� ��?�����?� (���邢�͗L�?��?�) �Ƃ��ăI�u�W�F�N�g��?\�z����?B

cpArray �̒�����?���_��?��Ƃ���?B �܂�?AcpArray[0] �̒����� 2 �ł���Α�?�����?�?A3 �ł���ΗL�?��?�Ƃ���?B

cpArray[i] �̒����� 2 ��?�?�?A cpArray[i][0] �� i �Ԗڂ�?���_�� X ?���?A cpArray[i][1] �� i �Ԗڂ�?���_�� Y ?��� ����̂Ƃ���?B

cpArray[i] �̒����� 3 ��?�?�?A cpArray[i][0] �� (i �Ԗڂ�?���_�� X ?��� * i �Ԗڂ�?d��)?A cpArray[i][1] �� (i �Ԗڂ�?���_�� Y ?��� * i �Ԗڂ�?d��)?A cpArray[i][2] �� i �Ԗڂ�?d�� ����̂Ƃ���?B

�ȉ��̂����ꂩ��?�?��ɂ�?AInvalidArgumentValueException �̗�O��?�����?B

Parameters:
cpArray - ?���_ (�����?d��) �̔z��
See Also:
InvalidArgumentValueException

FreeformCurveWithControlPoints2D

protected FreeformCurveWithControlPoints2D(Point2D[] controlPoints,
                                           double[] weights,
                                           boolean doCheck)
?���_���?d�ݗ��^���� ��?�����?�邢�͗L�?��?�Ƃ��ăI�u�W�F�N�g��?\�z����?B

doCheck �� false ��?�?�?A �^����ꂽ controlPoints ����� weights �̒l�� �Ή�����t�B?[���h�ɂ��̂܂�?ݒ肷��?B ������ weights �� null �ł����?A��?�͔�L�? (��?���) �`���ɂȂ�?B �Ȃ�?AcontrolPoints �� null ���^�������?A�\��ł��Ȃ����ʂ�?���?B

doCheck �� true ��?�?�?A weights ���l��?�Ă� FreeformCurveWithControlPoints2D(Point2D[], double[])?A weights �� null �ł���� FreeformCurveWithControlPoints2D(Point2D[]) �Ɠ��l��?��?��?s�Ȃ�?B

Parameters:
controlPoitns - ?���_�̔z��
weights - ?d�݂̔z��
doCheck - ��?��̃`�F�b�N��?s�Ȃ����ǂ���
Method Detail

controlPoints

public Point2D[] controlPoints()
���̋�?��?���_���Ԃ�?B

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

controlPointAt

public Point2D controlPointAt(int i)
���̋�?�� i �Ԗڂ�?���_��Ԃ�?B

Parameters:
i - �C���f�b�N�X
Returns:
?���_

weights

public double[] weights()
���̋�?��?d�ݗ��Ԃ�?B

��?�?�����?��?�?��� null ��Ԃ�?B

Returns:
?d�݂̔z��

weightAt

public double weightAt(int i)
���̋�?�� i �Ԗڂ�?���_��?d�݂�Ԃ�?B

��?�?�����?��?�?��ɂ� InvalidArgumentValueException �̗�O�𓊂���?B

Parameters:
i - �C���f�b�N�X
Returns:
?d��
See Also:
InvalidArgumentValueException

nControlPoints

public int nControlPoints()
���̋�?��?���_��?���Ԃ�?B

Returns:
?���_��?�

isRational

public boolean isRational()
���̋�?�L�?�`�����ۂ���Ԃ�?B

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

isPolynomial

public boolean isPolynomial()
���̋�?�?����`�����ۂ���Ԃ�?B

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

allocateDoubleArray

protected static double[][] allocateDoubleArray(boolean isPoly,
                                                int size)
�^����ꂽ?���?���_��?�����i�[����?u��?��̓񎟌��z��?v�̗̈��l������?B

Parameters:
isPoly - ��?����`�����ۂ�
size - �z��̑�ꎟ���̗v�f?� (?���_��?�)
Returns:
?���_��?�����i�[����z��

setCoordinatesToDoubleArray

protected void setCoordinatesToDoubleArray(boolean isPoly,
                                           int uicp,
                                           double[][] doubleArray)
���̋�?��?���_ (�����?d��) ��?�����?A�^����ꂽ�񎟌��z��̗v�f�ɑ���?B

isPoly �� true ��?�?�?A doubleArray[i][0] �� i �Ԗڂ�?���_�� X ?���?A doubleArray[i][1] �� i �Ԗڂ�?���_�� Y ?��� ��\��?B

isPoly �� false ��?�?�?A doubleArray[i][0] �� (i �Ԗڂ�?���_�� X ?��� * i �Ԗڂ�?d��)?A doubleArray[i][1] �� (i �Ԗڂ�?���_�� Y ?��� * i �Ԗڂ�?d��)?A doubleArray[i][2] �� i �Ԗڂ�?d�� ��\��?B

Parameters:
isPoly - ��?����`�����ۂ�
uicp - �z��̑�ꎟ���̗v�f?� (�z��ɒl�����?���_��?�)
doubleArray - ?���_��?�����i�[����񎟌��z��

toDoubleArray

protected double[][] toDoubleArray(boolean isPoly)
���̋�?��?���_ (�����?d��) ��?�����܂�?u��?��̓񎟌��z��?v��Ԃ�?B

isPoly �� true ��?�?�?A ���̃?�\�b�h���Ԃ��񎟌��z�� C �̗v�f C[i][0] �� i �Ԗڂ�?���_�� X ?���?A C[i][1] �� i �Ԗڂ�?���_�� Y ?��� ��\��?B

isPoly �� false ��?�?�?A ���̃?�\�b�h���Ԃ��񎟌��z�� C �̗v�f C[i][0] �� (i �Ԗڂ�?���_�� X ?��� * i �Ԗڂ�?d��)?A C[i][1] �� (i �Ԗڂ�?���_�� Y ?��� * i �Ԗڂ�?d��)?A C[i][2] �� i �Ԗڂ�?d�� ��\��?B

Parameters:
isPoly - ��?����`�����ۂ�
Returns:
?���_ (�����?d��) ��?�����܂ޔz��

convRational0Deriv

protected void convRational0Deriv(double[] d0D)
����?W�ŗ^����ꂽ (��?�?��) �_�� X/Y/W ?����ɕϊ�����?B

(wx, wy, w) �ŗ^����ꂽ (��?�?��) �_�� (x, y, w) �ɕϊ�����?B

Parameters:
d0D - ��?�?�̓_

convRational1Deriv

protected void convRational1Deriv(double[] d0D,
                                  double[] d1D)
����?W�ŗ^����ꂽ��?�?�̓_�ƈꎟ����?��� X/Y/W ?����ɕϊ�����?B

(wx, wy, w) �ŗ^����ꂽ��?�?�̓_�ƈꎟ����?��� (x, y, w) �ɕϊ�����?B

Parameters:
d0D - ��?�?�̓_
d1D - �ꎟ����?�

convRational2Deriv

protected void convRational2Deriv(double[] d0D,
                                  double[] d1D,
                                  double[] d2D)
����?W�ŗ^����ꂽ��?�?�̓_/�ꎟ����?�/�񎟓���?��� X/Y/W ?����ɕϊ�����?B

(wx, wy, w) �ŗ^����ꂽ��?�?�̓_/�ꎟ����?�/�񎟓���?��� (x, y, w) �ɕϊ�����?B

Parameters:
d0D - ��?�?�̓_
d1D - �ꎟ����?�
d2D - �񎟓���?�

isFreeform

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

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

makeUniformWeights

public double[] makeUniformWeights()
���̋�?��?���_��?��ɓ������ψ��?d�ݗ��Ԃ�?B

���ʂƂ��ē�����z��̊e�v�f�̒l�� 1 �ł���?B

Returns:
?d�݂̔z��