-
Notifications
You must be signed in to change notification settings - Fork 35
/
Copy pathpropagator-fluctuations.typ
112 lines (92 loc) · 2.82 KB
/
propagator-fluctuations.typ
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
#import "@preview/cetz:0.3.4": canvas, draw
#import "@preview/modpattern:0.1.0": modpattern
#import draw: line, content, circle, rect, group
#set page(width: auto, height: auto, margin: 8pt)
// TODO fix hatches rendering as black fill https://github.com/cetz-package/cetz/issues/805#issuecomment-2629554884
#let hatched = modpattern(
(.1cm, .1cm),
std.line(start: (0%, 100%), end: (100%, 0%), stroke: 0.5pt),
background: white,
)
#canvas({
// Define styles and constants
let unit = 1
let vertex-radius = 0.2 * unit
let cross-radius = 0.15 * unit
let ext-len = 2 * unit
// Helper function for cross markers
let cross(pos, label: none, label-offset: 2, rel-label: (0, -0.5)) = {
let rad = cross-radius
content(pos, text(size: 16pt)[$times.circle$], stroke: none, fill: white, frame: "circle", padding: -2.5pt)
if label != none {
content(
(rel: rel-label, to: pos),
eval(label, mode: "math"),
)
}
}
// Helper function for hatched vertices
let vertex(pos, label: none, rel-label: (0.35, 0.35)) = {
circle(pos, radius: vertex-radius, fill: hatched)
if label != none {
content(
(rel: rel-label, to: pos),
eval(label, mode: "math"),
)
}
}
// Diagram 1
group(
name: "diagram1",
{
// Main circle
circle((0, 0), radius: unit, stroke: 1pt)
// External lines
line((-ext-len, 0), (-unit, 0), stroke: 1pt)
line((unit, 0), (ext-len, 0), stroke: 1pt)
// Cross marker
cross((0, unit), label: "partial_k R_k")
// Vertices
vertex((-unit, 0), label: "Gamma_k^(3)", rel-label: (-0.35, 0.35))
vertex((unit, 0), label: "Gamma_k^(3)")
},
)
// Diagram 2
group(
name: "diagram2",
{
// Move right by 5 units
let offset = (5, 0)
// Main circle
circle((offset.at(0), 0), radius: unit, stroke: 1pt)
// External lines
line((-ext-len + offset.at(0), 0), (-unit + offset.at(0), 0), stroke: 1pt)
line((unit + offset.at(0), 0), (ext-len + offset.at(0), 0), stroke: 1pt)
// Cross marker
cross((offset.at(0), -unit), label: "partial_k R_k", rel-label: (0, 0.5))
// Vertices
vertex((-unit + offset.at(0), 0), label: "Gamma_k^(3)", rel-label: (-0.35, 0.35))
vertex((unit + offset.at(0), 0), label: "Gamma_k^(3)")
},
)
// Diagram 3
group(
name: "diagram3",
{
// Move right by 10 units
let offset = (10, 0)
// Main circle
circle((offset.at(0), 0), radius: unit, stroke: 1pt)
// External line
line(
(-ext-len + offset.at(0), -unit),
(ext-len + offset.at(0), -unit),
stroke: 1pt,
)
// Cross marker
cross((offset.at(0), unit), label: "partial_k R_k")
// Vertex
vertex((offset.at(0), -unit), label: "Gamma_k^(4)")
},
)
})