cetz-package / cetz

CeTZ: ein Typst Zeichenpaket - A library for drawing stuff with Typst.

Home Page:https://cetz-package.github.io

Repository from Github https://github.comcetz-package/cetzRepository from Github https://github.comcetz-package/cetz

Fail case for `bezier-through`

Jollywatt opened this issue · comments

The maths for bezier-through sometimes fails. I don't have much insight to add except this MWE:

#import "@preview/cetz:0.3.1"

#let verts = (
    (0,0),
    (1,0),
    (2,2),
)

#cetz.canvas({
  cetz.draw.bezier-through(..verts)
  verts.map(v => {
    cetz.draw.circle(v, radius: 2pt, fill: red, stroke: none)
  }).join()
})
Screenshot 2024-12-16 at 22 27 45