-
Notifications
You must be signed in to change notification settings - Fork 30
/
Copy pathmomentum-shell.typ
36 lines (28 loc) · 972 Bytes
/
momentum-shell.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
#import "@preview/cetz:0.3.2": canvas, draw
#set page(width: auto, height: auto, margin: 3pt)
#canvas({
import draw: line, content, circle
let rx = 4
let ry = 2.2
let arrow-style = (mark: (end: "stealth", fill: black), stroke: 1pt)
// Axes
line((-rx - 0.5, 0), (rx + 0.5, 0), ..arrow-style)
content((rx + 0.5, 0), $q_1$, anchor: "west", padding: 2pt)
line((0, -ry - 0.5), (0, ry + 0.5), ..arrow-style)
content((0, ry + 0.5), $q_2$, anchor: "south", padding: 2pt)
// Ellipse
circle(
(0, 0),
radius: (rx, ry),
stroke: blue,
fill: rgb(0%, 0%, 100%, 5%),
name: "ellipse",
)
// Labels for radii
content((rx + .2, 1), $sqrt(2E \/ m)$, anchor: "south-west", padding: 1pt, name: "r1")
line((rx, 0), "r1.south", stroke: 0.2pt)
content((0.5, ry + .5), $sqrt(2E \/ k)$, anchor: "south-west", padding: 1pt, name: "r2")
line((0, ry), "r2.south-west", stroke: 0.2pt)
// Label P
content((3, 1), text(fill: blue)[$P$])
})