Home › Forums › Nazca › Questions and Answers › How to draw a rotationally symmetric waveguide? › Reply To: How to draw a rotationally symmetric waveguide?
26 November 2018 at 09:48
#5337
Ronald
Keymaster
Dear willie_woud,
Place objects with trigonometric functions
# Assuming OB is your polygon, polyline or cell object
import nazca as nd
from math import sin, cos, radians
OB = nd.Polygon(points=[(-5, 0), (5, -5), (5, 5)])
R = 30
N = 6
for n in range(N):
a = 360*n/N
OB.put(R*cos(radians(a)), R*sin(radians(a)), a)
nd.export_plt()
Ronald