Skip to content

Commit 9ab3586

Browse files
authored
[skip-ci]
improve TF3 documentation
1 parent d82f047 commit 9ab3586

File tree

1 file changed

+21
-2
lines changed

1 file changed

+21
-2
lines changed

hist/hist/src/TF3.cxx

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,26 @@
2727

2828
/** \class TF3
2929
\ingroup Functions
30-
A 3-Dim function with parameters
30+
TF3 defines a 3D Function with Parameters.
31+
32+
3D implicit functions can be visualized as iso-surfaces. An implicit surface is defined
33+
by the equation f(x,y,z) = 0 and is rendered in Cartesian coordinates.
34+
35+
In the example below, the drawing options "FB" and "BB" are used to remove the
36+
front box and back box of the 3D frame keeping only the three axes.
37+
38+
Begin_Macro(source)
39+
{
40+
auto C = new TCanvas("C","C",500,500);
41+
auto f3 = new TF3("gyroid",
42+
"sin(x)*cos(y) + sin(y)*cos(z) + sin(z)*cos(x)",
43+
-4, 4, -4, 4, -4, 4);
44+
f3->SetFillColor(50);
45+
f3->SetLineColor(15);
46+
f3->Draw("FBBB");
47+
}
48+
End_Macro
49+
3150
*/
3251

3352
////////////////////////////////////////////////////////////////////////////////
@@ -188,7 +207,7 @@ Int_t TF3::DistancetoPrimitive(Int_t px, Int_t py)
188207
}
189208

190209
////////////////////////////////////////////////////////////////////////////////
191-
/// Draw this function with its current attributes
210+
/// Draw this function with iso-surfaces.
192211

193212
void TF3::Draw(Option_t *option)
194213
{

0 commit comments

Comments
 (0)