Commit d3d9bf72 authored by Andrew Maclean's avatar Andrew Maclean Committed by Michael Fogleman
Browse files

Fixing the triangulation of the Parametric Surfaces.

Bill Lorenson noticed that the front face of orientable surfaces was being
 displayed as a back face. This arose as a "hack" when these functions
 were
  first implemented because the cross-product used to create the normals
  was
   right-handed, thus the triangulation orientation was clockwise.
    Additionally there were weird triangulations in the
    ParametricSuperEllipsoid
     and ParametricSuperToroid.

     The following three fixes have been applied:

     1) The orientation of the normals is fixed in the case of
     anti-clockwise
        ordering by calculating cross(Dv,Du) instead of cross(Du,Dv).
	   When this is done the normals point in the expected direction
	   and the
	      front face is rendered correctly. See:
	      vtkParametricFunctionSource.cxx.
	      2) All the surfaces now implement anti-clockwise ordering
	      with respect to the
	         triangulation.
		 3) The ParametricSuperEllipsoid and ParametricSuperToroid
		 have been reworked,
		    now the surface is constructed as four pieces that are
		    abutted together,
		       this removes the triangulations resulting in weird
		       appearances.
		       4) In order to implement the anti-clockwise
		       ordering in the triangulation
		          the x, y points have had to be swapped in a few
			  cases.
			  5) TestParametricFunctions.png has had to be
			  replaced. The images for
			     ParametricTorus, ParametricSuperEllipsoid and
			     ParametricSuperToroid
			        changed as a result of the above changes
