This commit is contained in:
parent 15159302c3
 `@ -51,3 +51,9 @@ In general it seems in 3D it's more comfortable to represent planes and points t` `* A plane through the origin and a point on it. The line is perpendicular to that plane and goes through that point. This representation at least seems to be 1-1. Easy to tell if lines are parallel. Maybe not as easy to tell if they intersect, but not particularly worse than pairs of points, for example.` ``` ``` `* The unit normal vector of the plane from the last option, but projected to the xy-plane, and that point of intersection, but projected to the xy-plane, so that there are just four numbers corresponding to the four-dimensionality of the space of lines. This representation has some discontinuities: very close lines might be represented by faraway coordinates, and (partly as a result) it might be tricky to compute with in general.` ``` ``` `###### Choice of coordinatization` ``` ``` `Note that ultimately the choice of coordinates for entities serves solely to facilitate (a) display and manipulation of geometric objects, and (b) expressing and solving the constraints that are put on those entities. So we want to steer toward the choices that make those tasks the easiest. We won't necessarily have direct coordinates for every type of entity that Dyna3 allows to be created. Some may be "derived entities" that serve only as "front ends" for the actual items that Dyna3's internals are processing. For example, suppose we choose a system that provides direct parametrizations of spheres and planes (see e.g. [inversive.md](inversive.md)). Perhaps then when the user creates a circle, Dyna3 will actually create an auxiliary sphere and plane, and the auxiliary constraint that the plane contains the center of the circle. These auxiliaries would be marked so that only their intersection would be displayed, producing an arbitrary circle.` ``` ``` `The sort of scheme outlined in the previous paragraph works particularly well when it is easy to express the sorts of constraints one wants on the derived entity in terms of the supported constraints on the auxiliary entities. So for example, we want to be able to constrain a circle to contain a given point -- that translates just to both the plane and the sphere contain that point, so that works well. We also want to be able to say that a line and circle are tangent. This translates to the line being in the associated plane (easily expressed) and then (as one possibility) that there is a second plane containing the line and perpendicular to the first plane and tangent to the sphere. So at least for those two examples, these underlying entities to represent circles seem to work fairly well.`
 `@ -0,0 +1,46 @@` `#### Theory` ``` ``` `###### Jürgen Richter-Gebert` ``` ``` `We begin with the writing, and personal remarks/advice of the author of Cinderella, probably the theoretically most sound 2D dynamic geometry program.` ``` ``` `His monograph on the topic is _Realization Spaces of Polytopes_. The main result is the Universality Theorem for 4-Polytopes, which basically says that the realization space of a 4-polytope can be an arbitrary algebraic set (as constrasted with the Steinitz Theorem that says that every polyhedron can be realized with rational coordinates). The proof proceeds with a flavor similar to the proof of similar properties of the configuration spaces of linkages: he constructs polytopes which require that some measurement be the sum or product of some other measurements, etc.` ``` ``` `He brings this result down a dimension to 3-diagrams, which are basically complexes of polyhedra -- in essence, Schlegel diagrams of polytopes. He has Corollary 10.4.1 on p.95, which says that, among other things, all algebraic numbers are needed to coordinatize all 3-diagrams, and that the realizability problem for 3-diagrams is NP-hard, being polynomial-time equivalent to the Existential Theory of the Reals. Other issues are that there are 3-diagrams for which the shape of some 2-face cannot be arbitrarily prescribed (again by contrast to the polyhedron case); the combinatorial types of realizable 3-diagrams cannot be characterized by a finite set of forbidden minors; and the maximum size of a 3 diagram with \$n\$ vertices under the constraint that coordinates be integers is bounded below by a doubly exponential function in \$n\$.` ``` ``` `As a specific test case for a 3D dynamic geometry program, Jürgen suggests:` ``` ``` `"a kinematic circle of six hinges. For almost all arrangements of of lengths and angles this will be a rigid body. But for some arrangements this will exhibit nice movements.` `Here is a talk in German of me talking about those matters; a related Mechanism is at 7:00 [BR in der ARD Mediathek | ARD Mediathek](https://www.br.de/mediathek/video/campus-talks-prof-juergen-richter-gebert-av:5b4e7ccb00332600121858c5)"` ``` ``` `Unfortunately, the link seems to be dead. However, I believe Jurgen was referring to mechanisms like kaleidocycles; see e.g. https://www.pnas.org/doi/10.1073/pnas.1809796115.` ``` ``` `He also says the basic lesson of Cinderella was that to do the solving properly, it was critical to allow complex ambient spaces and allow solutions with complex coordinates (such as the imaginary intersection points of two non-intersecting circles). This technique allowed, for example, intersection points (say of lines and circles) to vary continuously around configurations where they disappeared, by tracing a path among the complex solutions to link the real solutions, avoiding the singularity.` ``` ``` `Jürgen also emphasized the need for an intuitive user interface. Notes on that will be in a separate file.` ``` ``` `His final mathematical advice was reasonably encouraging, however:` ``` ``` `"But still I would consider it all more or less doable. One should very precisely think about a doable scope.` `I think three things are essential for the math no matter what you exactly plan.` ``` ``` `1. Think projectively, ` ` Use Projective Geometry, Homogeneous Coordinates (or to a certain extent Quaternions, and Clifford Algebras, which are more or less an elegant way to merge Complex numbers with projective concepts.)` `2. Consider ambient complex spaces.` ` The true nature of the objects can only be understood if embedded into a complex ambient space.` ` More or less this is the lesson we learned from the Cinderella project.` `3. Use clever and adequate mathematical representations` ` So for 3D Geometry I would consider Plücker Coordinates as a good starting point,` ` Some parts of which are covered by Clifford algebras. Clifford Algebras might make it difficult to embed everything in a proper complex ambient space, since they are already complex in nature by themselves."` ``` ``` `###### Looking at CindyJS` ``` ``` `It would be nice to see how Jürgen handled some of these issues in a 2D system that he designed. Unfortunately, Cinderella was and remains closed-source; it was distributed for profit for some stretch of time. However, (a part of?) it was reimplemented in JavaScript as CindyJS, which is open source. I took a relatively quick look at that source code at one point, and these were my observations:` ``` ``` `CindyJS uses very concrete basic objects: 2D points are represented via projective geometry as a list of three floating-point numbers, and everything is done numerically. There are no symbolic representations or exact algebraic numbers. (Not sure how a point on a circle or line is handled, that would take further investigation.) ` ``` ``` `Lines are given by explicit coordinates as well (not sure of the internal details/exact coordinatization, or of how a "LineThrough" is represented).` ``` ``` `Was unclear to me how the complex parametrization for preserving continuity was handled in the code, even though Jürgen harps on complex ambient spaces; where are the complex numbers? Perhaps that part of Cinderella was never re-implemented?` ``` ``` ``` ```