Skip to content
\n

\"image\"

","upvoteCount":1,"answerCount":1,"acceptedAnswer":{"@type":"Answer","text":"

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.

\n
#import \"@preview/cetz:0.2.2\"\n\n#cetz.canvas({\n  import cetz.draw: *\n \n  intersections(\"i\", {\n    circle((-3,0), radius: 0.5)\n    circle((rel: (6,0)), radius: 0.5)\n    circle((rel: (-3,3)), radius: 0.5)\n    circle((rel: (0,-6)), radius: 0.5)\n    hide(circle((0,0), radius: 3))\n  })\n\n  arc-through(\"i.0\", (135deg, 3) , \"i.5\")\n  arc-through(\"i.4\", (45deg, 3) , \"i.3\") \n  arc-through(\"i.6\", (-45deg, 3) , \"i.2\")\n  arc-through(\"i.1\", (-135deg, 3) , \"i.7\")\n\n  for-each-anchor(\"i\", (name) => {\n    content(\"i.\" + name, name, fill: white, frame: \"rect\", stroke: white)\n  })\n})
\n

\"image\"

","upvoteCount":2,"url":"https://github.com/cetz-package/cetz/discussions/665#discussioncomment-10253419"}}}
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, fill

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