Posts

Software is Literature

Image
5 minute read. Originally an aerospace engineer, I've been a software engineer now for about half my career, but it doesn't quite feel like engineering to me. I don't want to start an argument on the definitions of terms, but hear me out, I think there are some interesting differences.  I remember first thinking it was odd that at my university, the Computer Science department was not in the College of Engineering, but in the College of Arts & Sciences. Sure, "science" is right there in the name, but the practitioners are generally known as software engineers, and certainly they ran in the same circles as the rest of us engineers. However, while the civil, mechanical, aerospace, electrical, and chemical engineers were required to fill our time with math, physics, and mechanics, the software engineers had to take humanities and social science electives just like the comparative literature majors.  I also remember when my career first turned from aerospace - I j...

Perseverance - a history of Manifold

Image
7 minute read. If I had known it would take this long, would I have started? This is a question I asked myself when looking back at the development of Manifold , and I honestly don't know the answer. Certainly taking on this challenge was born largely of naivety in software engineering, especially when realizing I worked on it for almost eight years before it saw the light of day.  Why did I take on this project? It started with 3D printing, where I found out that much of the lack of reliability stemmed from models that had non-manifold mesh data. Manifoldness is what allows a mesh to represent a solid, with a clear inside and outside, so without this the computer is left to guess what your intentions are. In many cases there is simply no clear way for an algorithm to proceed when it encounters a non-manifold mesh.  At first I thought these non-manifold meshes were simply the result of bugs, but while working at Microsoft I got to work with experts from many of the major CAD ...

3D Interaction

Image
8 minute read. UX (user experience) design is hard - for those not in the industry, it's basically a slightly broader term for UI (user interface) or GUI (graphical user interface), which is to say how we as engineers let you the user interact with our software. I'll preface this by saying I have no formal training in UX, but then again I don't have formal training in sculpture or software engineering either, and I like to think that hasn't stopped me. 2D UX is plenty tricky, but 3D is a real bear. I've ended up designing and building a fair amount of 3D UX simply because there was no one else (a common deficiency of large software companies is a dearth of UX experts). I'm pretty proud of what I've built and I'll describe it in the hopes that it's copied, because I have spent a lot of time being frustrated by awful 3D interfaces. What makes 3D so hard? The biggest issue is that the interface (screen, mouse, touchscreen) is all 2D. Worse yet, it ...

Reframing Capitalism

Image
5 minute read. I was raised by back-to-the-land hippies, so I grew up with a pretty negative view of capitalism, but also with no clear idea of what the word meant. My parents were distrusting of rich people; a bias I still carry with me even as I'm becoming one. They considered debt to be evil; they never even had a mortgage, having bought five acres in the 1970s for $10,000 which they borrowed from my five-year-old brother's inheritance. They paid him back, though I have no idea if interest was involved. So anathema was debt that I honestly believed I couldn't go to college without a free-ride, since they had no money to send me. I managed to get enough scholarships from writing a dizzying array of application essays, but upon arrival I realized my stress was probably misplaced given everyone else had taken out student loans.  One of my closet friends in college had the opposite upbringing, where his family not only discussed investment at the dinner table, but played Mon...

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...

Solid Geometry Representations

Image
7 minute read. I recently published my Manifold library , which does operations on solids, specifically those represented by triangle meshes. But there are many ways to represent a solid object in a computer, so why did I choose this one? I thought it might be useful to give an overview of some of the popular data structures and what they are well- and poorly-suited to. Of course this is also my opinion and I have limited experience with many of these, so please comment if you know something I don't.  Categorization is always a bit tricky and arbitrary, but I feel like the highest-level split is between boundary representations (B-Reps) and signed distance functions (SDFs). I'll sub-categorize below each of these. Signed Distance Functions (SDFs) Though less common, the SDF is in some ways the simpler idea. It explicitly represents a solid: in its simplest form it is a function that takes any point in 3D space and returns if that point is inside or outside of the solid. To make...

Manifold Performance

Image
4 minute read. The primary purpose of my Manifold library is topologically-robust results, as I've already discussed . My secondary purpose is to make it fast by leveraging the power of parallel processing. There is still significant work that can be done to improve performance, but I'm proud enough of its current state to show some benchmark comparisons.  How to benchmark? It would be nice to show some kind of big-O trend, but different shapes have wildly different results: if we take n to be the number of triangles in each input shape, the number of intersections could be anywhere from zero to n 2 , which will directly affect the processing time. The Menger sponge is an example that scales close to  n 2 , but that is not common. If you think of the progression of  n  as a refinement function, subdividing the triangles into smaller ones, then you would generally expect to have O( n 1/2 ) intersections since the surface is 2-dimensional while the intersection cu...