# class TGLParametricEquation: public TNamed

```
A parametric surface is a surface defined by a parametric equation, involving
two parameters (u, v):

S(u, v) = (x(u, v), y(u, v), z(u, v)).
For example, "limpet torus" surface can be defined as:
x = cos(u) / (sqrt(2) + sin(v))
y = sin(u) / (sqrt(2) + sin(v))
z = 1 / (sqrt(2) + cos(v)),
where -pi <= u <= pi, -pi <= v <= pi.

TGLParametricEquation * eq =
new TGLParametricEquation("Limpet_torus", "cos(u) / (sqrt(2.) + sin(v))",
"sin(u) / (sqrt(2.) + sin(v))",
"1 / (sqrt(2) + cos(v))");

\$ROOTSYS/tutorials/gl/glparametric.C contains more examples.

Parametric equations can be specified:
1. by string expressions, as with TF2, but with 'u' instead of 'x' and
2. by function - see ParametricEquation_t declaration.
```

## Function Members (Methods)

public:
 TGLParametricEquation(const TString& name, ParametricEquation_t equation, Double_t uMin, Double_t uMax, Double_t vMin, Double_t vMax) TGLParametricEquation(const TString& name, const TString& xEquation, const TString& yEquation, const TString& zEquation, Double_t uMin, Double_t uMax, Double_t vMin, Double_t vMax) ~TGLParametricEquation() void TObject::AbstractMethod(const char* method) const virtual void TObject::AppendPad(Option_t* option = "") virtual void TObject::Browse(TBrowser* b) static TClass* Class() virtual const char* TObject::ClassName() const virtual void TNamed::Clear(Option_t* option = "") virtual TObject* TNamed::Clone(const char* newname = "") const virtual Int_t TNamed::Compare(const TObject* obj) const virtual void TNamed::Copy(TObject& named) const virtual void TObject::Delete(Option_t* option = "") virtual Int_t DistancetoPrimitive(Int_t px, Int_t py) virtual void TObject::Draw(Option_t* option = "") virtual void TObject::DrawClass() const virtual TObject* TObject::DrawClone(Option_t* option = "") const virtual void TObject::Dump() const virtual void TObject::Error(const char* method, const char* msgfmt) const void EvalVertex(TGLVertex3& newVertex, Double_t u, Double_t v) const virtual void TObject::Execute(const char* method, const char* params, Int_t* error = 0) virtual void TObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0) virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py) virtual void TObject::Fatal(const char* method, const char* msgfmt) const virtual void TNamed::FillBuffer(char*& buffer) virtual TObject* TObject::FindObject(const char* name) const virtual TObject* TObject::FindObject(const TObject* obj) const virtual Option_t* TObject::GetDrawOption() const static Long_t TObject::GetDtorOnly() virtual const char* TObject::GetIconName() const virtual const char* TNamed::GetName() const virtual char* GetObjectInfo(Int_t px, Int_t py) const static Bool_t TObject::GetObjectStat() virtual Option_t* TObject::GetOption() const virtual const char* TNamed::GetTitle() const virtual UInt_t TObject::GetUniqueID() const Rgl::Range_t GetURange() const Rgl::Range_t GetVRange() const virtual Bool_t TObject::HandleTimer(TTimer* timer) virtual ULong_t TNamed::Hash() const virtual void TObject::Info(const char* method, const char* msgfmt) const virtual Bool_t TObject::InheritsFrom(const char* classname) const virtual Bool_t TObject::InheritsFrom(const TClass* cl) const virtual void TObject::Inspect() const void TObject::InvertBit(UInt_t f) virtual TClass* IsA() const Bool_t IsConstrained() const virtual Bool_t TObject::IsEqual(const TObject* obj) const virtual Bool_t TObject::IsFolder() const Bool_t IsModified() const Bool_t TObject::IsOnHeap() const virtual Bool_t TNamed::IsSortable() const Bool_t TObject::IsZombie() const virtual void TNamed::ls(Option_t* option = "") const void TObject::MayNotUse(const char* method) const virtual Bool_t TObject::Notify() static void TObject::operator delete(void* ptr) static void TObject::operator delete(void* ptr, void* vp) static void TObject::operator delete[](void* ptr) static void TObject::operator delete[](void* ptr, void* vp) void* TObject::operator new(size_t sz) void* TObject::operator new(size_t sz, void* vp) void* TObject::operator new[](size_t sz) void* TObject::operator new[](size_t sz, void* vp) virtual void Paint(Option_t* option) virtual void TObject::Pop() virtual void TNamed::Print(Option_t* option = "") const virtual Int_t TObject::Read(const char* name) virtual void TObject::RecursiveRemove(TObject* obj) void TObject::ResetBit(UInt_t f) virtual void TObject::SaveAs(const char* filename = "", Option_t* option = "") const virtual void TObject::SavePrimitive(basic_ostream >& out, Option_t* option = "") void TObject::SetBit(UInt_t f) void TObject::SetBit(UInt_t f, Bool_t set) void SetConstrained(Bool_t c) virtual void TObject::SetDrawOption(Option_t* option = "") static void TObject::SetDtorOnly(void* obj) void SetModified(Bool_t m) virtual void TNamed::SetName(const char* name) virtual void TNamed::SetNameTitle(const char* name, const char* title) static void TObject::SetObjectStat(Bool_t stat) virtual void TNamed::SetTitle(const char* title = "") virtual void TObject::SetUniqueID(UInt_t uid) virtual void ShowMembers(TMemberInspector& insp, char* parent) virtual Int_t TNamed::Sizeof() const virtual void Streamer(TBuffer& b) void StreamerNVirtual(TBuffer& b) virtual void TObject::SysError(const char* method, const char* msgfmt) const Bool_t TObject::TestBit(UInt_t f) const Int_t TObject::TestBits(UInt_t f) const virtual void TObject::UseCurrentStyle() virtual void TObject::Warning(const char* method, const char* msgfmt) const virtual Int_t TObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) virtual Int_t TObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) const
