Skip to content

How do draw an angle that is not in the x-y plane? #838

Answered by johannes-wolf
uzgit asked this question in Q&A
Discussion options

You must be logged in to vote

Hack Alert! It is possible, but very ugly.
My solution:

  • Create anchors for the points needed
  • Outsides the ortho-view get the anchors coordinates
  • Revert the current view transformation
  • Remove the z-component

Allowing a z component in angle coordinats would be useful.
I should also add some function to get non-transformed anchor coordinates.
Ortho returning anchors with a z!=0 seems to be not correct.

#import "@preview/cetz:0.3.4": *
#let matrice_landing_angles = canvas(length: 3cm, {
  import draw: *

  let radius_origin_negative = 0.5
  let radius_origin_positive = 1.5

  let origin = (0, 0, 0)
  let drone = (0, 0, 1.25)
  let ymax = (0, 2, 0)

  let landing_pad = (0.6, 0.75, 0)
  let l…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@uzgit
Comment options

Answer selected by uzgit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants