summaryrefslogtreecommitdiff
path: root/site/content/software/cem.typ
diff options
context:
space:
mode:
authorPaweł Redman <pawel.redman@gmail.com>2026-06-14 22:23:51 +0200
committerPaweł Redman <pawel.redman@gmail.com>2026-06-14 22:23:51 +0200
commitf13eee247a6f318e0bd9cabb878316e80ee916a0 (patch)
tree4e77208825fa673f7692df9d0c9b4ebb86a68688 /site/content/software/cem.typ
parent62ef3bb5f7915d2326bcc9f351265107425fc087 (diff)
Migrate software pages to Typst
Co-authored-by: Cursor <cursoragent@cursor.com>
Diffstat (limited to 'site/content/software/cem.typ')
-rw-r--r--site/content/software/cem.typ30
1 files changed, 30 insertions, 0 deletions
diff --git a/site/content/software/cem.typ b/site/content/software/cem.typ
new file mode 100644
index 0000000..1754553
--- /dev/null
+++ b/site/content/software/cem.typ
@@ -0,0 +1,30 @@
+#import "/common.typ": post, static, img, link-self
+
+#show: post.with(
+ title: "cem",
+ date: datetime(year: 2020, month: 8, day: 15),
+)
+
+#figure(
+ img(static("software/cem_grating.jpg")),
+ caption: [Diffraction on a periodic grating],
+)
+
+Cem is a simple C implementation of the finite-difference time-domain method for solving Maxwell's equations. It can simulate and visualize a number of wave phenomena like diffraction or refraction.
+
+= Background
+
+#figure(
+ img(static("software/cem_presentation.jpg")),
+ caption: [Me presenting at the contest. The text on the slide is a short description of FDTD. #link("http://www.lo10.wroc.pl/pl/gala-finalowa-xii-edycji-otwartego-miedzyszkolnego-konkursu-fizycznego-im-bozeny-koronkiewicz.html")[Source]],
+)
+
+Written two years after #link-self("software/ray")[ray], cem got me the first place in the 12th edition of the "Open Interschool Physics Contest" in 2015. The thing about this project I'm most proud of is how quickly I completed it. It took me only two weeks to go from having never heard of FDTD to the finished program.
+
+= Compiling and running
+
+The source code is available at #link("https://redman.xyz/git/cem")[cem]. While considerably more well-written than ray and even has a Makefile, your mileage may vary.
+
+This is yet another program of mine with an arcane interface. The window displays a cross-section of the (cuboidal) simulation domain. Use the mouse to look around. Keys 1 through 3 switch between orthogonal cross-section planes. Keys 4 through 6 switch between different fields: the electric field, the magnetic field and relative permittivity. F3 opens a new window, so you can look at what's going on from different points of view.
+
+Press return to open the command line. Try "load omkf/1.sim" or the other, bundled files. You can figure out the rest of the commands by looking at the .sim files. Press P and O to start and pause the simulation and press L to take a single step.