# Ways to plot LEO orbit

**URL:** <https://discourse.julialang.org/t/ways-to-plot-leo-orbit/75336>\
**Category:** Astro/Space\
**Tags:** question, plotting\
**Created:** [January 28, 2022, 3:05am UTC](https://discourse.julialang.org/t/ways-to-plot-leo-orbit/75336 "2022-01-28T03:05:50Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![yashi](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yashi/32/19448_2.png) [@yashi](https://discourse.julialang.org/u/yashi)\
**Post date:** [January 28, 2022, 3:05am UTC](https://discourse.julialang.org/t/ways-to-plot-leo-orbit/75336/1 "2022-01-28T03:05:50Z")

</div>

What would be a good way to start ploting an LEO orbit using `Plots`, or in `Pluto.jl`? I’d like to make sliders for 6 Keplerian elements to visualize how each parameter interact with the orbit. One is something like Wolfram has. But it doesn’t show the Earth. An orbit of 500 Km altitude with an Earth in center would be nice.

> **[Keplerian Orbital Elements - Wolfram Demonstrations Project](https://demonstrations.wolfram.com/KeplerianOrbitalElements/)**
>
> This Demonstration visualizes the influence of the Keplerian elements of a celestial body eg a planet or asteroid orbiting around the Sun on its orbit in 3space

---

<div class="post-metadata">

**Author:** ![jonniedie](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jonniedie/32/12842_2.png) [@jonniedie](https://discourse.julialang.org/u/jonniedie)\
**Post date:** [January 28, 2022, 5:11pm UTC](https://discourse.julialang.org/t/ways-to-plot-leo-orbit/75336/2 "2022-01-28T17:11:55Z")

</div>

Your main options are:

1. Plots.jl + [Interact.jl](https://github.com/JuliaGizmos/Interact.jl)
2. [Makie.jl](https://github.com/JuliaPlots/Makie.jl)
3. [Pluto.jl](https://github.com/fonsp/Pluto.jl)

All three are pretty easy to use for something simple like this. Pluto will be the simplest to get up and running and Makie will be the fastest probably (not sure how important that is in this case, though)

---

<div class="post-metadata">

**Author:** ![jonniedie](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jonniedie/32/12842_2.png) [@jonniedie](https://discourse.julialang.org/u/jonniedie)\
**Post date:** [January 28, 2022, 5:14pm UTC](https://discourse.julialang.org/t/ways-to-plot-leo-orbit/75336/3 "2022-01-28T17:14:08Z")

</div>

Makie also has [this example](https://lazarusa.github.io/BeautifulMakie/GeoPlots/), which gives you the earth.

---

<div class="post-metadata">

**Author:** ![yashi](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yashi/32/19448_2.png) [@yashi](https://discourse.julialang.org/u/yashi)\
**Post date:** [April 1, 2022, 2:39pm UTC](https://discourse.julialang.org/t/ways-to-plot-leo-orbit/75336/4 "2022-04-01T14:39:44Z")

</div>

The URL has changed to [https://lazarusa.github.io/BeautifulMakie/GeoPlots/blueMarble/](https://lazarusa.github.io/BeautifulMakie/GeoPlots/blueMarble/)

Just in case anyone is interested in, the following is a version with [`SatelliteToolbox.jl`](https://juliaspace.github.io/SatelliteToolbox.jl/stable/) and [`GeometryBasics.jl`](https://github.com/JuliaGeometry/GeometryBasics.jl)

- GLMakie v0.5.5
- SatelliteToolbox v0.9.4
- GeometryBasics v0.4.2

```julia
using SatelliteToolbox
using GeometryBasics
using GLMakie
using FileIO

img = load(download("https://svs.gsfc.nasa.gov/vis/a000000/a002900/a002915/bluemarble-2048.png"));
limit = 2.5R0
altitude = 500_000

f = Figure()
a = Axis3(f[1,1], aspect = (1,1,1), viewmode = :fit,
          limits = (-limit/2, limit/2, -limit/2, limit/2, -limit/2, limit/2))

earth = GeometryBasics.Sphere(Point3f(0), R0)
mesh!(a, earth, color=img)

r = R0 + altitude
t = LinRange(0, 2π, 100)
x = r * cos.(t)
y = r * sin.(t)
lines!(a, x, y)

```

 ![image](https://global.discourse-cdn.com/julialang/original/3X/4/4/441fc7b0184c2e40e8677e0cc3e380d037512fcb.jpeg)

---

<div class="post-metadata">

**Author:** ![cjdoris](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cjdoris/32/213133_2.png) [@cjdoris](https://discourse.julialang.org/u/cjdoris)\
**Post date:** [April 1, 2022, 7:56pm UTC](https://discourse.julialang.org/t/ways-to-plot-leo-orbit/75336/5 "2022-04-01T19:56:16Z")

</div>

Or this example from the awesome new RPR backend: [https://makie.juliaplots.org/stable/documentation/backends/rprmakie/#earth\_example](https://makie.juliaplots.org/stable/documentation/backends/rprmakie/#earth_example)

 ![image](https://global.discourse-cdn.com/julialang/original/3X/1/9/190537d60f0a8fcf80ed62c00fe27ff77493b42c.jpeg)
