Creating Polygon Shapes

By 2 May 2017Nazca Layout

Creating Polygon Shapes

How to place polygons and use predefined Nazca shapes

# How to make geometric shapes using polygons
import nazca as nd
import nazca.geometries as geom

frame = nd.Polygon(layer=19, points=[(0,0), (220,0), (220,180), (0,180)])
boat = nd.Polygon(layer=56, points=[(0,0), (120,0), (130,40), (-10, 40)])
sail = nd.Polygon(layer=52, points=[(0,0), (100,0), (90,100)])

sun = nd.Polygon(layer=36,
hole = nd.Polygon(layer=60, points=geom.ring(radius=5))

# position the polygons
frame.put(-10, 0, 0)
boat.put(40, 20, 0)
sail.put(50, 70, -10)


Custom building blocks may require implementation of specific shapes, typically made by a list of points. In this example we show how to place polygons in different layers and use predefined shapes from the nazca.geometries module. As an example, we take Dick Bruna’s sailing boat.

Related Tutorials

Nazca LayoutNazca Foundry
28 March 2019

Parametric curve

In this example we show how to create parametric curves between two points.
Nazca LayoutNazca Foundry
16 November 2018

Add text to your layout

In this example we show how to add text to your layout.
Nazca LayoutNazca FoundryPhotonic BBs
19 January 2018

Create a building block using Polygons

In this example we show how to create a building block from Polygons.