Skip to content

Latest commit

 

History

History
34 lines (26 loc) · 1.67 KB

README.md

File metadata and controls

34 lines (26 loc) · 1.67 KB

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?