Show 3-d polymarker.
int d = 16;
int numberOfPoints=200;
int numberOfCircles=40;
float range = numberOfCircles*d;
view->
SetRange( 0, 0, 0, 4.0*range, 2.0*range, range );
for( int j = d; j < numberOfCircles*d; j += d ) {
for( int i = 1; i < numberOfPoints; i++ ) {
float csin =
sin(2*PI / (
double)numberOfPoints * (
double)i) + 1;
float ccos =
cos(2*PI / (
double)numberOfPoints * (
double)i) + 1;
float esin =
sin(2*PI / (
double)(numberOfCircles*d) * (
double)j) + 1;
x = j * ( csin + esin );
y = j * ccos;
z = j;
}
}
char timeStr[60];
sprintf( timeStr, "Execution time: %g sec.", ct);
text->
AddText(
"ROOT example: tornado.C");
}
- Author
- Rene Brun
Definition in file tornado.C.