Skip to main content

Command Palette

Search for a command to run...

Mathober2026_InEllipse

Ellipses Can Be Found

Updated
•2 min read•View as Markdown
Mathober2026_InEllipse

GraphedInEllipses

For my 8th sketch of Mathober2026 coded in Python, GraphedInEllipses takes InEllipses (Theme of Day 5 of Mathober) and puts them in triangles made from KCyclic/ Network Graphs.

Poetry

Connected
But can when it is Implemented
The Ellipses find a way to merge
As Outcome Varies
Results can be as vast as the seas
But The ellipses remain to not be purged
As they touch side to side
And all 3 Lines

Code


import networkx as nx
import random as rd

G_ran = nx.cycle_graph(rd.randint(4,9))


nx.draw(G_ran, node_size=200, node_color='blue')

G = nx.random_geometric_graph(5, 0.725)


nx.draw(G, node_size=700, node_color='red')
nx.draw(G, node_size=70, node_color='orange')
nx.draw(G, node_size=325, node_color='red')
import matplotlib.pyplot as plt
import numpy as np
from matplotlib.patches import Ellipse
import random as rd

radii = rd.randint(2,9)

fig, ax = plt.subplots()



# Ellipses Group 1
ellipse = Ellipse(xy=(radii,radii ), width=radii * 4, height= radii * 2, angle=96, edgecolor='blue',facecolor='lightblue',hatch = 'x',hatch_linewidth = 4, hatchcolor = 'black')
ellipse2 = Ellipse(xy=(radii, radii), width= radii * 1.9, height=radii * 3, angle=130, edgecolor='red', facecolor='orange',hatch = 'o',hatch_linewidth = 6, hatchcolor = 'yellow')
ellipse3 = Ellipse(xy=(radii, radii), width= radii, height=6, angle= radii * 12, edgecolor='yellow', facecolor='black',hatch = '+',hatch_linewidth = 5, hatchcolor = 'red')




ax.add_patch(ellipse)
ax.add_patch(ellipse2)
ax.add_patch(ellipse3)




ax.set_xlim(-25, 25)
ax.set_ylim(-25, 25)
ax.set_aspect(1.12)
plt.show()

Images