In [1]:
length = 10
height = (length**2 - (length/2)**2)**0.5
x = [ 0 , length , length/2 , length/2+length , length , 2*length , (5/2)*length , 3*length , (7/2)*length , 3*length , 4*length ]
y = [ 0 , 0 , -height , -height , -2*height , -2*height , -height , -2*height , -height , 0 , 0 ]
In [2]:
import matplotlib.pyplot as plt
plt.scatter(x, y)
Out[2]:
In [3]:
%load_ext autoreload
%autoreload 2
In [4]:
import numpy as np
from utilities import *
In [5]:
coordinates = np.array([x,y]).T
print(coordinates)
In [6]:
mesh = Mesh(coordinates, length)
mesh.define_triangles()
mesh.get_all_sides();
In [7]:
mesh.try_triangles()
In [8]:
mesh.refine_mesh()
mesh.plot_triangles()
Out[8]:
End of notebook.
© Copyright 2024 MUDE TU Delft.
This work is licensed under a CC BY 4.0 License.