-
Notifications
You must be signed in to change notification settings - Fork 29
/
Copy pathbranch-cuts-1.typ
84 lines (73 loc) · 1.5 KB
/
branch-cuts-1.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
#import "@preview/cetz:0.3.2": canvas, draw, decorations
#set page(width: auto, height: auto, margin: 5pt)
#canvas({
import draw: line, content, circle
let xr = 5
let yr = 1
let arrow-style = (mark: (end: "stealth", fill: black, scale: 0.5))
// Draw axes
line(
(0, -yr),
(0, yr),
..arrow-style,
name: "y-axis",
)
content(
(rel: (-0.7, -0.2), to: "y-axis.end"),
$"Im"(p_0)$,
name: "y-label",
)
// Draw branch points
let left-point = (-xr / 2, 0)
let right-point = (xr / 2, 0)
// Draw branch cut line
line(
left-point,
right-point,
name: "x-axis",
mark: (start: "circle", end: "circle", fill: blue, scale: 0.5),
)
// Add branch point labels
content(
(rel: (0, 0.2), to: "x-axis.start"),
$-sqrt(arrow(p)^2)$,
name: "left-label",
)
content(
(rel: (0, 0.2), to: "x-axis.end"),
$sqrt(arrow(p)^2)$,
name: "right-label",
)
// Draw zigzag lines with decorations
let zigzag-style = (
stroke: blue.darken(20%),
amplitude: 0.2,
segment-length: 0.3,
)
// Left zigzag
decorations.zigzag(
line(
(-xr - 0.5, 0),
"x-axis.3%",
..arrow-style,
),
..zigzag-style,
name: "left-zigzag",
)
// Right zigzag
decorations.zigzag(
line(
"x-axis.end",
(xr, 0),
..arrow-style,
),
..zigzag-style,
name: "right-zigzag",
)
// Add Re axis label
content(
(rel: (-0.2, 0.3), to: "right-zigzag.end"),
$"Re"(p_0)$,
name: "x-label",
)
})