org.jscience.mathematics.geometry
Class FreeformCurveWithControlPoints3D

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.FreeformCurveWithControlPoints3D
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
BsplineCurve3D, PureBezierCurve3D

public abstract class FreeformCurveWithControlPoints3D
extends BoundedCurve3D

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

���̃N���X�̃C���X�^���X��?A ?���_ (Point3D) �̔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  Point3D[] controlPoints
          ?
protected  double[] weights
          ?
 
Constructor Summary
protected FreeformCurveWithControlPoints3D()
          ����^�����ɃI�u�W�F�N�g��?
protected FreeformCurveWithControlPoints3D(double[][] cpArray)
          ?
protected FreeformCurveWithControlPoints3D(Point3D[] controlPoints)
          ?
protected FreeformCurveWithControlPoints3D(Point3D[] controlPoints, double[] weights)
          ?
protected FreeformCurveWithControlPoints3D(Point3D[] controlPoints, double[] weights, boolean doCheck)
          ?
 
Method Summary
protected static double[][] allocateDoubleArray(boolean isPoly, int size)
          �^����ꂽ?
 Point3D controlPointAt(int i)
          ���̋�?
 Point3D[] controlPoints()
          ���̋�?
protected  void convRational0Deriv(double[] d0D)
          ����?
protected  void convRational1Deriv(double[] d0D, double[] d1D)
          ����?
protected  void convRational2Deriv(double[] d0D, double[] d1D, double[] d2D)
          ����?
protected  void convRational3Deriv(double[] d0D, double[] d1D, double[] d2D, double[] d3D)
          ����?
 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.BoundedCurve3D
endPoint, interfere, length, startPoint, toBsplineCurve, toPolyline
 
Methods inherited from class org.jscience.mathematics.geometry.ParametricCurve3D
checkProjection, coordinates, curvature, dimension, doTransformBy, evaluation, hasPolyline, identicalParameter, inflexion, intersect, intersect, is3D, isComposedOfOnlyPolylines, nearestProjectFrom, nearestProjectWithDistanceFrom, parallelTranslate, pointToParameter, projectFrom, reverseTransformBy, singular, tangentVector, toBsplineCurve, toPolyline, torsion, 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, is2D, 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 Point3D[] controlPoints
?���_�̔z��?B


weights

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

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

Constructor Detail

FreeformCurveWithControlPoints3D

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

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


FreeformCurveWithControlPoints3D

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

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

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

FreeformCurveWithControlPoints3D

protected FreeformCurveWithControlPoints3D(Point3D[] 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

FreeformCurveWithControlPoints3D

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

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

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

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

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

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

FreeformCurveWithControlPoints3D

protected FreeformCurveWithControlPoints3D(Point3D[] 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��?�Ă� FreeformCurveWithControlPoints3D(Point3D[], double[])?A weights �� null �ł���� FreeformCurveWithControlPoints3D(Point3D[]) �Ɠ��l��?��?��?s�Ȃ�?B

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

controlPoints

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

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

controlPointAt

public Point3D 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 ?��� doubleArray[i][2] �� i �Ԗڂ�?���_�� Z ?��� ��\��?B

isPoly �� false ��?�?�?A doubleArray[i][0] �� (i �Ԗڂ�?���_�� X ?��� * i �Ԗڂ�?d��)?A doubleArray[i][1] �� (i �Ԗڂ�?���_�� Y ?��� * i �Ԗڂ�?d��)?A doubleArray[i][2] �� (i �Ԗڂ�?���_�� Z ?��� * i �Ԗڂ�?d��)?A doubleArray[i][3] �� 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 ?��� C[i][2] �� i �Ԗڂ�?���_�� Z ?��� ��\��?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 �Ԗڂ�?���_�� Z ?��� * i �Ԗڂ�?d��)?A C[i][3] �� i �Ԗڂ�?d�� ��\��?B

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

convRational0Deriv

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

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

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

convRational1Deriv

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

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

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

convRational2Deriv

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

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

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

convRational3Deriv

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

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

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

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��