Skip to content

Commit

Permalink
rename shell.tex to momentum-shell.tex and add momentum-shell.typ typ…
Browse files Browse the repository at this point in the history
…st translation

add jensens-inequality.typ converted from jensens-inequality.tex
  • Loading branch information
janosh committed Jan 19, 2025
1 parent 52d47fd commit d2f590a
Show file tree
Hide file tree
Showing 8 changed files with 78 additions and 0 deletions.
42 changes: 42 additions & 0 deletions assets/jensens-inequality/jensens-inequality.typ
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#import "@preview/cetz:0.3.1": canvas, draw
#import "@preview/cetz-plot:0.1.0": plot

#set page(width: auto, height: auto, margin: 8pt)

#canvas({
let mark = (end: "stealth", fill: black, scale: 0.7)
draw.set-style(
axes: (
y: (label: (anchor: "north-west", offset: -0.2), mark: mark),
x: (label: (anchor: "south-east", offset: -0.25), mark: mark),
),
)

plot.plot(
size: (8, 6),
x-label: $x$,
y-label: $log x$,
y-min: -1,
x-tick-step: none,
y-tick-step: none,
axis-style: "school-book",
{
// Main logarithmic curve
plot.add(
style: (stroke: rgb(0%, 0%, 80%) + 1.5pt),
domain: (11, 150),
samples: 150,
x => calc.ln(x - 10) - 2,
)

// Dashed line
plot.add(
style: (
stroke: (paint: orange, thickness: 1.5pt, dash: "dashed"),
),
domain: (8, 120),
x => 0.2 + (3 - 0.2) * (x - 8) / (120 - 8),
)
},
)
})
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
36 changes: 36 additions & 0 deletions assets/momentum-shell/momentum-shell.typ
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#import "@preview/cetz:0.3.1": 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$])
})
File renamed without changes.

0 comments on commit d2f590a

Please sign in to comment.