Max Slaterhttp://thenumb.at/Recent content on Max SlaterHugoen-usWed, 25 Sep 2024 00:00:00 +0000Bay Areahttp://thenumb.at/Bay-Area/Wed, 25 Sep 2024 00:00:00 +0000http://thenumb.at/Bay-Area/San Francisco, CA, 2024
San José, CA, 2024
Tahoe City, CA, 2024BBGhttp://thenumb.at/BBG/Wed, 01 May 2024 00:00:00 +0000http://thenumb.at/BBG/Brooklyn Botanical Garden, New York, NY, 2024Puerto Ricohttp://thenumb.at/Puerto-Rico/Sat, 06 Apr 2024 00:00:00 +0000http://thenumb.at/Puerto-Rico/Río Grande, Puerto Rico, 2024Palm Springshttp://thenumb.at/Palm-Springs/Sun, 07 Jan 2024 00:00:00 +0000http://thenumb.at/Palm-Springs/Palm Springs, CA, 2023Oxidizing C++http://thenumb.at/rpp/Sat, 06 Jan 2024 00:00:00 +0000http://thenumb.at/rpp/I recently rewrote the C++20 infrastructure I use for personal projects, so I decided to snapshot its design in the style of another recent article. The library (rpp) is primarily inspired by Rust, and may be found on GitHub.
I use rpp as an STL replacement, and I’m currently developing a real-time path tracer with it. rpp attempts to provide the following features, roughly in priority order:
Fast Compilation
Including rpp should not increase compilation time by more than 250ms.14 Years of Programminghttp://thenumb.at/14-Years/Thu, 16 Nov 2023 00:00:00 +0000http://thenumb.at/14-Years/Many people have chronicled their programming journey in the 80s, 90s, and 00s—here’s one for the 2010s.
2010 I first encountered programming sometime around 2010, when I was 9 years old.
I can’t recall precisely how or why I got started, but I wrote my first programs in TI-BASIC, meticulously entering each symbol into my TI-83 calculator. They computed simple algebraic expressions that I used to do math problems.
I was fascinated by video games, so after learning how to poll for input, I created Catch the θ.NYBGhttp://thenumb.at/NYBG/Tue, 15 Aug 2023 00:00:00 +0000http://thenumb.at/NYBG/New York Botanical Garden, New York, NY, 2023Functions are Vectorshttp://thenumb.at/Functions-are-Vectors/Sat, 29 Jul 2023 00:00:00 +0000http://thenumb.at/Functions-are-Vectors/Conceptualizing functions as infinite-dimensional vectors lets us apply the tools of linear algebra to a vast landscape of new problems, from image and geometry processing to curve fitting, light transport, and machine learning.
Prerequisites: introductory linear algebra, introductory calculus, introductory differential equations.
This article received an honorable mention in 3Blue1Brown’s Summer of Math Exposition 3!
Functions as Vectors Vector Spaces Linear Operators Diagonalization Inner Product Spaces The Spectral Theorem Applications Fourier Series Image Compression Geometry Processing Further Reading Functions as Vectors Vectors are often first introduced as lists of real numbers—i.Jersey Cityhttp://thenumb.at/Jersey-City/Thu, 06 Jul 2023 00:00:00 +0000http://thenumb.at/Jersey-City/Jersey City, NJ, 2023Pittsburghhttp://thenumb.at/Pittsburgh/Fri, 19 May 2023 00:00:00 +0000http://thenumb.at/Pittsburgh/University of Pittsburgh / Carnegie Mellon University, Pittsburgh, PA, 2023Bronx Zoohttp://thenumb.at/Bronx-Zoo/Tue, 14 Mar 2023 00:00:00 +0000http://thenumb.at/Bronx-Zoo/Bronx Zoo, New York, NY, 2023Optimizing Open Addressinghttp://thenumb.at/Hashtables/Sun, 08 Jan 2023 00:00:00 +0000http://thenumb.at/Hashtables/Your default hash table should be open-addressed, using Robin Hood linear probing with backward-shift deletion. When prioritizing deterministic performance over memory efficiency, two-way chaining is also a good choice.
Code for this article may be found on GitHub.
Open Addressing vs. Separate Chaining Benchmark Setup Discussion Separate Chaining Linear Probing Quadratic Probing Double Hashing Robin Hood Linear Probing Two Way Chaining Unrolling, Prefetching, and SIMD Benchmark Data Open Addressing vs. Separate Chaining Most people first encounter hash tables implemented using separate chaining, a model simple to understand and analyze mathematically.Spherical Integrationhttp://thenumb.at/Spherical-Integration/Sun, 08 Jan 2023 00:00:00 +0000http://thenumb.at/Spherical-Integration/Or, where does that $$\sin\theta$$ come from?
Integrating functions over spheres is a ubiquitous task in graphics—and a common source of confusion for beginners. In particular, understanding why integration in spherical coordinates requires multiplying by $$\sin\theta$$ takes some thought.
The Confusion So, we want to integrate a function $$f$$ over the unit sphere. For simplicity, let’s assume $$f = 1$$. Integrating $$1$$ over any surface computes the area of that surface: for a unit sphere, we should end up with $$4\pi$$.Cabohttp://thenumb.at/Cabo/Sun, 01 Jan 2023 00:00:00 +0000http://thenumb.at/Cabo/Los Cabos, BCS, Mexico, 2022Exploring Neural Graphics Primitiveshttp://thenumb.at/Neural-Graphics/Sun, 27 Nov 2022 00:00:00 +0000http://thenumb.at/Neural-Graphics/Neural fields have quickly become an interesting and useful application of machine learning to computer graphics. The fundamental idea is quite straightforward: we can use neural models to represent all sorts of digital signals, including images, light fields, signed distance functions, and volumes.
Neural Networks Compression A Basic Network Activations Input Encodings Positional Encoding Instant Neural Graphics Primitives More Applications SDFs NeRFs References Neural Networks This post assumes a basic knowledge of neural networks, but let’s briefly recap how they work.Guggenheimhttp://thenumb.at/Guggenheim/Sun, 27 Nov 2022 00:00:00 +0000http://thenumb.at/Guggenheim/The Guggenheim, New York, NY, 2022
Central Park, New York, NY, 2022The Methttp://thenumb.at/Metropolitan/Wed, 16 Nov 2022 00:00:00 +0000http://thenumb.at/Metropolitan/The Metropolitan Museum of Art, New York, NY, 2022
Central Park, New York, NY, 2022Differentiable Programming from Scratchhttp://thenumb.at/Autodiff/Sun, 31 Jul 2022 00:00:00 +0000http://thenumb.at/Autodiff/Differentiable programming has become a hot research topic, and not only due to the popularity of machine learning frameworks like TensorFlow, PyTorch, and JAX. Many fields apart from machine learning are finding differentiable programming to be a useful tool for solving optimization problems. In computer graphics, differentiable rendering, differentiable physics, and neural representations are all gaining popularity.
This article received an honorable mention in 3Blue1Brown’s Summer of Math Exposition 2!Lake Tahoehttp://thenumb.at/Lake-Tahoe/Fri, 10 Jun 2022 00:00:00 +0000http://thenumb.at/Lake-Tahoe/Incline Village, NV, 2022Exponentially Better Rotationshttp://thenumb.at/Exponential-Rotations/Fri, 15 Apr 2022 00:00:00 +0000http://thenumb.at/Exponential-Rotations/If you’ve done any 3D programming, you’ve likely encountered the zoo of techniques and representations used when working with 3D rotations. Some of them are better than others, depending on the situation.
Based on CMU 15-462 course materials by Keenan Crane.
Representations Rotation Matrices Euler Angles Quaternions Axis/Angle The Exponential and Logarithmic Maps Axis/Angle in 2D Axis/Angle in 3D Averaging Rotations Quaternions (Again) Further Reading Representations Rotation Matrices Linear-algebra-wise, the most straightforward representation is an orthonormal 3x3 matrix (with positive determinant).Graphics Blogrollhttp://thenumb.at/Graphics-Blogroll/Mon, 04 Apr 2022 00:00:00 +0000http://thenumb.at/Graphics-Blogroll/In no particular order, my list of cool computer graphics (or adjacent) blogs:
Amit Patel Interactive algorithm visualizations Highlight: Introduction to A* Inigo Quilez 3D SDF rendering and shadertoy Highlight: 3D SDF Index Fabian Giesen Graphics programming, compression, comp arch, optimization Highlight: A trip through the Graphics Pipeline 2011 Bart Wronski Image/signal processing, real-time rendering, linear algebra Highlight: Why are video game graphics still a challenge? Nicky Case ‘Explorable’ real-world models, mental health Highlight: Parable of the Polygons Bartosz Ciechanowski Highly detailed interactive explainers Highlight: Cameras and Lenses Alan Zucconi Misc.Las Vegashttp://thenumb.at/Las-Vegas/Sun, 03 Apr 2022 00:00:00 +0000http://thenumb.at/Las-Vegas/Las Vegas, NV, 2022
Hualapai Nation, 2022Hamming Hatshttp://thenumb.at/Hamming-Hats/Tue, 29 Mar 2022 00:00:00 +0000http://thenumb.at/Hamming-Hats/I first encountered the Hat Problem in CMU 15-251.
The Game Consider a 31-person game in which each player is assigned a red or blue hat, determined by an independent coin flip. The players can see everyone else’s hat color, but not their own.
Once the game begins, no communication is allowed between the players. After looking at the other hats, all players must simultaneously either announce the color of their hat or abstain from guessing.Washingtonhttp://thenumb.at/Washington/Wed, 16 Mar 2022 00:00:00 +0000http://thenumb.at/Washington/Washington, D.C., 2022Kauaihttp://thenumb.at/Kauai/Sat, 22 Jan 2022 00:00:00 +0000http://thenumb.at/Kauai/Kauai, HI, 2022A Compiler Bughttp://thenumb.at/Compiler-Bug/Sun, 26 Dec 2021 00:00:00 +0000http://thenumb.at/Compiler-Bug/While I was working on Dawn, I ran into a curious bug in the Visual Studio 2019 C++ compiler. I reported it to the bug tracker, where it was confirmed to be an interference analysis issue. It was eventually fixed nearly a year later in 2020. Today, let’s investigate what the issue really was.
The problem arose upon implementing a Perlin noise type for procedural solid texturing. My type just so happened to include a 4-kilobyte array of pre-initialized random data, and this precise size caused writes to the data to interfere with a preceding struct member.Exile: Voxel Rendering Pipelinehttp://thenumb.at/Voxel-Meshing-in-Exile/Sun, 26 Aug 2018 00:00:00 +0000http://thenumb.at/Voxel-Meshing-in-Exile/No, Exile is not technically a “voxel” engine. A real voxel engine unifies objects, textures, and more into colored voxel data, rendering them via raymarching/marching cubes/dual contouring/etc., and can target realism. Instead, Exile is a “voxel” engine in that it’s a traditional 3D engine that happens to focus on representing and drawing textured cubes (like Minecraft and related games). Some have worked around this linguistic confusion by christening the technique “Swedish cubes,” but for the purposes of this post, please assume that voxels imply textured cubes.Exile: Reflectionhttp://thenumb.at/Reflection-in-Exile/Tue, 14 Aug 2018 00:00:00 +0000http://thenumb.at/Reflection-in-Exile/Reflection, specifically type introspection, is an immensely useful feature provided by many modern languages. By enabling a way to inspect the properties of types—for example, the types of the members of a data structure—introspection allows one to write much more general and effective generic code, enforce interfaces/contracts, and more.
Though most obviously found in dynamic languages, introspection is just as powerful in compiled, statically typed languages such as Go and Jai.Exile: Hot Reloadinghttp://thenumb.at/Hot-Reloading-in-Exile/Wed, 25 Jul 2018 00:00:00 +0000http://thenumb.at/Hot-Reloading-in-Exile/In game development, one of the main appeals of implementing game logic in a managed language (e.g. Lua) is the convenient ability to make changes to the source, reload the logic on the fly, and test the changes without restarting the game. A similar technique is also often used to refresh shader programs, asset files, and the like.
However, supporting a secondary scripting language—or using one from the start—is not the only way to implement such a system.CMU Courseshttp://thenumb.at/cmu/Mon, 01 Jan 0001 00:00:00 +0000http://thenumb.at/cmu/This contains thoughts on each course I took at CMU. Similar pages: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12
Degree: BS in computer science with concentrations in computer graphics and computer systems. I also like math/algorithms/languages, but don’t focus on them.
Pre-CMU: I entered CMU with an extensive programming background in systems and some real-time graphics, as well as a decent undergrad-level math background. I didn’t have any competitive math/programming experience.Photoshttp://thenumb.at/photos/Mon, 01 Jan 0001 00:00:00 +0000http://thenumb.at/photos/ 25 Sep 2024 » SF Bay Area 01 May 2024 » Brooklyn Botanical Garden 06 Apr 2024 » Puerto Rico 07 Jan 2024 » Palm Springs 15 Aug 2023 » New York Botanical Garden 06 Jul 2023 » Jersey City 19 May 2023 » Pittsburgh 14 Mar 2023 » Bronx Zoo 01 Jan 2023 » Los Cabos 27 Nov 2022 » The Guggenheim 16 Nov 2022 » Metropolitan Museum of Art 10 Jun 2022 » Lake Tahoe 03 Apr 2022 » Las Vegas 16 Mar 2022 » Washington 22 Jan 2022 » Kauai