5 ms·
Well, actually does in a lot of cases. For example line intersections are completely branchless in PGA. Parallel lines simply give you the according point at in
by gurkwart 3y ago
Well, actually does in a lot of cases. For example line intersections are completely branchless in PGA. Parallel lines simply give you the according point at infinity. Pretty kool!
- phkahler 3y agoIt's not a question of division by zero type of things. It's more about rounding errors, classifications, and topology. Does a point lie on one side of a plane or the other? Are two points actually the same? Are surfaces coincident? These are all questions with discrete answers and dealing with them is far harder than picking a more abstract representation of a few primitives and operators. Example: Two boxes are in contact face to face. Think two 2x4s laying one on top of the other to form a cross. If I want to create a union of these objects, the surfaces that are in contact need to be cut into 3 areas each - one on each side of the other box, and a middle (contact) area that will be discarded. Where do I split the edges? Obviously where they intersect the plane of the other object. But the plane we need to intersect is the one parallel to the edge. We can often get away with splitting against the orthogonal plane, but only if it's a sharp edge. If it's rounded we end up with 3 surfaces all tangent at the intersection. So maybe I should look for edge-edge intersections. Right. But what if some code splits a line against a line, but another line is split against a plane? numerically these may be different results, but I know they should be the same point. I'm rambling because this is exactly a problem I was working on last night (aiming to fix a bug in Solvespace) and the solution has absolutely nothing to do with details like what abstraction is used to represent the geometric primitives, and everything to do with numerical precision and topological representations. These are the hard problems GA does not address.