org.jscience.mathematics.geometry
Class FreeformSurfaceWithControlPoints3D

java.lang.Object
  extended by org.jscience.mathematics.geometry.GeometryElement
      extended by org.jscience.mathematics.geometry.AbstractParametricSurface
          extended by org.jscience.mathematics.geometry.ParametricSurface3D
              extended by org.jscience.mathematics.geometry.BoundedSurface3D
                  extended by org.jscience.mathematics.geometry.FreeformSurfaceWithControlPoints3D
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
BsplineSurface3D, PureBezierSurface3D

public abstract class FreeformSurfaceWithControlPoints3D
extends BoundedSurface3D

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

���̃N���X�̃C���X�^���X��?A ?���_ (Point3D) �̂Q�����z�� controlPoints �� ?d�� (double) �̂Q�����z�� weights ��?��?B

points ����� mesh ��?AU ���̃C���f�b�N�X��?�?AV ���̃C���f�b�N�X����?B �‚܂�?AU ���� i �Ԗ�?AV ���� j �Ԗڂ�?���_��?��� points[i][j], weights[i][j] �Ɋi�[�����?B

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

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

See Also:
Serialized Form

Field Summary
protected  Point3D[][] controlPoints
          ?
protected  double[][] weights
          ?
 
Constructor Summary
protected FreeformSurfaceWithControlPoints3D()
          ����^�����ɃI�u�W�F�N�g��?
protected FreeformSurfaceWithControlPoints3D(double[][][] cpArray)
          ?
protected FreeformSurfaceWithControlPoints3D(double[][][] cpArray, boolean doCheck)
          ?
protected FreeformSurfaceWithControlPoints3D(Point3D[][] controlPoints)
          ?
protected FreeformSurfaceWithControlPoints3D(Point3D[][] controlPoints, double[][] weights)
          ?
protected FreeformSurfaceWithControlPoints3D(Point3D[][] controlPoints, double[][] weights, boolean doCheck)
          ?
 
Method Summary
protected static double[][][] allocateDoubleArray(boolean isPoly, int uSize, int vSize)
          �^����ꂽ?
 Point3D controlPointAt(int i, int j)
          ���̋Ȗʂ� (i, j) �Ԗڂ�?
 Point3D[][] controlPoints()
          ���̋Ȗʂ�?
protected  void convRational0Deriv(double[] d0)
          ����?
protected  void convRational1Deriv(double[] d0, double[] du, double[] dv)
          ����?
protected  void convRational2Deriv(double[] d0, double[] du, double[] dv, double[] duu, double[] duv, double[] dvv)
          ����?
 boolean isFreeform()
          ���̊􉽗v�f�����R�`?
 boolean isPolynomial()
          ���̋Ȗʂ���?
 boolean isRational()
          ���̋Ȗʂ��L�?
 double[][] makeUniformWeights()
          ���̋Ȗʂ�?
 int nControlPoints()
          ���̋Ȗʂ�?
protected  void setCoordinatesToDoubleArray(boolean isPoly, int uUicp, int vUicp, double[][][] doubleArray)
          ���̋Ȗʂ�?
protected  double[][][] toDoubleArray(boolean isPoly)
           
 int uNControlPoints()
          ���̋Ȗʂ� U ����?
 int vNControlPoints()
          ���̋Ȗʂ� V ����?
 double weightAt(int i, int j)
          ���̋Ȗʂ� (i, j) �Ԗڂ�?
 double[][] weights()
          ���̋Ȗʂ�?
 
Methods inherited from class org.jscience.mathematics.geometry.BoundedSurface3D
fillet, offsetByBsplineSurface, toBsplineSurface, toMesh
 
Methods inherited from class org.jscience.mathematics.geometry.ParametricSurface3D
coordinates, curvature, dimension, doTransformBy, evaluation, fillet, intersect, intersect, is3D, nearestProjectFrom, nearestProjectWithDistanceFrom, normalVector, offsetByBsplineSurface, pointToParameter, projectFrom, reverseTransformBy, tangentVector, toBsplineSurface, toMesh, toNonStructuredPoints, transformBy, transformBy, uIsoParametricCurve, vIsoParametricCurve
 
Methods inherited from class org.jscience.mathematics.geometry.AbstractParametricSurface
checkUValidity, checkUValidity, checkVValidity, checkVValidity, isParametric, isSurface, isUFinite, isUInfinite, isUNonPeriodic, isUPeriodic, isValidUParameter, isValidVParameter, isVFinite, isVInfinite, isVNonPeriodic, isVPeriodic, uParameterDomain, vParameterDomain
 
Methods inherited from class org.jscience.mathematics.geometry.GeometryElement
getClassName, getToleranceForAngle, getToleranceForAngleAsObject, getToleranceForDistance, getToleranceForDistance2, getToleranceForDistanceAsObject, getToleranceForParameter, getToleranceForParameterAsObject, getToleranceForRealNumber, getToleranceForRealNumberAsObject, is1D, is2D, isCurve, isPlacement, isPoint, 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
?���_�̂Q�����z��?B


weights

protected double[][] weights
?d�݂̂Q�����z��?B

��?����Ȗʂł���� null �Ƃ���?B

Constructor Detail

FreeformSurfaceWithControlPoints3D

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

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


FreeformSurfaceWithControlPoints3D

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

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

Parameters:
controlPoints - ?���_�̂Q�����z��
See Also:
InvalidArgumentValueException

FreeformSurfaceWithControlPoints3D

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

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

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

FreeformSurfaceWithControlPoints3D

protected FreeformSurfaceWithControlPoints3D(double[][][] cpArray)
?���_(��?d��)��3�����z��Ƃ��ė^���đ�?���/�L�?�Ȗʂ�?\�z����

Parameters:
cpArray - ?���_?A?d�݂�\���z��

FreeformSurfaceWithControlPoints3D

protected FreeformSurfaceWithControlPoints3D(double[][][] cpArray,
                                             boolean doCheck)
?���_ (��?d��) ��O�����z��ŗ^���� ��?����Ȗ� (���邢�͗L�?�Ȗ�) �Ƃ��ăI�u�W�F�N�g��?\�z����?B

cpArray �̒����� U ����?���_��?�?A cpArray[0] �̒����� V ����?���_��?��Ƃ���?B �܂�?AcpArray[0][0] �̒����� 3 �ł���Α�?����Ȗ�?A4 �ł���ΗL�?�ȖʂƂ���?B

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

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

doCheck �� true ��?�?�?A�ȉ��̃`�F�b�N��?s�Ȃ�?B

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

  • U ����?���_��?��� 2 ���?�����
  • V ����?���_��?��� 2 ���?�����
  • ����?d�݂̒l��?��łȂ�
  • ����?d�݂̒l w �ɂ‚���?A (w / (?d�ݗ���?ő�l)) �� MachineEpsilon.DOUBLE ���?������Ȃ�?B

Parameters:
cpArray - ?���_ (�����?d��) �̔z��
doCheck - ��?��̃`�F�b�N��?s�Ȃ����ǂ���
See Also:
InvalidArgumentValueException

FreeformSurfaceWithControlPoints3D

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

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

controlPoints

public Point3D[][] controlPoints()
���̋Ȗʂ�?���_�̂Q�����z���Ԃ�?B

Returns:
?���_�̂Q�����z��

controlPointAt

public Point3D controlPointAt(int i,
                              int j)
���̋Ȗʂ� (i, j) �Ԗڂ�?���_��Ԃ�?B

Parameters:
i - U ���̃C���f�b�N�X (i �Ԗ�)
j - V ���̃C���f�b�N�X (j �Ԗ�)
Returns:
?���_

weights

public double[][] weights()
���̋Ȗʂ�?d�݂̂Q�����z���Ԃ�?B

�Ȗʂ���?����Ȗʂ�?�?��� null ��Ԃ�?B

Returns:
?d�݂̂Q�����z��

weightAt

public double weightAt(int i,
                       int j)
���̋Ȗʂ� (i, j) �Ԗڂ�?d�݂�Ԃ�?B

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

Parameters:
i - U ���̃C���f�b�N�X (i �Ԗ�)
j - V ���̃C���f�b�N�X (j �Ԗ�)
Returns:
?d��
See Also:
InvalidArgumentValueException

uNControlPoints

public int uNControlPoints()
���̋Ȗʂ� U ����?���_��?���Ԃ�?B

Returns:
U ����?���_��?�
See Also:
vNControlPoints(), nControlPoints()

vNControlPoints

public int vNControlPoints()
���̋Ȗʂ� V ����?���_��?���Ԃ�?B

Returns:
V ����?���_��?�
See Also:
uNControlPoints(), nControlPoints()

nControlPoints

public int nControlPoints()
���̋Ȗʂ�?���_�̑??���Ԃ�?B

(U ����?���_��?� * V ����?���_��?�) ��Ԃ�?B

Returns:
?���_�̑??�
See Also:
uNControlPoints(), vNControlPoints()

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 uSize,
                                                  int vSize)
�^����ꂽ?���?���_��?�����i�[����?u��?��̎O�����z��?v�̗̈��l������?B

Parameters:
isPoly - ��?����`�����ۂ�
uSize - �z��̑�ꎟ���̗v�f?� (U ����?���_��?�)
vSize - �z��̑�񎟌��̗v�f?� (V ����?���_��?�)
Returns:
?���_��?�����i�[����z��

setCoordinatesToDoubleArray

protected void setCoordinatesToDoubleArray(boolean isPoly,
                                           int uUicp,
                                           int vUicp,
                                           double[][][] doubleArray)
���̋Ȗʂ�?���_ (�����?d��) ��?�����?A�^����ꂽ�O�����z��̗v�f�ɑ���?B

isPoly �� true ��?�?�?A doubleArray[i][j][0] �� (i, j) �Ԗڂ�?���_�� X ?���?A doubleArray[i][j][1] �� (i, j) �Ԗڂ�?���_�� Y ?��� doubleArray[i][j][2] �� (i, j) �Ԗڂ�?���_�� Z ?��� ��\��?B

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

Parameters:
isPoly - ��?����`�����ۂ�
uUicp - �z��̑�ꎟ���̗v�f?� (�z��ɒl����� U ����?���_��?�)
vUicp - �z��̑�񎟌��̗v�f?� (�z��ɒl����� V ����?���_��?�)
doubleArray - ?���_��?�����i�[����O�����z��

toDoubleArray

protected double[][][] toDoubleArray(boolean isPoly)

convRational0Deriv

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

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

Parameters:
d0 - �Ȗ�?�̓_

convRational1Deriv

protected void convRational1Deriv(double[] d0,
                                  double[] du,
                                  double[] dv)
����?W�ŗ^����ꂽ�Ȗ�?�̓_�ƈꎟ�Γ���?��� X/Y/Z/W ?����ɕϊ�����?B

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

Parameters:
d0 - �Ȗ�?�̓_
du - U ���̈ꎟ�Γ���?�
dv - V ���̈ꎟ�Γ���?�

convRational2Deriv

protected void convRational2Deriv(double[] d0,
                                  double[] du,
                                  double[] dv,
                                  double[] duu,
                                  double[] duv,
                                  double[] dvv)
����?W�ŗ^����ꂽ�Ȗ�?�̓_/�ꎟ�Γ���?�/�񎟕Γ���?��� X/Y/Z/W ?����ɕϊ�����?B

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

Parameters:
d0 - �Ȗ�?�̓_
du - U ���̈ꎟ�Γ���?�
dv - V ���̈ꎟ�Γ���?�
duv - U ���̓񎟕Γ���?�
duv - UV ���̈ꎟ?�?��Γ���?�
dvv - V ���̓񎟕Γ���?�

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