def semicircular_aperture(
center: Point3D,
radius: float,
plane: Plane,
segments: int = 16,
) -> Face3D:
points = [
plane.o
+ plane.x * (center.x + radius * math.cos(math.pi * i / segments))
+ plane.y * (center.y + radius * math.sin(math.pi * i / segments))
for i in range(segments + 1)
]
return Face3D(points)
create something more organised for circular and half circular windows
Originally posted by @alexandrecuer in #178 (comment)