-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add thermodynamic-potentials-venn-diagram.typ
add generative-adversarial-network.typ converted from TikZ
- Loading branch information
Showing
10 changed files
with
208 additions
and
36 deletions.
There are no files selected for viewing
83 changes: 83 additions & 0 deletions
83
assets/generative-adversarial-network/generative-adversarial-network.typ
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
#import "@preview/cetz:0.3.2": canvas, draw | ||
|
||
#set page(width: auto, height: auto, margin: 8pt) | ||
|
||
#canvas({ | ||
import draw: line, content, circle, group, hobby, on-layer | ||
|
||
// Style definitions | ||
let node-style = ( | ||
stroke: none, | ||
fill: rgb("#66B2B2"), // teal!60 equivalent | ||
radius: 0.53, | ||
) | ||
let arrow-style = ( | ||
stroke: black + 0.8pt, | ||
mark: (end: "stealth", scale: 0.4, fill: black), | ||
) | ||
let (y-real, y-fake) = (2, 0) | ||
// Draw nodes | ||
// z_in node | ||
circle((0, y-fake), name: "zin", ..node-style) | ||
content("zin", $arrow(z)_"in"$) | ||
// x_fake node | ||
circle((3, y-fake), name: "fake", ..node-style) | ||
content("fake", $arrow(x)_"fake"$) | ||
// x_real node | ||
circle((3, y-real), name: "real", ..node-style) | ||
content("real", $arrow(x)_"real"$) | ||
// x node (discriminator input) | ||
circle((6, y-real / 2), name: "D", ..node-style, radius: 0.4) | ||
content("D", $arrow(x)$) | ||
// Output node | ||
content((9, y-real / 2), text(size: 0.9em, baseline: -1pt)[real?], name: "out", padding: 2pt) | ||
// Draw arrows and their labels | ||
// Generator input arrow | ||
line((-2.5, y-fake), "zin", ..arrow-style, name: "zin-line") | ||
content("zin-line.mid", $p_theta (arrow(z))$, anchor: "south", padding: 0.1) | ||
content("zin-line.mid", text(size: 0.8em)[latent noise], anchor: "north", padding: 0.1) | ||
// Generator arrow | ||
line("zin", "fake", ..arrow-style, name: "fake-line") | ||
content("fake-line.mid", $G(arrow(x))$, anchor: "south", padding: 0.1) | ||
content("fake-line.mid", text(size: 0.8em)[generator], anchor: "north", padding: 0.1) | ||
// Real data arrow | ||
line((-2, y-real), "real", ..arrow-style, name: "real-line") | ||
content("real-line.mid", $p_"data" (arrow(x))$, anchor: "south", padding: 0.1) | ||
// Connection points with names | ||
circle((4.5, y-fake), radius: 0.06, fill: black, name: "dot1") | ||
circle((4.5, y-real), radius: 0.06, fill: black, name: "dot2") | ||
on-layer( | ||
1, | ||
circle((4.25, 2 * y-real / 3), radius: 0.12, fill: orange, stroke: none, name: "dot3"), | ||
) | ||
// Draw connecting lines with names | ||
line("fake", "dot1", ..arrow-style, name: "conn1") | ||
line("real", "dot2", ..arrow-style, name: "conn2") | ||
line("dot3", "D", ..arrow-style, name: "conn3") | ||
// Draw dashed curve using named points | ||
hobby( | ||
"dot1", | ||
(4.2, (y-real - y-fake) / 2), | ||
"dot2", | ||
stroke: (dash: "dashed"), | ||
omega: 2, | ||
name: "dashed-curve", | ||
) | ||
// Discriminator arrow and labels | ||
line("D", "out", ..arrow-style, name: "disc-line") | ||
content("disc-line.mid", $D(arrow(x))$, anchor: "south", padding: 0.1) | ||
content("disc-line.mid", text(size: 0.8em)[discriminator], anchor: "north", padding: 0.15) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+47.6 KB
...rmodynamic-potentials-venn-diagram/thermodynamic-potentials-venn-diagram-hd.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+11.9 KB
assets/thermodynamic-potentials-venn-diagram/thermodynamic-potentials-venn-diagram.pdf
Binary file not shown.
Binary file added
BIN
+21.9 KB
...thermodynamic-potentials-venn-diagram/thermodynamic-potentials-venn-diagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions
1
...thermodynamic-potentials-venn-diagram/thermodynamic-potentials-venn-diagram.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
68 changes: 68 additions & 0 deletions
68
assets/thermodynamic-potentials-venn-diagram/thermodynamic-potentials-venn-diagram.typ
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
#import "@preview/cetz:0.3.2" | ||
#import "@preview/cetz-venn:0.1.3": venn3 | ||
|
||
#set page(width: auto, height: auto, margin: 8pt) | ||
|
||
#cetz.canvas({ | ||
import cetz.draw: content, circle, scale | ||
|
||
// Scale up the diagram | ||
scale(2.5) | ||
|
||
// Create Venn diagram with three overlapping circles | ||
venn3( | ||
name: "venn", | ||
a-fill: blue.transparentize(40%), // Mechanical (blue) | ||
b-fill: red.transparentize(40%), // Thermal (red) | ||
c-fill: green.transparentize(40%), // Chemical (green) | ||
ab-fill: purple.transparentize(40%), // Overlap | ||
bc-fill: yellow.transparentize(40%), // Overlap | ||
ac-fill: teal.transparentize(40%), // Overlap | ||
abc-fill: gray.transparentize(70%), // Center | ||
) | ||
|
||
// Add outer labels for main potentials | ||
content("venn.a", [Mechanical\ $F_[mu] = -P V$], anchor: "center", name: "mechanical") | ||
content("mechanical.south", text(.8em)[(Grand\ potential)], anchor: "north", padding: (top: 4pt)) | ||
|
||
content("venn.b", [Thermal\ $H_[mu] = T S$], anchor: "center") | ||
|
||
content("venn.c", [Chemical\ $G = mu N$], anchor: "center") | ||
|
||
// Add labels for overlapping regions | ||
content( | ||
"venn.ab", | ||
text(.8em, align(center, $U_[mu] =\ T S - P V$)), | ||
anchor: "center", | ||
offset: (0, 0.3), | ||
) | ||
|
||
content( | ||
"venn.abc", | ||
text(.8em, align(center, $U = T S -\ P V + mu N$)), | ||
) | ||
|
||
content( | ||
"venn.ac", | ||
align(center, $F =\ -P V + mu N$), | ||
anchor: "center", | ||
offset: (-0.3, -0.3), | ||
) | ||
|
||
content( | ||
"venn.bc", | ||
align(center, $H =\ T S + mu N$), | ||
anchor: "center", | ||
offset: (0.3, -0.3), | ||
) | ||
|
||
// Add outer circle label | ||
content((0, 1.6), $G_[mu]$) | ||
content((0, 1.4), text(.8em)[(Gibbs-Duhem)]) | ||
circle( | ||
(0, 0), | ||
radius: 1.75, | ||
fill: rgb(70%, 70%, 90%, 20%), | ||
stroke: rgb(0%, 0%, 0%), | ||
) | ||
}) |
21 changes: 21 additions & 0 deletions
21
assets/thermodynamic-potentials-venn-diagram/thermodynamic-potentials-venn-diagram.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
title: Thermodynamic Potentials Venn Diagram | ||
description: | | ||
A Venn diagram illustrating the relationships between thermodynamic potentials, forces, and flows. The diagram shows three main regions (Mechanical, Thermal, Chemical) and their intersections, representing different thermodynamic potentials. The subscript μ denotes an N-to-μ Legendre transform of the indicated potential (U, H, F, or G). The diagram helps visualize how different thermodynamic quantities are related through Legendre transforms. | ||
citation: | | ||
R. K. P. Zia, Edward F. Redish, and Susan R. McKay, "Thermodynamic Venn diagrams: Sorting out forces, fluxes, and Legendre transforms," American Journal of Physics 79, 950 (2011). DOI: 10.1119/1.3599177 | ||
tags: | ||
- thermodynamics | ||
- statistical mechanics | ||
- physics | ||
- venn diagram | ||
- legendre transform | ||
- potentials | ||
- forces | ||
- fluxes | ||
|
||
authors: | ||
- R. K. P. Zia | ||
- Edward F. Redish | ||
- Susan R. McKay |
Oops, something went wrong.