Synodic Frame Trajectory Plots¶
plot_synodic_3d ¶
plot_synodic_3d(trajectories, *, frame='EMR', reference_epoch=None, bodies=None, units='km', view_azimuth=45.0, view_elevation=30.0, view_distance=None, sphere_resolution_lon=360, sphere_resolution_lat=180, backend='matplotlib', width=None, height=None) -> object
Plot 3D trajectories in a synodic (two-body rotating) frame.
Each trajectory is converted to its ECI representation and then transformed per-epoch into the requested synodic frame via state_frame_to_frame. The frame's primary and secondary bodies are drawn as textured spheres at their synodic-frame positions at a single reference epoch (the rotating frame keeps both bodies on the x-axis at all times, so one epoch is sufficient to place them).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
trajectories | list of dict | List of trajectory groups, each with: - trajectory: OrbitTrajectory - color (str, optional): Line color - line_width (float, optional): Line width - label (str, optional): Legend label | required |
frame | str or CelestialFrame | Synodic frame to plot in. Either | 'EMR' |
reference_epoch | Epoch | Epoch at which the primary and secondary body spheres are placed. Default: the first epoch of the first trajectory | None |
bodies | list of dict | Extra textured spheres to draw in addition to the frame's primary/secondary, each with: - position (array-like, length 3): Position in meters, in the synodic frame - radius (float): Radius in meters - texture (str, Path, or None, optional): Texture (plotly only) - name (str): Label used in the legend/hover text | None |
units | str | 'm' or 'km'. Default: 'km' | 'km' |
view_azimuth | float | Camera azimuth angle (degrees). Default: 45.0 | 45.0 |
view_elevation | float | Camera elevation angle (degrees). Default: 30.0 | 30.0 |
view_distance | float | Camera distance multiplier. Default: 2.5 (larger = further out) | None |
sphere_resolution_lon | int | Longitude resolution for textured sphere (plotly only). Higher values = better quality but slower rendering, with a larger output file (the textured sphere is encoded as a per-face-colored Mesh3d). Default: 360 | 360 |
sphere_resolution_lat | int | Latitude resolution for textured sphere (plotly only). Higher values = better quality but slower rendering, with a larger output file (the textured sphere is encoded as a per-face-colored Mesh3d). Default: 180 | 180 |
backend | str | 'matplotlib' or 'plotly'. Default: 'matplotlib' | 'matplotlib' |
width | int | Figure width in pixels (plotly only). Default: None (responsive) | None |
height | int | Figure height in pixels (plotly only). Default: None (responsive) | None |
Returns:
| Name | Type | Description |
|---|---|---|
object | object | Generated figure (matplotlib.figure.Figure or plotly.graph_objects.Figure) |
Raises:
| Type | Description |
|---|---|
ValueError | If |
TypeError | If a trajectory is not an OrbitTrajectory object. |
Example
plot_earth_moon_rotating_3d ¶
plot_earth_moon_rotating_3d(trajectories, **kwargs) -> object
Plot 3D trajectories in the Earth-Moon Rotating (EMR) frame.
Alias for plot_synodic_3d(trajectories, frame=CelestialFrame.EMR, ...); accepts the same keyword arguments.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
trajectories | list of dict | Same trajectory-group input as | required |
**kwargs | dict | Forwarded to | {} |
Returns:
| Name | Type | Description |
|---|---|---|
object | object | Generated figure object. |
Example
See Also¶
- 3D Trajectory -- 3D visualization of satellite trajectories in ECI frame
- Synodic Frame Trajectory Plots -- Usage examples and frame selection