Logo ROOT   6.10/09
Reference Guide
TPainter3dAlgorithms.h
Go to the documentation of this file.
1 // @(#)root/histpainter:$Id$
2 // Author: Rene Brun, Evgueni Tcherniaev, Olivier Couet 12/12/94
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 
12 #ifndef ROOT_TPainter3dAlgorithms
13 #define ROOT_TPainter3dAlgorithms
14 
15 #include "TObject.h"
16 
17 #include "TAttLine.h"
18 
19 #include "TAttFill.h"
20 
21 const Int_t kCARTESIAN = 1;
22 const Int_t kPOLAR = 2;
23 const Int_t kCYLINDRICAL = 3;
24 const Int_t kSPHERICAL = 4;
25 const Int_t kRAPIDITY = 5;
26 
27 class TF3;
28 
29 class TPainter3dAlgorithms : public TObject, public TAttLine, public TAttFill {
30 
31 private:
32  Double_t fRmin[3]; /// Lower limits of lego
33  Double_t fRmax[3]; /// Upper limits of lego
34  Double_t fAphi[183]; ///
35  Int_t fSystem; /// Coordinate system
44  Int_t fMesh; /// (=1 if mesh to draw, o otherwise)
45  Int_t fNStack; /// Number of histograms in the stack to be painted
46  Double_t fFmin; /// IsoSurface minimum function value
47  Double_t fFmax; /// IsoSurface maximum function value
48  Int_t fNcolor; /// Number of colours per Iso surface
49  Int_t fIc1; /// Base colour for the 1st Iso Surface
50  Int_t fIc2; /// Base colour for the 2nd Iso Surface
51  Int_t fIc3; /// Base colour for the 3rd Iso Surface
52 
53  static Int_t fgF3Clipping; /// Clipping box is off (0) or on (1)
54  static Double_t fgF3XClip; /// Clipping plane along X
55  static Double_t fgF3YClip; /// Clipping plane along Y
56  static Double_t fgF3ZClip; /// Clipping plane along Y
57  static TF3 *fgCurrentF3; /// Pointer to the 3D function to be paint.
58 
59 
60 public:
61  typedef void (TPainter3dAlgorithms::*DrawFaceFunc_t)(Int_t *, Double_t *, Int_t, Int_t *, Double_t *);
62  typedef void (TPainter3dAlgorithms::*LegoFunc_t)(Int_t,Int_t,Int_t&,Double_t*,Double_t*,Double_t*);
63  typedef void (TPainter3dAlgorithms::*SurfaceFunc_t)(Int_t,Int_t,Double_t*,Double_t*);
64 
65 private:
66  DrawFaceFunc_t fDrawFace; /// pointer to face drawing function
67  LegoFunc_t fLegoFunction; /// pointer to lego function
68  SurfaceFunc_t fSurfaceFunction; /// pointer to surface function
69 
70 public:
72  TPainter3dAlgorithms(Double_t *rmin, Double_t *rmax, Int_t system=1);
73  virtual ~TPainter3dAlgorithms();
74  void BackBox(Double_t ang);
75  void FrontBox(Double_t ang);
76  void DrawFaceGouraudShaded(Int_t *icodes, Double_t xyz[][3], Int_t np, Int_t *iface, Double_t *t);
77  void DrawFaceMode1(Int_t *icodes, Double_t *xyz, Int_t np, Int_t *iface, Double_t *t);
78  void DrawFaceMode2(Int_t *icodes, Double_t *xyz, Int_t np, Int_t *iface, Double_t *t);
79  void DrawFaceMode3(Int_t *icodes, Double_t *xyz, Int_t np, Int_t *iface, Double_t *t);
80  void DrawFaceMove1(Int_t *icodes, Double_t *xyz, Int_t np, Int_t *iface, Double_t *tt);
81  void DrawFaceMove2(Int_t *icodes, Double_t *xyz, Int_t np, Int_t *iface, Double_t *tt);
82  void DrawFaceMove3(Int_t *icodes, Double_t *xyz, Int_t np, Int_t *iface, Double_t *tt);
83  void DrawLevelLines(Int_t *icodes, Double_t *xyz, Int_t np, Int_t *iface, Double_t *tt);
84  void DrawFaceRaster1(Int_t *icodes, Double_t *xyz, Int_t np, Int_t *iface, Double_t *tt);
85  void DrawFaceRaster2(Int_t *icodes, Double_t *xyz, Int_t np, Int_t *iface, Double_t *tt);
86  void GouraudFunction(Int_t ia, Int_t ib, Double_t *f, Double_t *t);
87  void ImplicitFunction(Double_t *rmin, Double_t *rmax, Int_t nx, Int_t ny, Int_t nz, const char *chopt);
88  void IsoSurface (Int_t ns, Double_t *s, Int_t nx, Int_t ny, Int_t nz, Double_t *x, Double_t *y, Double_t *z, const char *chopt);
89  void LegoCartesian(Double_t ang, Int_t nx, Int_t ny, const char *chopt);
90  void LegoFunction(Int_t ia, Int_t ib, Int_t &nv, Double_t *ab, Double_t *vv, Double_t *t);
91  void LegoPolar(Int_t iordr, Int_t na, Int_t nb, const char *chopt);
92  void LegoCylindrical(Int_t iordr, Int_t na, Int_t nb, const char *chopt);
93  void LegoSpherical(Int_t ipsdr, Int_t iordr, Int_t na, Int_t nb, const char *chopt);
94  void SetDrawFace(DrawFaceFunc_t pointer);
95  void SetIsoSurfaceParameters(Double_t fmin, Double_t fmax, Int_t ncolor, Int_t ic1, Int_t ic2, Int_t ic3){fFmin=fmin; fFmax=fmax; fNcolor=ncolor; fIc1=ic1; fIc2=ic2; fIc3=ic3;}
96  void SetLegoFunction(LegoFunc_t pointer);
97  void SetMesh(Int_t mesh=1) {fMesh=mesh;}
98  void SetSurfaceFunction(SurfaceFunc_t pointer);
99  void SetColorDark(Color_t color, Int_t n=0);
100  void SetColorMain(Color_t color, Int_t n=0);
101  void SetEdgeAtt(Color_t color=1, Style_t style=1, Width_t width=1, Int_t n=0);
102  void SideVisibilityDecode(Double_t val, Int_t &iv1, Int_t &iv2, Int_t &iv3, Int_t &iv4, Int_t &iv5, Int_t &iv6, Int_t &ir);
103  void SideVisibilityEncode(Int_t iopt, Double_t phi1, Double_t phi2, Double_t &val);
104  void SurfaceCartesian(Double_t ang, Int_t nx, Int_t ny, const char *chopt);
105  void SurfacePolar(Int_t iordr, Int_t na, Int_t nb, const char *chopt);
106  void SurfaceCylindrical(Int_t iordr, Int_t na, Int_t nb, const char *chopt);
107  void SurfaceFunction(Int_t ia, Int_t ib, Double_t *f, Double_t *t);
108  void SurfaceSpherical(Int_t ipsdr, Int_t iordr, Int_t na, Int_t nb, const char *chopt);
109 
110  static void SetF3(TF3 *f3);
111  static void SetF3ClippingBoxOff();
112  static void SetF3ClippingBoxOn(Double_t xclip, Double_t yclip, Double_t zclip);
113 
114 // Color and function levels
115 //
116 public:
117  void DefineGridLevels(Int_t ndivz);
118  void ColorFunction(Int_t nl, Double_t *fl, Int_t *icl, Int_t &irep);
119  void Spectrum(Int_t nl, Double_t fmin, Double_t fmax, Int_t ic, Int_t idc, Int_t &irep);
120  void FindLevelLines(Int_t np, Double_t *f, Double_t *t);
121  void FindPartEdge(Double_t *p1, Double_t *p2, Double_t f1, Double_t f2, Double_t fmin, Double_t fmax, Int_t &kpp, Double_t *pp);
122  void FillPolygon(Int_t n, Double_t *p, Double_t *f);
123 
124 private:
125  static const Int_t NumOfColorLevels = 256;
126  Int_t fNlevel; // Number of color levels
127  Double_t fFunLevel[NumOfColorLevels+1]; // Function levels corresponding to colors
128  Int_t fColorLevel[NumOfColorLevels+2]; // Color levels corresponding to functions
129 
130  static const Int_t NumOfLevelLines = 200;
131  Int_t fNlines; // Number of lines
132  Int_t fLevelLine[NumOfLevelLines]; // Corresponding levels
133  Double_t fPlines[NumOfLevelLines*6]; // End points of lines
134 
135 // Light and surface properties
136 //
137 public:
138  void LightSource(Int_t nl, Double_t yl, Double_t xscr, Double_t yscr, Double_t zscr, Int_t &irep);
139  void Luminosity(Double_t *anorm, Double_t &flum);
140  void SurfaceProperty(Double_t qqa, Double_t qqd, Double_t qqs, Int_t nnqs, Int_t &irep);
141 
142 private:
143  static const Int_t NumOfLights = 4;
144  Int_t fLoff;
145  Double_t fYdl;
146  Double_t fYls[NumOfLights];
147  Double_t fVls[NumOfLights*3];
148  Double_t fQA;
149  Double_t fQD;
150  Double_t fQS;
151  Int_t fNqs;
152 
153 // Moving screen - specialized hidden line removal algorithm
154 // for rendering 2D histograms
155 //
156 public:
157  void InitMoveScreen(Double_t xmin, Double_t xmax);
158  void FindVisibleDraw(Double_t *r1, Double_t *r2);
159  void ModifyScreen(Double_t *r1, Double_t *r2);
160 
161 private:
162  static const Int_t MaxNT = 100;
163  Double_t fX0; // minimal x
164  Double_t fDX; // x size
165  Int_t fNT; // number of t-segments
166  Double_t fT[MaxNT*2]; // t-segments
167 
168  static const Int_t NumOfSlices = 2000;
169  Double_t fU[NumOfSlices*2];
170  Double_t fD[NumOfSlices*2];
171 
172 // Raster screen - specialized hidden line removal algorithm
173 // for rendering 3D polygons ordered by depth (front-to-back)
174 //
175 public:
176  void InitRaster(Double_t xmin, Double_t ymin, Double_t xmax, Double_t ymax, Int_t nx, Int_t ny);
177  void ClearRaster();
178  void FindVisibleLine(Double_t *p1, Double_t *p2, Int_t ntmax, Int_t &nt, Double_t *t);
179  void FillPolygonBorder(Int_t nn, Double_t *xy);
180 
181 private:
182  Double_t fXrast; // minimal x
183  Double_t fYrast; // minimal y
184  Double_t fDXrast; // x size
185  Double_t fDYrast; // y size
186  Int_t fNxrast; // number of pixels in x
187  Int_t fNyrast; // number of pixels in y
188  Int_t fIfrast; // flag, if it not zero them the algorithm is off
189  Int_t *fRaster; // pointer to raster buffer
190  Int_t fJmask[30]; // indices of subsets of n-bit masks (n is from 1 to 30)
191  Int_t fMask[465]; // set of masks (30+29+28+...+1)=465
192 
193 // Marching Cubes 33 - constrction of iso-surfaces, see publication CERN-CN-95-17
194 //
195 public:
196  void MarchingCube(Double_t fiso, Double_t p[8][3], Double_t f[8], Double_t g[8][3], Int_t &nnod, Int_t &ntria, Double_t xyz[][3], Double_t grad[][3], Int_t itria[][3]);
197 
198 protected:
199  void MarchingCubeCase00(Int_t k1, Int_t k2, Int_t k3, Int_t k4, Int_t k5, Int_t k6, Int_t &nnod, Int_t &ntria, Double_t xyz[52][3], Double_t grad[52][3], Int_t itria[48][3]);
200  void MarchingCubeCase03(Int_t &nnod, Int_t &ntria, Double_t xyz[52][3], Double_t grad[52][3], Int_t itria[48][3]);
201  void MarchingCubeCase04(Int_t &nnod, Int_t &ntria, Double_t xyz[52][3], Double_t grad[52][3], Int_t itria[48][3]);
202  void MarchingCubeCase06(Int_t &nnod, Int_t &ntria, Double_t xyz[52][3], Double_t grad[52][3], Int_t itria[48][3]);
203  void MarchingCubeCase07(Int_t &nnod, Int_t &ntria, Double_t xyz[52][3], Double_t grad[52][3], Int_t itria[48][3]);
204  void MarchingCubeCase10(Int_t &nnod, Int_t &ntria, Double_t xyz[52][3], Double_t grad[52][3], Int_t itria[48][3]);
205  void MarchingCubeCase12(Int_t &nnod, Int_t &ntria, Double_t xyz[52][3], Double_t grad[52][3], Int_t itria[48][3]);
206  void MarchingCubeCase13(Int_t &nnod, Int_t &ntria, Double_t xyz[52][3], Double_t grad[52][3], Int_t itria[48][3]);
207  void MarchingCubeSetTriangles(Int_t ntria, Int_t it[][3], Int_t itria[48][3]);
208  void MarchingCubeMiddlePoint(Int_t nnod, Double_t xyz[52][3], Double_t grad[52][3], Int_t it[][3], Double_t *pxyz, Double_t *pgrad);
209  void MarchingCubeSurfacePenetration(Double_t a00, Double_t a10, Double_t a11, Double_t a01, Double_t b00, Double_t b10, Double_t b11, Double_t b01, Int_t &irep);
210  void MarchingCubeFindNodes(Int_t nnod, Int_t *ie, Double_t xyz[52][3], Double_t grad[52][3]);
211 
212 private:
213  Double_t fP8[8][3]; // vertices
214  Double_t fF8[8]; // function values
215  Double_t fG8[8][3]; // function gradients
216 
217 // Z-depth sorting algorithm for set of triangles
218 //
219 public:
220  void ZDepth(Double_t xyz[52][3], Int_t &nface, Int_t iface[48][3], Double_t dface[48][6], Double_t abcd[48][4], Int_t *iorder);
221 
222 protected:
223  void TestEdge(Double_t del, Double_t xyz[52][3], Int_t i1, Int_t i2, Int_t iface[3], Double_t abcd[4], Int_t &irep);
224 
225 public:
226  ClassDef(TPainter3dAlgorithms,0) //Hidden line removal package
227 };
228 
229 #endif
const int nx
Definition: kalman.C:16
void SideVisibilityEncode(Int_t iopt, Double_t phi1, Double_t phi2, Double_t &val)
Encode side visibilities and order along R for sector.
void SurfaceProperty(Double_t qqa, Double_t qqd, Double_t qqs, Int_t nnqs, Int_t &irep)
Set surface property coefficients.
float xmin
Definition: THbookFile.cxx:93
void MarchingCubeCase12(Int_t &nnod, Int_t &ntria, Double_t xyz[52][3], Double_t grad[52][3], Int_t itria[48][3])
Consider case No 12.
void MarchingCubeCase00(Int_t k1, Int_t k2, Int_t k3, Int_t k4, Int_t k5, Int_t k6, Int_t &nnod, Int_t &ntria, Double_t xyz[52][3], Double_t grad[52][3], Int_t itria[48][3])
Consideration of trivial cases: 1,2,5,8,9,11,14.
void LegoCartesian(Double_t ang, Int_t nx, Int_t ny, const char *chopt)
Draw stack of lego-plots in cartesian coordinates.
void MarchingCubeCase06(Int_t &nnod, Int_t &ntria, Double_t xyz[52][3], Double_t grad[52][3], Int_t itria[48][3])
Consider case No 6.
void MarchingCubeSetTriangles(Int_t ntria, Int_t it[][3], Int_t itria[48][3])
Set triangles (if parameter IALL=1, all edges will be visible)
short Style_t
Definition: RtypesCore.h:76
void SetColorDark(Color_t color, Int_t n=0)
Store dark color for stack number n.
void SideVisibilityDecode(Double_t val, Int_t &iv1, Int_t &iv2, Int_t &iv3, Int_t &iv4, Int_t &iv5, Int_t &iv6, Int_t &ir)
Decode side visibilities and order along R for sector.
const double a11[11]
Definition: RooMath.cxx:487
void SetIsoSurfaceParameters(Double_t fmin, Double_t fmax, Int_t ncolor, Int_t ic1, Int_t ic2, Int_t ic3)
float ymin
Definition: THbookFile.cxx:93
Double_t fAphi[183]
Upper limits of lego.
void MarchingCubeFindNodes(Int_t nnod, Int_t *ie, Double_t xyz[52][3], Double_t grad[52][3])
Find nodes and normales.
void(TPainter3dAlgorithms::* SurfaceFunc_t)(Int_t, Int_t, Double_t *, Double_t *)
Int_t * fColorMain
Coordinate system.
virtual ~TPainter3dAlgorithms()
Lego default destructor.
void InitRaster(Double_t xmin, Double_t ymin, Double_t xmax, Double_t ymax, Int_t nx, Int_t ny)
Initialize hidden lines removal algorithm (RASTER SCREEN)
void DrawFaceMove3(Int_t *icodes, Double_t *xyz, Int_t np, Int_t *iface, Double_t *tt)
Draw face - 3rd variant for "MOVING SCREEN" algorithm (draw level lines only)
void SurfaceFunction(Int_t ia, Int_t ib, Double_t *f, Double_t *t)
Service function for Surfaces.
void ColorFunction(Int_t nl, Double_t *fl, Int_t *icl, Int_t &irep)
Set correspondance between function and color levels.
void MarchingCubeCase03(Int_t &nnod, Int_t &ntria, Double_t xyz[52][3], Double_t grad[52][3], Int_t itria[48][3])
Consider case No 3.
int Int_t
Definition: RtypesCore.h:41
void FindVisibleDraw(Double_t *r1, Double_t *r2)
Find visible parts of line (draw line)
void MarchingCubeCase10(Int_t &nnod, Int_t &ntria, Double_t xyz[52][3], Double_t grad[52][3], Int_t itria[48][3])
Consider case No 10.
static const Int_t NumOfLevelLines
void InitMoveScreen(Double_t xmin, Double_t xmax)
Initialize "MOVING SCREEN" method.
Double_t fFmax
IsoSurface minimum function value.
static Int_t fgF3Clipping
Base colour for the 3rd Iso Surface.
static Double_t fgF3YClip
Clipping plane along X.
static void SetF3(TF3 *f3)
Static function Store pointer to current implicit function.
void DefineGridLevels(Int_t ndivz)
Define the grid levels drawn in the background of surface and lego plots.
void LegoPolar(Int_t iordr, Int_t na, Int_t nb, const char *chopt)
Draw stack of lego-plots in polar coordinates.
void TestEdge(Double_t del, Double_t xyz[52][3], Int_t i1, Int_t i2, Int_t iface[3], Double_t abcd[4], Int_t &irep)
Test edge against face (triangle)
SurfaceFunc_t fSurfaceFunction
pointer to lego function
Fill Area Attributes class.
Definition: TAttFill.h:19
Double_t x[n]
Definition: legend1.C:17
void DrawFaceMode3(Int_t *icodes, Double_t *xyz, Int_t np, Int_t *iface, Double_t *t)
Draw face - 3rd option (draw face for stacked lego plot)
#define ClassDef(name, id)
Definition: Rtypes.h:297
void DrawFaceRaster1(Int_t *icodes, Double_t *xyz, Int_t np, Int_t *iface, Double_t *tt)
Draw face - 1st variant for "RASTER SCREEN" algorithm (draw face with level lines) ...
static const Int_t NumOfSlices
TText * tt
Definition: textangle.C:16
void LightSource(Int_t nl, Double_t yl, Double_t xscr, Double_t yscr, Double_t zscr, Int_t &irep)
Set light source.
static const Int_t MaxNT
const int ny
Definition: kalman.C:17
void SetMesh(Int_t mesh=1)
static double p2(double t, double a, double b, double c)
void DrawFaceMode2(Int_t *icodes, Double_t *xyz, Int_t np, Int_t *iface, Double_t *t)
Draw face - 2nd option (fill in correspondance with function levels)
void ImplicitFunction(Double_t *rmin, Double_t *rmax, Int_t nx, Int_t ny, Int_t nz, const char *chopt)
Draw implicit function FUN(X,Y,Z) = 0 in cartesian coordinates using hidden surface removal algorithm...
void DrawFaceMode1(Int_t *icodes, Double_t *xyz, Int_t np, Int_t *iface, Double_t *t)
Draw face - 1st variant (2 colors: 1st for external surface, 2nd for internal)
void LegoCylindrical(Int_t iordr, Int_t na, Int_t nb, const char *chopt)
Draw stack of lego-plots in cylindrical coordinates.
void DrawFaceMove1(Int_t *icodes, Double_t *xyz, Int_t np, Int_t *iface, Double_t *tt)
Draw face - 1st variant for "MOVING SCREEN" algorithm (draw face with level lines) ...
Double_t fYls[NumOfLights]
void ClearRaster()
Clear screen.
const Int_t kSPHERICAL
void DrawFaceMove2(Int_t *icodes, Double_t *xyz, Int_t np, Int_t *iface, Double_t *tt)
Draw face - 2nd variant for "MOVING SCREEN" algorithm (draw face for stacked lego plot) ...
void MarchingCubeCase13(Int_t &nnod, Int_t &ntria, Double_t xyz[52][3], Double_t grad[52][3], Int_t itria[48][3])
Consider case No 13.
short Color_t
Definition: RtypesCore.h:79
Int_t fNcolor
IsoSurface maximum function value.
void FillPolygon(Int_t n, Double_t *p, Double_t *f)
Fill polygon with function values at vertexes.
void SetDrawFace(DrawFaceFunc_t pointer)
Store pointer to current algorithm to draw faces.
void(TPainter3dAlgorithms::* DrawFaceFunc_t)(Int_t *, Double_t *, Int_t, Int_t *, Double_t *)
Pointer to the 3D function to be paint.
float ymax
Definition: THbookFile.cxx:93
void SetColorMain(Color_t color, Int_t n=0)
Store color for stack number n.
void IsoSurface(Int_t ns, Double_t *s, Int_t nx, Int_t ny, Int_t nz, Double_t *x, Double_t *y, Double_t *z, const char *chopt)
Draw set of iso-surfaces for a scalar function defined on a grid.
Double_t fPlines[NumOfLevelLines *6]
void FrontBox(Double_t ang)
Draw front surfaces of surrounding box & axes.
Int_t fIc2
Base colour for the 1st Iso Surface.
XPoint xy[kMAXMK]
Definition: TGX11.cxx:122
void FindLevelLines(Int_t np, Double_t *f, Double_t *t)
Find level lines for face.
const Int_t kPOLAR
A 3-Dim function with parameters.
Definition: TF3.h:28
Double_t fU[NumOfSlices *2]
void LegoSpherical(Int_t ipsdr, Int_t iordr, Int_t na, Int_t nb, const char *chopt)
Draw stack of lego-plots spheric coordinates.
static const Int_t NumOfLights
void LegoFunction(Int_t ia, Int_t ib, Int_t &nv, Double_t *ab, Double_t *vv, Double_t *t)
Service function for Legos.
unsigned int r1[N_CITIES]
Definition: simanTSP.cxx:321
void SurfaceCylindrical(Int_t iordr, Int_t na, Int_t nb, const char *chopt)
Draw surface in cylindrical coordinates.
void MarchingCubeCase07(Int_t &nnod, Int_t &ntria, Double_t xyz[52][3], Double_t grad[52][3], Int_t itria[48][3])
Consider case No 7.
void Luminosity(Double_t *anorm, Double_t &flum)
Find surface luminosity at given point.
float xmax
Definition: THbookFile.cxx:93
static double p1(double t, double a, double b)
Double_t fRmax[3]
Lower limits of lego.
void DrawLevelLines(Int_t *icodes, Double_t *xyz, Int_t np, Int_t *iface, Double_t *tt)
Draw level lines without hidden line removal.
void SetLegoFunction(LegoFunc_t pointer)
Store pointer to current lego function.
short Width_t
Definition: RtypesCore.h:78
void SurfaceSpherical(Int_t ipsdr, Int_t iordr, Int_t na, Int_t nb, const char *chopt)
Draw surface in spheric coordinates.
void MarchingCubeCase04(Int_t &nnod, Int_t &ntria, Double_t xyz[52][3], Double_t grad[52][3], Int_t itria[48][3])
Consider case No 4.
void MarchingCubeMiddlePoint(Int_t nnod, Double_t xyz[52][3], Double_t grad[52][3], Int_t it[][3], Double_t *pxyz, Double_t *pgrad)
Find middle point of a polygon.
Int_t fIc1
Number of colours per Iso surface.
const Int_t kCYLINDRICAL
double f(double x)
void DrawFaceGouraudShaded(Int_t *icodes, Double_t xyz[][3], Int_t np, Int_t *iface, Double_t *t)
Draw the faces for the Gouraud Shaded Iso surfaces.
double Double_t
Definition: RtypesCore.h:55
The Legos and Surfaces painter class.
static Double_t fgF3ZClip
Clipping plane along Y.
void ZDepth(Double_t xyz[52][3], Int_t &nface, Int_t iface[48][3], Double_t dface[48][6], Double_t abcd[48][4], Int_t *iorder)
Z-depth algorithm for set of triangles.
TCanvas * style()
Definition: style.C:1
Double_t y[n]
Definition: legend1.C:17
static void SetF3ClippingBoxOn(Double_t xclip, Double_t yclip, Double_t zclip)
Static function Set the implicit function clipping box "on" and define the clipping box...
void SetEdgeAtt(Color_t color=1, Style_t style=1, Width_t width=1, Int_t n=0)
LegoFunc_t fLegoFunction
pointer to face drawing function
void Spectrum(Int_t nl, Double_t fmin, Double_t fmax, Int_t ic, Int_t idc, Int_t &irep)
Set Spectrum.
void(TPainter3dAlgorithms::* LegoFunc_t)(Int_t, Int_t, Int_t &, Double_t *, Double_t *, Double_t *)
void MarchingCube(Double_t fiso, Double_t p[8][3], Double_t f[8], Double_t g[8][3], Int_t &nnod, Int_t &ntria, Double_t xyz[][3], Double_t grad[][3], Int_t itria[][3])
Topological decider for "Marching Cubes" algorithm Find set of triangles approximating the iso-surfac...
Int_t fColorLevel[NumOfColorLevels+2]
void BackBox(Double_t ang)
Draw back surfaces of surrounding box.
Mother of all ROOT objects.
Definition: TObject.h:37
you should not use this method at all Int_t Int_t z
Definition: TRolke.cxx:630
typedef void((*Func_t)())
static TF3 * fgCurrentF3
Clipping plane along Y.
void FindVisibleLine(Double_t *p1, Double_t *p2, Int_t ntmax, Int_t &nt, Double_t *t)
Find visible part of a line ("RASTER SCREEN")
Double_t fFmin
Number of histograms in the stack to be painted.
Int_t fNStack
(=1 if mesh to draw, o otherwise)
void FindPartEdge(Double_t *p1, Double_t *p2, Double_t f1, Double_t f2, Double_t fmin, Double_t fmax, Int_t &kpp, Double_t *pp)
Find part of edge where function defined on this edge has value from fmin to fmax ...
double f2(const double *x)
static const Int_t NumOfColorLevels
Int_t fLevelLine[NumOfLevelLines]
void MarchingCubeSurfacePenetration(Double_t a00, Double_t a10, Double_t a11, Double_t a01, Double_t b00, Double_t b10, Double_t b11, Double_t b01, Int_t &irep)
Check for surface penetration ("bottle neck")
static void SetF3ClippingBoxOff()
Static function Set the implicit function clipping box "off".
void DrawFaceRaster2(Int_t *icodes, Double_t *xyz, Int_t np, Int_t *iface, Double_t *tt)
Draw face - 2nd variant for "RASTER SCREEN" algorithm (draw face for stacked lego plot) ...
TF1 * f1
Definition: legend1.C:11
const Int_t kRAPIDITY
static Double_t fgF3XClip
Clipping box is off (0) or on (1)
void ModifyScreen(Double_t *r1, Double_t *r2)
Modify SCREEN.
void SurfacePolar(Int_t iordr, Int_t na, Int_t nb, const char *chopt)
Draw surface in polar coordinates.
void SurfaceCartesian(Double_t ang, Int_t nx, Int_t ny, const char *chopt)
Draw surface in cartesian coordinate system.
void SetSurfaceFunction(SurfaceFunc_t pointer)
Store pointer to current surface function.
Int_t fIc3
Base colour for the 2nd Iso Surface.
const int nn
TPainter3dAlgorithms()
pointer to surface function
Double_t fD[NumOfSlices *2]
const Int_t kCARTESIAN
void GouraudFunction(Int_t ia, Int_t ib, Double_t *f, Double_t *t)
Find part of surface with luminosity in the corners.
Double_t fFunLevel[NumOfColorLevels+1]
const Int_t n
Definition: legend1.C:16
Line Attributes class.
Definition: TAttLine.h:18
void FillPolygonBorder(Int_t nn, Double_t *xy)
Fill a polygon including border ("RASTER SCREEN")
unsigned int r2[N_CITIES]
Definition: simanTSP.cxx:322
Double_t fVls[NumOfLights *3]