Repository navigation
Expand file tree
/
Copy pathk-space.typ
More file actions
37 lines (30 loc) · 1.45 KB
/
Copy pathk-space.typ
File metadata and controls
37 lines (30 loc) · 1.45 KB
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
#import "@preview/cetz:0.5.2": canvas, draw
#import draw: circle, content, line
#set page(width: auto, height: auto, margin: 8pt, fill: none)
#set text(size: 12pt)
#let (x-range, y-range) = (3, 3)
#let ratio = 3 / 4 // L_x / L_y: vertical lattice spacing relative to horizontal
#canvas({
circle((0, 0), radius: 2 / 3 * y-range, stroke: blue, fill: blue.lighten(80%), fill-opacity: 0.2)
for x in range(-x-range, x-range + 1) {
for y in range(-y-range, y-range + 1) {
circle((x, ratio * y), radius: 2pt, fill: black)
}
}
let arrow-style = (mark: (end: "stealth", fill: black))
line((-x-range - 0.5, 0), (x-range + 0.5, 0), ..arrow-style, name: "x-axis")
line((0, -ratio * y-range - 0.5), (0, ratio * y-range + 0.5), ..arrow-style, name: "y-axis")
content("x-axis.end", $k_x$, anchor: "south-west")
content((rel: (.55, 0), to: "y-axis.end"), $k_y$, anchor: "north-east")
// Lattice spacings next to the bottom-right grid point
let spacing-arrow = (
mark: (symbol: "stealth", fill: black, scale: .3, offset: 0.1),
stroke: 0.7pt,
)
let corner = (x-range, -ratio * y-range)
line((rel: (-1, 0), to: corner), corner, ..spacing-arrow, name: "x-spacing")
content("x-spacing.mid", $2pi \/ L_x$, anchor: "north", padding: 0.2)
line(corner, (rel: (0, ratio), to: corner), ..spacing-arrow, name: "y-spacing")
content("y-spacing.mid", $2pi \/ L_y$, anchor: "west", padding: 0.2)
content((130deg, 2.4), text(blue.darken(10%))[$N(k)$])
})