(CETZ) Can I avoid the arrowhead being transformed in the third dimension?

I’m using the following:

#import "@preview/cetz:0.3.4"

#set page(width: auto, height: auto, margin: 0.5cm)

#cetz.canvas({import cetz.draw: *

			line(
				(0,0,0),(2,0,0),
				mark:(end: "stealth",fill:black)
			)

			line(
				(0,0,0),(0,2,0),
				mark:(end: "stealth",fill:black)
			)

			line(
				(0,0,0),(0,0,2),
				mark:(end:"stealth",fill:black),
			)

			content((2+0.5,0,0), $x$)
			content((0,2+0.5,0), $y$)
			content((0,0,2+0.5), $z$)

})

with it I get:

I’m wondering if I can draw the arrow pointing to z as if it was drawn like it is in the plane xy in the figure (the arrows pointing to x and y). I was also using ortho() and all the 3 arrows where transformed like that depending on the 3 angles assigned to the x,y ,z arguments.

You need to update the version.

#import "@preview/cetz:0.4.2"

#set page(width: auto, height: auto, margin: 5mm)

#cetz.canvas({
  import cetz.draw: *

  let arrow = (mark: (end: "stealth", fill: black))
  line((0, 0, 0), (2, 0, 0), ..arrow)
  line((0, 0, 0), (0, 2, 0), ..arrow)
  line((0, 0, 0), (0, 0, 2), ..arrow)

  content((2 + 0.5, 0, 0), $x$)
  content((0, 2 + 0.5, 0), $y$)
  content((0, 0, 2 + 0.5), $z$)
})

3 Likes

So it’s simple as that, thanks for the assistance!

1 Like