How do the Einstein@home sky-ball rotate ?

Anonymous
Topic 13417

From the code:

GLfloat wobble_amp = 37.0;       // wobble amplitude, in degrees
GLfloat wobble_period = 17.0;    // wobble up/down period, in minutes

vp_theta = 90.0 - viewpt_elev + wobble_amp*sin(PI2*t/(wobble_period*60.0));

In words: the viewpoint is wobbled up and down by +- 37 degrees, with a 17-minute period. This is of course in addition to the regular rotation.

Cheers,
Bruce

Bruce Allen
Bruce Allen
Joined: 15 Oct 04
Posts: 958
Credit: 170,849,008
RAC: 0

How do the Einstein@home sky-ball rotate ?

Quote:

from what Bruce posted i see that code is written in c and using OpenGL
i just did not expect that you would be calculating SINuses

you could simply precalculate the values of sinuses and pick up precalculated values from the table.

Actually the screensaver code is C++. Profiling the code shows that the sin() and cos() calls in this routine do not use significant CPU. So there's no point is using a lookup table.

Cheers,
Bruce

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.