protected:
 virtual void TObject::DoError(int level, const char* location, const char* fmt, va_list va) const void TObject::MakeZombie()
private:

## Data Members

public:
 enum TObject::EStatusBits { kCanDelete kMustCleanup kObjInCanvas kIsReferenced kHasUUID kCannotPick kNoContextMenu kInvalidObject }; enum TObject::[unnamed] { kIsOnHeap kNotDeleted kZombie kBitMask kSingleKey kOverwrite kWriteDelete };
protected:
 TString TNamed::fName object identifier TString TNamed::fTitle object title
private:
 Bool_t fConstrained ParametricEquation_t fEquation Bool_t fModified auto_ptr fPainter pair fURange pair fVRange auto_ptr fXEquation auto_ptr fYEquation auto_ptr fZEquation

## Function documentation

TGLParametricEquation(const TString& name, const TString& xEquation, const TString& yEquation, const TString& zEquation, Double_t uMin, Double_t uMax, Double_t vMin, Double_t vMax)
```Surface is defined by three strings.
ROOT does not use exceptions in ctors,
so, I have to use MakeZombie to let
```
TGLParametricEquation(const TString& name, ParametricEquation_t equation, Double_t uMin, Double_t uMax, Double_t vMin, Double_t vMax)
```Surface defined by user's function (see ParametricEquation_t declaration in TGLParametricEquation.h)
```
Rgl::Range_t GetURange()
```[uMin, uMax]
```
Rgl::Range_t GetVRange()
```[vMin, vMax]
```

```Check is constrained.
```
void SetConstrained(Bool_t c)
```Set constrained.
```

```Something was changed in parametric equation (or constrained option was changed).
```
void SetModified(Bool_t m)
```Set modified.
```
void EvalVertex(TGLVertex3& newVertex, Double_t u, Double_t v) const
```Calculate vertex.
```

```Check, if parametric surface is under cursor.
```
void ExecuteEvent(Int_t event, Int_t px, Int_t py)
```Pass event to painter.
```
char * GetObjectInfo(Int_t px, Int_t py) const
```No object info yet.
```
void Paint(Option_t* option)
```Delegate paint.
```
TGLParametricEquation(const TString& name, const TString& xEquation, const TString& yEquation, const TString& zEquation, Double_t uMin, Double_t uMax, Double_t vMin, Double_t vMax)

Author: Timur Pocheptsov 26/01/2007
Last update: root/gl:\$Id: TGLParametric.h 20882 2007-11-19 11:31:26Z rdm \$