Skip to content
Snippets Groups Projects
Commit 4281060c authored by Djalim Simaila's avatar Djalim Simaila
Browse files

minimal gui

parent 7a61f23d
No related branches found
No related tags found
1 merge request!9Gui
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")
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment