Skip to main content

Module spacetime

Module spacetime 

Source
Expand description

Spacetime diagrams: Minkowski, Penrose, worldlines, causal structure.

Structs§

MinkowskiDiagram
Minkowski diagram containing events and worldlines.
PenroseDiagram
Penrose diagram: conformal compactification of spacetime.
SpacetimeEvent
An event in spacetime.
SpacetimeRenderer
Spacetime renderer for Minkowski diagrams.
Worldline
A worldline: a sequence of spacetime events.

Functions§

boost_diagram
Lorentz-transform all events in a diagram.
causal_structure
Compute the causal structure matrix. Returns a matrix where entry [i][j] is true if event i can causally influence event j.
invariant_interval
Compute the invariant interval between two events.
is_lightlike
Check if two events are lightlike (null) separated (ds^2 ~ 0).
is_spacelike
Check if two events are spacelike separated (ds^2 < 0).
is_timelike
Check if two events are timelike separated (ds^2 > 0).
light_cone
Compute the light cone from an event. Returns (future_cone, past_cone) as line segments in (x, t) space.
light_cone_grid
Generate a grid of light cones for visualization.
penrose_transform
Transform Minkowski coordinates (t, r) to Penrose coordinates. Uses the conformal compactification: T = arctan(t + r) + arctan(t - r) X = arctan(t + r) - arctan(t - r)
proper_time_along_worldline
Compute proper time along a worldline. tau = integral of sqrt(c^2 dt^2 - dx^2) / c.