Create and draw a polar graph.
void graphpolar()
{
TF1 * fplot =
new TF1(
"fplot",
"cos(2*x)*cos(20*x)",xmin,xmax);
for (
Int_t ipt = 0; ipt < 1000; ipt++){
x[ipt] = ipt*(xmax-
xmin)/1000+xmin;
y[ipt] = fplot->
Eval(x[ipt]);
}
for (
Int_t ipt = 0; ipt < 20; ipt++){
xval1[ipt] = x[1000/20*ipt];
yval1[ipt] = y[1000/20*ipt];
}
for (
Int_t ipt = 0; ipt < 30; ipt++){
x2[ipt] = x[1000/30*ipt];
ey[ipt] = 0.2;
}
}
- Author
- Olivier Couet
Definition in file graphpolar.C.