1 /*========================================================================= 2 3 Program: Visualization Toolkit 4 Module: vtkParametricPseudosphere.h 5 6 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 7 All rights reserved. 8 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 9 10 This software is distributed WITHOUT ANY WARRANTY; without even 11 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 12 PURPOSE. See the above copyright notice for more information. 13 14 =========================================================================*/ 15 /** 16 * @class vtkParametricPseudosphere 17 * @brief Generate a pseudosphere. 18 * 19 * vtkParametricPseudosphere generates a parametric pseudosphere. The 20 * pseudosphere is generated as a surface of revolution of the tractrix about 21 * it's asymptote, and is a surface of constant negative Gaussian curvature. 22 * You can find out more about this interesting surface at 23 * <a href="http://mathworld.wolfram.com/Pseudosphere.html">Math World</a>. 24 * @par Thanks: 25 * Tim Meehan 26 */ 27 28 #ifndef vtkParametricPseudosphere_h 29 #define vtkParametricPseudosphere_h 30 31 #include "vtkCommonComputationalGeometryModule.h" // For export macro 32 #include "vtkParametricFunction.h" 33 34 class VTKCOMMONCOMPUTATIONALGEOMETRY_EXPORT vtkParametricPseudosphere : public vtkParametricFunction 35 { 36 public: 37 vtkTypeMacro(vtkParametricPseudosphere, vtkParametricFunction); 38 void PrintSelf(ostream& os, vtkIndent indent) override; 39 40 /** 41 * Construct a pseudosphere surface with the following parameters: 42 * (MinimumU, MaximumU) = (-5., 5.), 43 * (MinimumV, MaximumV) = (-pi, pi), 44 * JoinU = 0, JoinV = 1, 45 * TwistU = 0, TwistV = 0; 46 * ClockwiseOrdering = 0, 47 * DerivativesAvailable = 1, 48 */ 49 static vtkParametricPseudosphere* New(); 50 51 /** 52 * Return the parametric dimension of the class. 53 */ GetDimension()54 int GetDimension() override { return 2; } 55 56 /** 57 * Pseudosphere surface. 58 59 * This function performs the mapping \f$f(u,v) \rightarrow (x,y,x)\f$, returning it 60 * as Pt. It also returns the partial derivatives Du and Dv. 61 * \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$ . 62 * Then the normal is \f$N = D_u\vec{f} \times D_v\vec{f}\f$ . 63 */ 64 void Evaluate(double uvw[3], double Pt[3], double Duvw[9]) override; 65 66 /** 67 * Calculate a user defined scalar using one or all of uvw, Pt, Duvw. 68 * This method simply returns 0. 69 */ 70 double EvaluateScalar(double uvw[3], double Pt[3], double Duvw[9]) override; 71 72 protected: 73 vtkParametricPseudosphere(); 74 ~vtkParametricPseudosphere() override; 75 76 private: 77 vtkParametricPseudosphere(const vtkParametricPseudosphere&) = delete; 78 void operator=(const vtkParametricPseudosphere&) = delete; 79 }; 80 81 #endif 82