Home Forums Nazca Drawing Ellipses

Tagged: 

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #6192
    raphael
    Member

    Hi,
    I would like to draw some ellipse in my layout, but I have not found any way to do so with the Nazca modules. Do you have any suggestions how to do this?

    Thanks in advance

    #6196
    Xaveer
    Moderator

    Hi Raphael,

    You can just define the points of the ellipse yourself in a loop, or you could use the Nazca circle() and transform the points. Here is an example:

    import nazca as nd
    
    circle = nd.geometries.circle(radius=5, N=20)
    ellipse = [(x * 0.5, y) for x, y in circle]
    nd.Polygon(points=ellipse, layer=1).put()
    
    nd.export_gds()
    

    Xaveer

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.