Skip to content
View ToneTested's full-sized avatar

Block or report ToneTested

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Maximum 250 characters. Please don't include any personal information such as legal names or email addresses. Markdown supported. This note will be visible to only you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse
ToneTested/README.md

import numpy as np import matplotlib.pyplot as plt from matplotlib.animation import FuncAnimation

--- Planetary data (scaled for visualization, not real distances) ---

planets = { "Mercury": {"radius": 0.39, "period": 88}, "Venus": {"radius": 0.72, "period": 225}, "Earth": {"radius": 1.0, "period": 365}, "Mars": {"radius": 1.52, "period": 687}, }

--- Plot setup ---

fig, ax = plt.subplots(figsize=(6, 6)) ax.set_facecolor("black") ax.set_aspect("equal") ax.axis("off")

Draw the Sun

ax.plot(0, 0, 'yo', markersize=20, label='Sun')

Store planet plots

planet_plots = {} for name, data in planets.items(): planet_plots[name], = ax.plot([], [], 'o', label=name)

Orbit circles for visualization

for data in planets.values(): orbit = plt.Circle((0, 0), data["radius"], color="white", fill=False, linestyle="--", alpha=0.3) ax.add_patch(orbit)

ax.set_xlim(-2, 2) ax.set_ylim(-2, 2) ax.legend(loc="upper right")

--- Animation function ---

def update(frame): for name, data in planets.items(): angle = 2 * np.pi * frame / data["period"] x = data["radius"] * np.cos(angle) y = data["radius"] * np.sin(angle) planet_plots[name].set_data(x, y) return planet_plots.values()

ani = FuncAnimation(fig, update, frames=1000, interval=30, blit=True) plt.show()

Popular repositories Loading

  1. ToneTested ToneTested Public

  2. Mortgage-Calculator Mortgage-Calculator Public

  3. astro-supabase-starter astro-supabase-starter Public

    Astro

  4. astro-supabase-starter-1 astro-supabase-starter-1 Public template

    Forked from netlify-templates/astro-supabase-starter

    The Astro Supabase starter demonstrates how to integrate Supabase into an Astro project deployed on Netlify.

    Astro