Render a TF2 looking like a rose.
It defines and set a user's palette, and use polar system.
void glrose()
{
const Int_t paletteSize = 10;
{0.80f, 0.55f, 0.40f,
0.85f, 0.60f, 0.45f,
0.90f, 0.65f, 0.50f,
0.95f, 0.70f, 0.55f,
1.f, 0.75f, 0.60f,
1.f, 0.80f, 0.65f,
1.f, 0.85f, 0.70f,
1.f, 0.90f, 0.75f,
1.f, 0.95f, 0.80f,
1.f, 1.f, 0.85f};
Int_t palette[paletteSize] = {0};
for (
Int_t i = 0; i < paletteSize; ++i)
TCanvas *cnv =
new TCanvas(
"glc",
"Surface sample", 200, 10, 600, 550);
"\"glsurf2pol\" option + user defined palette.");
TPad *rosePad =
new TPad(
"box",
"box", 0.04, 0.04, 0.96, 0.8);
TF2 *fun =
new TF2(
"a",
"cos(y)*sin(x)+cos(x)*sin(y)", -6, 6, -6, 6);
}
- Author
- Timur Pocheptsov
Definition in file glrose.C.