Home Forums Nazca Interconnect: pcurve_p2p Reply To: Interconnect: pcurve_p2p


Dear Chenhui,

There is a low-level function that will do it, but it is not yet available for the interconnections.

An example is given here:

import math
import nazca as nd

def testcurve(t):
    x = (2 + 15 * t) * math.exp(t)
    y = (2 + 20 * t) * math.cos(t * 5)
    return (x, y)

xy = [testcurve(t / 200) for t in range(201)]

# The width will increase linearly in the given range, proportional to the
# length of the curve.
XY = nd.util.polyline2polygon(xy, width=0.5, width2=5)
nd.Polygon(XY, layer=1).put()


Best regards,