Skip to content

CosmicIndustries/CatenaryShapes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub Logo

Catenary

Catenary ShapesPi

Just an assortment of shape and lattic generators made from Catenary Curves. Catenary ShapesPi Catenary Shapes3

Sample code:

import numpy as np import matplotlib.pyplot as plt from ipywidgets import interact, FloatSlider, IntSlider

Define the catenary function in 2D

def catenary_2d(x, a): return a * np.cosh(x / a)

Function to plot a rotated hexagon with catenary curves

Interactive plot

interact( plot_grid_of_rotated_hexagons, rotation_angle=FloatSlider(min=0, max=2*np.pi, step=0.1, value=0, description='Rotation Angle'), spacing=FloatSlider(min=0.5, max=5, step=0.1, value=np.pi, description='Spacing'), grid_size=IntSlider(min=1, max=5, step=1, value=2, description='Grid Size') );

Catenary Shapes?

Catenary Shapes?