// Animation loop (frames counted by 'frame' variable) for (int frame=0; true; frame++) { // Limit frame count if necessary, e.g., frame<=1000 // Calculate time t based on the current frame float t = 0.05 * frame; // Larger coefficient = faster animation // Update coordinate arrays for(int i=0; i