I’m trying to draw a simple diagram that illustrates the dot product, like this one:
but i’m not seeing how to make the perpendicular line going through the end of “a” to “b”.
I could calc the distance I guess but I was wondering if there’s some geometric way like in the Cetz tutorial when the tangent on the unit circle is drawn?
#cetz.canvas({
  import cetz.draw: *
  scale(4)
  arc((), start: 15deg, stop: 35deg, radius: 5mm, mode: "PIE", fill: color.mix((green, 20%), white), anchor: "origin")
  let orig = (0, 0)
  let (o, a, b) = ((0, 0), (35deg, 1cm), (15deg, 1.25cm))
  line(o, a, mark: (end: ">"), name: "v1")
  line(o, b, mark: (end: ">"), name: "v2")
  line((), ("v1", "|-", "v2"), stroke: red) // doesn't work...
  line((o, 0.7, b), (a: (), b: o, number: -0.5, angle: 90deg), stroke: blue) // almost there but doesn't pass through 'a'
})
            