parent 1538bc18
......@@ -25,15 +25,15 @@ vtkParametricBohemianDome::vtkParametricBohemianDome() :
{
// Preset triangulation parameters
this->MinimumU = -vtkMath::Pi();
this->MinimumV = -vtkMath::Pi();
this->MaximumU = vtkMath::Pi();
this->MinimumV = -vtkMath::Pi();
this->MaximumV = vtkMath::Pi();
this->JoinU = 1;
this->JoinV = 1;
this->TwistU = 0;
this->TwistV = 1;
this->ClockwiseOrdering = 1;
this->ClockwiseOrdering = 0;
this->DerivativesAvailable = 1;
}
......@@ -43,7 +43,8 @@ vtkParametricBohemianDome::~vtkParametricBohemianDome()
}
//----------------------------------------------------------------------------//
void vtkParametricBohemianDome::Evaluate(double uvw[3], double Pt[3], double Duvw[9])
void vtkParametricBohemianDome::Evaluate(double uvw[3], double Pt[3],
double Duvw[9])
{
// Copy the parameters out of the vector, for the sake of convenience.
double u = uvw[0];
......@@ -63,23 +64,24 @@ void vtkParametricBohemianDome::Evaluate(double uvw[3], double Pt[3], double Duv
// Location of the point. This parametrization was taken from:
// http://mathworld.wolfram.com/BohemianDome.html
Pt[0] = this->A*cosu;
Pt[1] = this->A*sinu + this->B*cosv;
Pt[2] = this->C*sinv;
Pt[0] = this->A * cosu;
Pt[1] = this->A * sinu + this->B * cosv;
Pt[2] = this->C * sinv;
// The derivative with respect to u:
Du[0] = -this->A*sinu;
Du[1] = this->A*cosu;
Du[0] = -this->A * sinu;
Du[1] = this->A * cosu;
Du[2] = 0.;
// The derivative with respect to v:
Dv[0] = 0.;
Dv[1] = -this->B*sinv;
Dv[2] = this->C*cosv;
Dv[1] = -this->B * sinv;
Dv[2] = this->C * cosv;
}
//----------------------------------------------------------------------------//
double vtkParametricBohemianDome::EvaluateScalar(double *, double *, double *)
double vtkParametricBohemianDome::EvaluateScalar(double *, double *,
double *)
{
return 0;
}
......@@ -87,5 +89,5 @@ double vtkParametricBohemianDome::EvaluateScalar(double *, double *, double *)
//----------------------------------------------------------------------------//
void vtkParametricBohemianDome::PrintSelf(ostream& os, vtkIndent indent)
{
this->Superclass::PrintSelf(os,indent);
this->Superclass::PrintSelf(os, indent);
}
......@@ -31,68 +31,71 @@
#include "vtkCommonComputationalGeometryModule.h" // For export macro
#include "vtkParametricFunction.h"
class VTKCOMMONCOMPUTATIONALGEOMETRY_EXPORT vtkParametricBohemianDome : public vtkParametricFunction
class VTKCOMMONCOMPUTATIONALGEOMETRY_EXPORT vtkParametricBohemianDome :
public vtkParametricFunction
{
public:
vtkTypeMacro(vtkParametricBohemianDome,vtkParametricFunction);
void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
//@{
/**
* Construct a Bohemian dome surface with the following parameters:
*/
vtkGetMacro(A, double);
vtkSetMacro(A, double);
//@}
vtkGetMacro(B, double);
vtkSetMacro(B, double);
vtkGetMacro(C, double);
vtkSetMacro(C, double);
// (MinimumU, MaximumU) = (-pi, pi),
// (MinimumV, MaximumV) = (-pi, pi),
// JoinU = 1, JoinV = 1,
// TwistU = 0, TwistV = 0;
// ClockwiseOrdering = 1,
// DerivativesAvailable = 1,
static vtkParametricBohemianDome *New();
/**
* Return the parametric dimension of the class.
*/
int GetDimension() VTK_OVERRIDE {return 2;}
/**
* BohemianDome surface.
* This function performs the mapping \f$f(u,v) \rightarrow (x,y,x)\f$, returning it
* as Pt. It also returns the partial derivatives Du and Dv.
* \f$Pt = (x, y, z), D_u\vec{f} = (dx/du, dy/du, dz/du), D_v\vec{f} = (dx/dv, dy/dv, dz/dv)\f$ .
* Then the normal is \f$N = D_u\vec{f} \times D_v\vec{f}\f$ .
*/
void Evaluate(double uvw[3], double Pt[3], double Duvw[9]) VTK_OVERRIDE;
/**
* Calculate a user defined scalar using one or all of uvw, Pt, Duvw.
* This method simply returns 0.
*/
double EvaluateScalar(double uvw[3], double Pt[3], double Duvw[9]) VTK_OVERRIDE;
protected:
vtkParametricBohemianDome();
~vtkParametricBohemianDome() VTK_OVERRIDE;
// Variables
double A;
double B;
double C;
private:
vtkParametricBohemianDome(const vtkParametricBohemianDome&) VTK_DELETE_FUNCTION;
void operator=(const vtkParametricBohemianDome&) VTK_DELETE_FUNCTION;
public:
vtkTypeMacro(vtkParametricBohemianDome, vtkParametricFunction);
void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
//@{
/**
* Construct a Bohemian dome surface with the following parameters:
*/
vtkGetMacro(A, double);
vtkSetMacro(A, double);
//@}
vtkGetMacro(B, double);
vtkSetMacro(B, double);
vtkGetMacro(C, double);
vtkSetMacro(C, double);
// (MinimumU, MaximumU) = (-pi, pi),
// (MinimumV, MaximumV) = (-pi, pi),
// JoinU = 1, JoinV = 1,
// TwistU = 0, TwistV = 0;
// ClockwiseOrdering = 0,
// DerivativesAvailable = 1,
static vtkParametricBohemianDome *New();
/**
* Return the parametric dimension of the class.
*/
int GetDimension() VTK_OVERRIDE {return 2;}
/**
* BohemianDome surface.
* This function performs the mapping \f$f(u,v) \rightarrow (x,y,x)\f$, returning it
* as Pt. It also returns the partial derivatives Du and Dv.
* \f$Pt = (x, y, z), D_u\vec{f} = (dx/du, dy/du, dz/du), D_v\vec{f} = (dx/dv, dy/dv, dz/dv)\f$ .
* Then the normal is \f$N = D_u\vec{f} \times D_v\vec{f}\f$ .
*/
void Evaluate(double uvw[3], double Pt[3], double Duvw[9]) VTK_OVERRIDE;
/**
* Calculate a user defined scalar using one or all of uvw, Pt, Duvw.
* This method simply returns 0.
*/
double EvaluateScalar(double uvw[3], double Pt[3],
double Duvw[9]) VTK_OVERRIDE;
protected:
vtkParametricBohemianDome();
~vtkParametricBohemianDome() VTK_OVERRIDE;
// Variables
double A;
double B;
double C;
private:
vtkParametricBohemianDome(const vtkParametricBohemianDome&)
VTK_DELETE_FUNCTION;
void operator=(const vtkParametricBohemianDome&) VTK_DELETE_FUNCTION;
};
#endif
......@@ -22,15 +22,15 @@ vtkParametricBour::vtkParametricBour()
{
// Preset triangulation parameters
this->MinimumU = 0.;
this->MinimumV = 0.;
this->MaximumU = 1.0;
this->MinimumV = 0.;
this->MaximumV = 4.*vtkMath::Pi();
this->JoinU = 0;
this->JoinV = 0;
this->TwistU = 0;
this->TwistV = 0;
this->ClockwiseOrdering = 1;
this->ClockwiseOrdering = 0;
this->DerivativesAvailable = 1;
}
......@@ -40,7 +40,8 @@ vtkParametricBour::~vtkParametricBour()
}
//----------------------------------------------------------------------------//
void vtkParametricBour::Evaluate(double uvw[3], double Pt[3], double Duvw[9])
void vtkParametricBour::Evaluate(double uvw[3], double Pt[3],
double Duvw[9])
{
// Copy the parameters out of the vector, for the sake of convenience.
double u = uvw[0];
......@@ -53,19 +54,19 @@ void vtkParametricBour::Evaluate(double uvw[3], double Pt[3], double Duvw[9])
// Location of the point. This parametrization was taken from:
// https://en.wikipedia.org/wiki/Bour%27s_minimal_surface
Pt[0] = u*cos(v) - u*u*cos(2.*v)/2.;
Pt[1] = -u*sin(v)*(u*cos(v) + 1.);
Pt[2] = 4./3.*pow(u, 1.5)*cos(1.5*v);
Pt[0] = u * cos(v) - u * u * cos(2.*v) / 2.;
Pt[1] = -u * sin(v) * (u * cos(v) + 1.);
Pt[2] = 4. / 3.*pow(u, 1.5) * cos(1.5 * v);
// The derivative with respect to u:
Du[0] = cos(v) - u*cos(2*v);
Du[1] = -sin(v)*(1. + 2.*u*cos(v));
Du[2] = 2*sqrt(u)*cos(1.5*v);
Du[0] = cos(v) - u * cos(2 * v);
Du[1] = -sin(v) * (1. + 2.*u * cos(v));
Du[2] = 2 * sqrt(u) * cos(1.5 * v);
// The derivative with respect to v:
Dv[0] = u*(2.*u*cos(v) - 1.)*sin(v);
Dv[1] = -u*(cos(v) + u*cos(2.*v));
Dv[2] = -2.*pow(u, 1.5)*sin(1.5*v);
Dv[0] = u * (2.*u * cos(v) - 1.) * sin(v);
Dv[1] = -u * (cos(v) + u * cos(2.*v));
Dv[2] = -2.*pow(u, 1.5) * sin(1.5 * v);
}
//----------------------------------------------------------------------------//
......@@ -77,5 +78,5 @@ double vtkParametricBour::EvaluateScalar(double *, double *, double *)
//----------------------------------------------------------------------------//
void vtkParametricBour::PrintSelf(ostream& os, vtkIndent indent)
{
this->Superclass::PrintSelf(os,indent);
this->Superclass::PrintSelf(os, indent);
}
......@@ -29,52 +29,54 @@
#include "vtkCommonComputationalGeometryModule.h" // For export macro
#include "vtkParametricFunction.h"
class VTKCOMMONCOMPUTATIONALGEOMETRY_EXPORT vtkParametricBour : public vtkParametricFunction
class VTKCOMMONCOMPUTATIONALGEOMETRY_EXPORT vtkParametricBour : public
vtkParametricFunction
{
public:
vtkTypeMacro(vtkParametricBour,vtkParametricFunction);
void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
/**
* Construct Bour's minimal surface with the following parameters:
* (MinimumU, MaximumU) = (0., 1.),
* (MinimumV, MaximumV) = (0., 4.*pi),
* JoinU = 0, JoinV = 0,
* TwistU = 0, TwistV = 0;
* ClockwiseOrdering = 1,
* DerivativesAvailable = 1,
*/
static vtkParametricBour *New();
/**
* Return the parametric dimension of the class.
*/
int GetDimension() VTK_OVERRIDE {return 2;}
/**
* Bour's minimal surface.
* This function performs the mapping \f$f(u,v) \rightarrow (x,y,x)\f$, returning it
* as Pt. It also returns the partial derivatives Du and Dv.
* \f$Pt = (x, y, z), D_u\vec{f} = (dx/du, dy/du, dz/du), D_v\vec{f} = (dx/dv, dy/dv, dz/dv)\f$ .
* Then the normal is \f$N = D_u\vec{f} \times D_v\vec{f}\f$ .
*/
void Evaluate(double uvw[3], double Pt[3], double Duvw[9]) VTK_OVERRIDE;
/**
* Calculate a user defined scalar using one or all of uvw, Pt, Duvw.
* This method simply returns 0.
*/
double EvaluateScalar(double uvw[3], double Pt[3], double Duvw[9]) VTK_OVERRIDE;
protected:
vtkParametricBour();
~vtkParametricBour() VTK_OVERRIDE;
private:
vtkParametricBour(const vtkParametricBour&) VTK_DELETE_FUNCTION;
void operator=(const vtkParametricBour&) VTK_DELETE_FUNCTION;
public:
vtkTypeMacro(vtkParametricBour, vtkParametricFunction);
void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
/**
* Construct Bour's minimal surface with the following parameters:
* (MinimumU, MaximumU) = (0., 1.),
* (MinimumV, MaximumV) = (0., 4.*pi),
* JoinU = 0, JoinV = 0,
* TwistU = 0, TwistV = 0;
* ClockwiseOrdering = 0,
* DerivativesAvailable = 1,
*/
static vtkParametricBour *New();
/**
* Return the parametric dimension of the class.
*/
int GetDimension() VTK_OVERRIDE {return 2;}
/**
* Bour's minimal surface.
* This function performs the mapping \f$f(u,v) \rightarrow (x,y,x)\f$, returning it
* as Pt. It also returns the partial derivatives Du and Dv.
* \f$Pt = (x, y, z), D_u\vec{f} = (dx/du, dy/du, dz/du), D_v\vec{f} = (dx/dv, dy/dv, dz/dv)\f$ .
* Then the normal is \f$N = D_u\vec{f} \times D_v\vec{f}\f$ .
*/
void Evaluate(double uvw[3], double Pt[3], double Duvw[9]) VTK_OVERRIDE;
/**
* Calculate a user defined scalar using one or all of uvw, Pt, Duvw.
* This method simply returns 0.
*/
double EvaluateScalar(double uvw[3], double Pt[3],
double Duvw[9]) VTK_OVERRIDE;
protected:
vtkParametricBour();
~vtkParametricBour() VTK_OVERRIDE;
private:
vtkParametricBour(const vtkParametricBour&) VTK_DELETE_FUNCTION;
void operator=(const vtkParametricBour&) VTK_DELETE_FUNCTION;
};
#endif
......@@ -23,15 +23,15 @@ vtkParametricBoy::vtkParametricBoy()
{
// Preset triangulation parameters
this->MinimumU = 0;
this->MinimumV = 0;
this->MaximumU = vtkMath::Pi();
this->MinimumV = 0;
this->MaximumV = vtkMath::Pi();
this->JoinU = 1;
this->JoinV = 1;
this->TwistU = 1;
this->TwistV = 1;
this->ClockwiseOrdering = 1;
this->ClockwiseOrdering = 0;
this->DerivativesAvailable = 1;
this->ZScale = 0.125;
......@@ -43,7 +43,8 @@ vtkParametricBoy::~vtkParametricBoy()
}
//----------------------------------------------------------------------------
void vtkParametricBoy::Evaluate(double uvw[3], double Pt[3], double Duvw[9])
void vtkParametricBoy::Evaluate(double uvw[3], double Pt[3],
double Duvw[9])
{
double u = uvw[0];
......@@ -55,8 +56,8 @@ void vtkParametricBoy::Evaluate(double uvw[3], double Pt[3], double Duvw[9])
double su = sin(u);
double sv = sin(v);
double X = cu*sv;
double Y = su*sv;
double X = cu * sv;
double Y = su * sv;
double Z = cos(v);
double X2 = X * X;
......@@ -72,31 +73,36 @@ void vtkParametricBoy::Evaluate(double uvw[3], double Pt[3], double Duvw[9])
double sr3 = sqrt(3.0);
// The point
Pt[0] = 1.0/2.0*(2*X2-Y2-Z2+2.0*Y*Z*(Y2-Z2)+
Z*X*(X2-Z2)+X*Y*(Y2-X2));
Pt[1] = sr3/2.0*(Y2-Z2+(Z*X*(Z2-X2)+
X*Y*(Y2-X2)));
Pt[2] = this->ZScale*(X+Y+Z)*((X+Y+Z)*(X+Y+Z)*(X+Y+Z)+
4.0*(Y-X)*(Z-Y)*(X-Z));
Pt[0] = 1.0 / 2.0 * (2 * X2 - Y2 - Z2 + 2.0 * Y * Z * (Y2 - Z2) +
Z * X * (X2 - Z2) + X * Y * (Y2 - X2));
Pt[1] = sr3 / 2.0 * (Y2 - Z2 + (Z * X * (Z2 - X2) +
X * Y * (Y2 - X2)));
Pt[2] = this->ZScale * (X + Y + Z) * ((X + Y + Z) * (X + Y + Z) *
(X + Y + Z) +
4.0 * (Y - X) * (Z - Y) * (X - Z));
//The derivatives are:
Du[0] = -1.0/2.0*X4-Z3*X+3.0*Y2*X2-3.0/2.0*Z*X2*Y+3.0*Z*X*Y2-
3.0*Y*X-1.0/2.0*Y4+1.0/2.0*Z3*Y;
Dv[0] = (3.0/2.0*Z2*X2+2*Z*X-1.0/2.0*Z4)*cu+
(-2.0*Z*X3+2*Z*X*Y2+3*Z2*Y2-Z*Y-Z4)*su+
(-1.0/2.0*X3+3.0/2.0*Z2*X-Y3+3.0*Z2*Y+Z)*sv;
Du[1] = -1.0/2.0*sr3*X4+3.0*sr3*Y2*X2+
3.0/2.0*sr3*Z*X2*Y+sr3*Y*X-
1.0/2.0*sr3*Y4-1.0/2.0*sr3*Z3*Y;
Dv[1] = (-3.0/2.0*sr3*Z2*X2+1.0/2.0*sr3*Z4)*cu+
(-2.0*sr3*Z*X3+2.0*sr3*Z*Y2*X+sr3*Z*Y)*su+
(1.0/2.0*sr3*X3-3.0/2.0*sr3*Z2*X+sr3*Z)*sv;
Du[2] = X4+3/2*Z*X3+3/2*Z2*X2+X3*Y-3*X2*Y2+
3*Z*X2*Y-Y3*X-3/2*Z*Y3-3/2*Z2*Y2-Z3*Y;
Dv[2] = (1/2*Z*X3+3/2*Z3*X+Z4)*cu+(4*Z*X3+3*Z*X2*Y+
9/2*Z2*X2+9/2*Z2*X*Y+3*Z3*X+1/2*Z*Y3+3*Z2*Y2+
3/2*Z3*Y)*su+(-3/2*X2*Y-3/2*Z*X2-3/2*X*Y2-
3*Z*X*Y-3*Z2*X-Y3-3/2*Z*Y2-1/2*Z3)*sv;
Du[0] = -1.0 / 2.0 * X4 - Z3 * X + 3.0 * Y2 * X2 - 3.0 / 2.0 * Z * X2 *
Y + 3.0 * Z * X * Y2 -
3.0 * Y * X - 1.0 / 2.0 * Y4 + 1.0 / 2.0 * Z3 * Y;
Dv[0] = (3.0 / 2.0 * Z2 * X2 + 2 * Z * X - 1.0 / 2.0 * Z4) * cu +
(-2.0 * Z * X3 + 2 * Z * X * Y2 + 3 * Z2 * Y2 - Z * Y - Z4) * su +
(-1.0 / 2.0 * X3 + 3.0 / 2.0 * Z2 * X - Y3 + 3.0 * Z2 * Y + Z) * sv;
Du[1] = -1.0 / 2.0 * sr3 * X4 + 3.0 * sr3 * Y2 * X2 +
3.0 / 2.0 * sr3 * Z * X2 * Y + sr3 * Y * X -
1.0 / 2.0 * sr3 * Y4 - 1.0 / 2.0 * sr3 * Z3 * Y;
Dv[1] = (-3.0 / 2.0 * sr3 * Z2 * X2 + 1.0 / 2.0 * sr3 * Z4) * cu +
(-2.0 * sr3 * Z * X3 + 2.0 * sr3 * Z * Y2 * X + sr3 * Z * Y) * su +
(1.0 / 2.0 * sr3 * X3 - 3.0 / 2.0 * sr3 * Z2 * X + sr3 * Z) * sv;
Du[2] = X4 + 3 / 2 * Z * X3 + 3 / 2 * Z2 * X2 + X3 * Y - 3 * X2 * Y2 +
3 * Z * X2 * Y - Y3 * X - 3 / 2 * Z * Y3 - 3 / 2 * Z2 * Y2 - Z3 * Y;
Dv[2] = (1 / 2 * Z * X3 + 3 / 2 * Z3 * X + Z4) * cu +
(4 * Z * X3 + 3 * Z * X2 * Y +
9 / 2 * Z2 * X2 + 9 / 2 * Z2 * X * Y + 3 * Z3 * X + 1 / 2 * Z * Y3 + 3 *
Z2 * Y2 +
3 / 2 * Z3 * Y) * su + (-3 / 2 * X2 * Y - 3 / 2 * Z * X2 - 3 / 2 * X *
Y2 -
3 * Z * X * Y - 3 * Z2 * X - Y3 - 3 / 2 * Z * Y2 - 1 / 2 * Z3) * sv;
}
//----------------------------------------------------------------------------
......@@ -108,7 +114,7 @@ double vtkParametricBoy::EvaluateScalar(double *, double *, double *)
//----------------------------------------------------------------------------
void vtkParametricBoy::PrintSelf(ostream& os, vtkIndent indent)
{
this->Superclass::PrintSelf(os,indent);
this->Superclass::PrintSelf(os, indent);
os << indent << "ZScale: " << this->ZScale << "\n";
......
......@@ -36,74 +36,76 @@
#include "vtkCommonComputationalGeometryModule.h" // For export macro
#include "vtkParametricFunction.h"
class VTKCOMMONCOMPUTATIONALGEOMETRY_EXPORT vtkParametricBoy : public vtkParametricFunction
class VTKCOMMONCOMPUTATIONALGEOMETRY_EXPORT vtkParametricBoy : public
vtkParametricFunction
{
public:
vtkTypeMacro(vtkParametricBoy,vtkParametricFunction);
void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
/**
* Construct Boy's surface with the following parameters:
* MinimumU = 0, MaximumU = Pi,
* MinimumV = 0, MaximumV = Pi,
* JoinU = 1, JoinV = 1,
* TwistU = 1, TwistV = 1;
* ClockwiseOrdering = 1,
* DerivativesAvailable = 1,
* ZScale = 0.125.
*/
static vtkParametricBoy *New();
/**
* Return the parametric dimension of the class.
*/
int GetDimension() VTK_OVERRIDE {return 2;}
//@{
/**
* Set/Get the scale factor for the z-coordinate.
* Default is 1/8, giving a nice shape.
*/
vtkSetMacro(ZScale,double);
vtkGetMacro(ZScale,double);
//@}
/**
* Boy's surface.
* This function performs the mapping \f$f(u,v) \rightarrow (x,y,x)\f$, returning it
* as Pt. It also returns the partial derivatives Du and Dv.
* \f$Pt = (x, y, z), Du = (dx/du, dy/du, dz/du), Dv = (dx/dv, dy/dv, dz/dv)\f$ .
* Then the normal is \f$N = Du X Dv\f$ .
*/
void Evaluate(double uvw[3], double Pt[3], double Duvw[9]) VTK_OVERRIDE;
/**
* Calculate a user defined scalar using one or all of uvw, Pt, Duvw.
* uvw are the parameters with Pt being the the cartesian point,
* Duvw are the derivatives of this point with respect to u, v and w.
* Pt, Duvw are obtained from Evaluate().
* This function is only called if the ScalarMode has the value
* vtkParametricFunctionSource::SCALAR_FUNCTION_DEFINED
* If the user does not need to calculate a scalar, then the
* instantiated function should return zero.
*/
double EvaluateScalar(double uvw[3], double Pt[3], double Duvw[9]) VTK_OVERRIDE;
protected:
vtkParametricBoy();
~vtkParametricBoy() VTK_OVERRIDE;
// Variables
double ZScale;
private:
vtkParametricBoy(const vtkParametricBoy&) VTK_DELETE_FUNCTION;
void operator=(const vtkParametricBoy&) VTK_DELETE_FUNCTION;
public:
vtkTypeMacro(vtkParametricBoy, vtkParametricFunction);
void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
/**
* Construct Boy's surface with the following parameters:
* MinimumU = 0, MaximumU = Pi,
* MinimumV = 0, MaximumV = Pi,
* JoinU = 1, JoinV = 1,
* TwistU = 1, TwistV = 1;
* ClockwiseOrdering = 0,
* DerivativesAvailable = 1,
* ZScale = 0.125.
*/
static vtkParametricBoy *New();
/**
* Return the parametric dimension of the class.
*/
int GetDimension() VTK_OVERRIDE {return 2;}
//@{
/**
* Set/Get the scale factor for the z-coordinate.