Posts

Showing posts with the label Algorithms

A Note on Root-Finding

Image
5 minute read. Have you ever accidentally advanced the state of the art in a field that's not your specialty? I'd guess it's more common than we expect, since people in this situation don't generally know how to publicize their findings. I'm going to relate my own small example, in hopes someone who needs it can find it. Recently I found myself in need of a root-finding algorithm - I was working with signed distance functions, which have one sign for points inside a volume and the other sign for points outside and I needed to find the surface where that function is zero. These functions are not necessarily true Euclidean distance, so I figured I would need an iterative method to find the closest zero-crossing along a particular line. At first I write a bisection routine: I had a point on each side with opposite signs, so just evaluate the midpoint and repeat on the half that still has opposite signs until the desired precision is reached. Simple enough, but it seeme...

Smoothing Triangle Meshes

Image
4 minute read. My Manifold library operates on triangle meshes because they are a lowest common denominator representation of a solid that all others, from NURBS to SDFs, can be converted into. However, it can take a huge number of flat facets to adequately approximate the smooth curves of these other representations, particularly in manufacturing where graphics cheats like Phong shading are not available. Therefore, it would be convenient to be able to smoothly interpolate a triangle mesh so that fewer triangles could adequately approximate the desired curved surface. I have devised such a method which I will describe here, but first, a little background. When I was working on the 3MF spec (3D manufacturing format), we were trying to avoid the pitfalls of AMF (additive manufacturing format), one of which was curved triangles. The idea was that faceted meshes could be refined to a smooth shape by interpolating each triangle's corner vertices and normal vectors; the problem w...

Introducing my Manifold Library

Image
3 minute read. Manifold is my computational geometry library - the beginnings of a CAD kernel of sorts. Its purpose is fast, reliable, topologically-sound operations on manifold triangle meshes. Reliability is really the key: I started this library because I was amazed at how unreliable the geometry kernels I had experienced (even high-end CAD) were in generating manifold - basically solid - output. The lack of reliability stems from the fact that Euclidean geometry is based on real numbers, but computers work in finite precision with rounding errors. This means it is entirely possible for a computer to find two points to be on the same side of a line, but their midpoint to be on the opposite side: Euclidean geometry does not hold.  For this reason, many computational geometry libraries are proven correct for "general position" input, which means geometry where nothing is within rounding error of coincident, co-linear, or co-planar. This might be okay if the geometry were...

Environment Lighting & SIGGRAPH

Image
4 minute read. Updated July 8, 2024. Model: Boom Box Corset Damaged Helmet Flight Helmet Chess Game Velvet (sheen) Sofa Sheen Cloth Toy Car Water Bottle Lighting: Default Aircraft Workshop Music Hall Pillars Spruit Sunrise Whipple Creek Tone Mapping: PBR Neutral Linear/Clamped ACES AgX Reinhard Cineon UPDATE: Second time's the charm! After my polite rejection from SIGGRAPH a few years ago (the original post on that is below), someone recommended that I submit a talk on the work I just finished with the Khronos standards group on color and tone mapping for 3D product rendering. This time it was accepted, so I'll be presenting in Denver for SIGGRAPH 2024. My talk is in a session called "Love Me Some Color", which is appropriate since I've spent the last year+ going very deep on color theory. You can find my talk's abstract here - apparently the abstract of a 20-minute SIGGRAPH talk i...