I guess you want something dynamic like the following:
\n#import \"@preview/cetz:0.2.2\"\n#set page(width: auto, height: auto)\n\n#cetz.canvas({\n import cetz.draw: *\n\n set-style(circle: (radius: 0.8em))\n circle((0,0), name: \"circ1\")\n circle((2,2), name: \"circ2\")\n\n \n line(\"circ1\", /* Intersection of a straight line between circ1.center and the next coordinate */\n ((), \"-|\", (\"circ1\", 50%, \"circ2\")), /* Move only horizontal to (circ1.x + circ2.x)/2 */\n ((), \"|-\", \"circ2\"), /* Move vertically to circ2.y */\n \"circ2\", /* Same as 1. but for circ2 */\n mark: (start: \">\", fill: black))\n})
-
Consider the following code. My question is: If one moves the second circle (
|
Beta Was this translation helpful? Give feedback.
-
I guess you want something dynamic like the following: #import "@preview/cetz:0.2.2"
#set page(width: auto, height: auto)
#cetz.canvas({
import cetz.draw: *
set-style(circle: (radius: 0.8em))
circle((0,0), name: "circ1")
circle((2,2), name: "circ2")
line("circ1", /* Intersection of a straight line between circ1.center and the next coordinate */
((), "-|", ("circ1", 50%, "circ2")), /* Move only horizontal to (circ1.x + circ2.x)/2 */
((), "|-", "circ2"), /* Move vertically to circ2.y */
"circ2", /* Same as 1. but for circ2 */
mark: (start: ">", fill: black))
}) |
Beta Was this translation helpful? Give feedback.
-
That is a perfect solution, @johannes-wolf! Thank you very much indeed! |
Beta Was this translation helpful? Give feedback.
I guess you want something dynamic like the following:
With
"circ2"
at(…