PageRenderTime 44ms CodeModel.GetById 18ms RepoModel.GetById 0ms app.codeStats 0ms

/Common/ComputationalGeometry/vtkParametricEnneper.h

https://github.com/dgobbi/VTK
C Header | 89 lines | 21 code | 10 blank | 58 comment | 0 complexity | b9b000fb1d92939bd5577dd720634bbc MD5 | raw file
  1. /*=========================================================================
  2. Program: Visualization Toolkit
  3. Module: vtkParametricEnneper.h
  4. Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
  5. All rights reserved.
  6. See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
  7. This software is distributed WITHOUT ANY WARRANTY; without even
  8. the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  9. PURPOSE. See the above copyright notice for more information.
  10. =========================================================================*/
  11. // .NAME vtkParametricEnneper - Generate Enneper's surface.
  12. // .SECTION Description
  13. // vtkParametricEnneper generates Enneper's surface.
  14. // Enneper's surface is a a self-intersecting minimal surface
  15. // possessing constant negative Gaussian curvature
  16. //
  17. // For further information about this surface, please consult the
  18. // technical description "Parametric surfaces" in http://www.vtk.org/documents.php
  19. // in the "VTK Technical Documents" section in the VTk.org web pages.
  20. //
  21. // .SECTION Thanks
  22. // Andrew Maclean a.maclean@cas.edu.au for
  23. // creating and contributing the class.
  24. //
  25. #ifndef __vtkParametricEnneper_h
  26. #define __vtkParametricEnneper_h
  27. #include "vtkCommonComputationalGeometryModule.h" // For export macro
  28. #include "vtkParametricFunction.h"
  29. class VTKCOMMONCOMPUTATIONALGEOMETRY_EXPORT vtkParametricEnneper : public vtkParametricFunction
  30. {
  31. public:
  32. vtkTypeMacro(vtkParametricEnneper,vtkParametricFunction);
  33. void PrintSelf(ostream& os, vtkIndent indent);
  34. // Description:
  35. // Construct Enneper's surface with the following parameters:
  36. // MinimumU = -2, MaximumU = 2,
  37. // MinimumV = -2, MaximumV = 2,
  38. // JoinU = 0, JoinV = 0,
  39. // TwistU = 0, TwistV = 0,
  40. // ClockwiseOrdering = 1,
  41. // DerivativesAvailable = 1
  42. static vtkParametricEnneper *New();
  43. // Description
  44. // Return the parametric dimension of the class.
  45. virtual int GetDimension() {return 2;}
  46. // Description:
  47. // Enneper's surface.
  48. //
  49. // This function performs the mapping \f$f(u,v) \rightarrow (x,y,x)\f$, returning it
  50. // as Pt. It also returns the partial derivatives Du and Dv.
  51. // \f$Pt = (x, y, z), Du = (dx/du, dy/du, dz/du), Dv = (dx/dv, dy/dv, dz/dv)\f$ .
  52. // Then the normal is \f$N = Du X Dv\f$ .
  53. virtual void Evaluate(double uvw[3], double Pt[3], double Duvw[9]);
  54. // Description:
  55. // Calculate a user defined scalar using one or all of uvw, Pt, Duvw.
  56. //
  57. // uv are the parameters with Pt being the the cartesian point,
  58. // Duvw are the derivatives of this point with respect to u, v and w.
  59. // Pt, Duvw are obtained from Evaluate().
  60. //
  61. // This function is only called if the ScalarMode has the value
  62. // vtkParametricFunctionSource::SCALAR_FUNCTION_DEFINED
  63. //
  64. // If the user does not need to calculate a scalar, then the
  65. // instantiated function should return zero.
  66. //
  67. virtual double EvaluateScalar(double uvw[3], double Pt[3], double Duvw[9]);
  68. protected:
  69. vtkParametricEnneper();
  70. ~vtkParametricEnneper();
  71. private:
  72. vtkParametricEnneper(const vtkParametricEnneper&); // Not implemented.
  73. void operator=(const vtkParametricEnneper&); // Not implemented.
  74. };
  75. #endif