summaryrefslogtreecommitdiff
path: root/site/content/software/ray.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/ray.typ
parent62ef3bb5f7915d2326bcc9f351265107425fc087 (diff)
Migrate software pages to Typst
Co-authored-by: Cursor <cursoragent@cursor.com>
Diffstat (limited to 'site/content/software/ray.typ')
-rw-r--r--site/content/software/ray.typ38
1 files changed, 38 insertions, 0 deletions
diff --git a/site/content/software/ray.typ b/site/content/software/ray.typ
new file mode 100644
index 0000000..df64659
--- /dev/null
+++ b/site/content/software/ray.typ
@@ -0,0 +1,38 @@
+#import "/common.typ": post, static, img, link-self
+
+#show: post.with(
+ title: "ray",
+ date: datetime(year: 2020, month: 8, day: 15),
+)
+
+#figure(
+ img(static("software/rrt_1.jpg")),
+ caption: [A render of the bundled scene (gamma corrected).],
+)
+
+Ray is a multi-threaded, real-time #link("https://en.wikipedia.org/wiki/Path_tracing")[path tracer], written in C. Paths are traced through an octree, which can be edited at run-time, giving it sort of an "early Minecraft prototype" feel. Being my first "serious" program, it's rather primitive and can't work with complicated geometry or surface models.
+
+= Background
+
+#figure(
+ img(static("software/rrt_2.jpg")),
+ caption: [A render of a default random octree (gamma corrected).],
+)
+
+I wrote the program as a part of my presentation titled "A physically accurate computer light model" for the finale of the 10th edition of the "Open Interschool Physics Contest" in 2013. I didn't win as there was way too much programming and too little physics involved. I wasn't great at presenting back then either. Nevertheless this was the first step toward choosing Optics as my field of study. And I did much better two years later with #link-self("software/cem")[cem].
+
+= Compiling and running
+
+The source code is available here at #link("https://redman.xyz/git/ray")[ray]. Because this is a very old program, written back when I wasn't too experienced, compiling and running it can be a bit of a challenge. You'll probably have to figure it out yourself.
+
+At start the program loads a world from "world" in the working directory. If it's not present, it'll generate a fractal-looking random octree. The repository includes a weird Pripyat-looking scene. Sometimes camera physics bug out, removing the world fixes the issue.
+
+The controls are listed below.
+- Use the mouse to look around, WASD to move around, space to fly up, C to fly down.
+- *F1 releases/locks the cursor.*
+- The mouse wheel adjusts the focal length (zoom level).
+- Left and right mouse buttons destroy and place blocks, respectively.
+- Keys Z, X, R, T, Y and U select the block type to place. In order: concrete, dirt, metal, mirror, light and banner.
+- Keys 1 through 7 change the render quality (7 being the best).
+- Press Q to launch a bouncy light source, F to toggle the flashlight.
+- F11 renders to "offline.bmp" at a much higher resolution.