diff --git a/obj.py b/obj.py deleted file mode 100644 index eaafdbe5205a8fd093ff5944b305867f5e00e629..0000000000000000000000000000000000000000 --- a/obj.py +++ /dev/null @@ -1,23 +0,0 @@ -import random -import math - -def circle_points(r, cx, cy): - cpt = 0 - angles = [] - while cpt < 2*math.pi: - angles.append(cpt) - cpt += 1/6*math.pi - return [[round(r * math.cos(angle) + cx,6), round(r * math.sin(angle) + cy,6)] for angle in angles] - -cylindre = [] -for i in range(10): - points = circle_points(random.randint(2,20),5,5) - for point in points: - point.append(i) - cylindre.append(points) - -with open("test_cylindre.xyz",'w') as f: - for couches in cylindre: - for points in couches: - x,y,z = points[0],points[1],points[2] - f.write(f"{x} {y} {z}\n")