Skip to main content

Module terrell

Module terrell 

Source
Expand description

Terrell rotation: apparent rotation of fast-moving objects due to finite light speed.

Structs§

TerellRenderer
Terrell renderer: renders fast-moving objects with apparent rotation.

Functions§

apparent_position
Compute the apparent position of an object accounting for light travel time. The observer sees the object at its retarded position.
finite_light_speed_positions
For multiple objects, compute where they appear based on retarded time. Each object is (position, velocity). Returns apparent positions.
light_travel_delays
Compute the time delay for light from each vertex to reach the observer.
render_moving_cube
Render a moving cube: compute apparent vertex positions considering light travel time. velocity is the cube’s velocity, observer is the observer position. cube_vertices are the 8 corners of the cube in the cube’s rest frame.
retarded_time
Compute the retarded time: the time at which light must have left the object to arrive at the observer at the current time. t_retarded = t - |object_pos - observer_pos| / c
sphere_appearance_deviation
Check if Terrell rotation makes a sphere still appear circular. Returns the max deviation from circular appearance.
terrell_rotation_angle
Terrell rotation angle: the apparent rotation angle of an object moving at speed v. For an object at angle object_angle from the direction of motion, the apparent rotation is approximately arcsin(v/c).
unit_cube_vertices
Generate unit cube vertices centered at origin.