-
The following code produces the figure below. I was able to find out the labels for the intersections anchors only by trial and error. Is there some way of getting the labels of those intersections by using a systematic and deterministic way (and not by trial and error)? Thanks!
|
Beta Was this translation helpful? Give feedback.
Answered by
fenjalien
Aug 6, 2024
Replies: 1 comment 3 replies
-
At the moment there is no sorting so it is difficult to tell. However, if you use #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: white, frame: "rect", stroke: white)
})
}) |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
psads-git
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.