Skip to content

Predictable intersections discovery #665

Answered by fenjalien
psads-git asked this question in Q&A
Discussion options

You must be logged in to vote

At the moment there is no sorting so it is difficult to tell. However, if you use for-each-anchor and display the anchor's name at its position it should tell you easily enough.

#import "@preview/cetz:0.2.2"

#cetz.canvas({
  import cetz.draw: *
 
  intersections("i", {
    circle((-3,0), radius: 0.5)
    circle((rel: (6,0)), radius: 0.5)
    circle((rel: (-3,3)), radius: 0.5)
    circle((rel: (0,-6)), radius: 0.5)
    hide(circle((0,0), radius: 3))
  })

  arc-through("i.0", (135deg, 3) , "i.5")
  arc-through("i.4", (45deg, 3) , "i.3") 
  arc-through("i.6", (-45deg, 3) , "i.2")
  arc-through("i.1", (-135deg, 3) , "i.7")

  for-each-anchor("i", (name) => {
    content("i." + name, name, f…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@psads-git
Comment options

@fenjalien
Comment options

@psads-git
Comment options

Answer selected by psads-git
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