Skip to main content

render_moving_cube

Function render_moving_cube 

Source
pub fn render_moving_cube(
    velocity: Vec3,
    observer: Vec3,
    cube_vertices: &[Vec3],
    c: f64,
    time: f64,
) -> Vec<Vec3>
Expand description

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.