Skip to content
Alfred Differ edited this page Dec 2, 2018 · 1 revision

Clados Project

[Clifford Algebra Delineated ObjectS]

Clifford algebra for the careful developer of physical simulation software

The Clados Project was born from a need to write a math library to test certain physical models in the mid-1990's. Prior to that time research into the use of Clifford algebras in physics at UC Davis was a pen and paper process where one examined possible physical manifestations of untried theories, variations on linearization methods, and perturbation expansions to check for matches with existing theory and experimental data. As computational resources became cheaper it became obvious that many other ideas could be tested on commodity machines. By the late 90's the first library was written and in use exploring a simple mechanics model involving a solar sail in orbit around the sun where the model avoided the use of traditional Euler orbit parameters. Clados 1.0 is a class library written in Java that implements geometric algebras for the purpose of supporting physical simulation models. The classes encapsulate geometry in the expressions of physical quantities. OOP encapsulation is intended to isolate geometry and physics behaviors from each other in order to provide better support of quality testing during application development. It is also meant to limit the scope of knowledge required to write moderately good physical simulation code. For example, one can write vectors using tuples and then add axial and polar vectors because the mathematics allows it. Such a case, though, produces physical gibberish, so a good test plan must be able to distinguish this risk and test for it in case a developer does not. Clados classes hide geometric operations away from physical operations, thus they make it harder to make the easy and crude mistakes that quality testing normally has to detect.

This book is written in three sections devoted to the principles (why), classes (what), and examples (how) associated with the Clados library. The first two were originally envisioned as stand-alone documents that aided early projects like SailAway, but as detailed content was added it became apparent they referred to each other too much. They also began to refer to unwritten example models, so putting them together under one cover makes some sense.

However, due to the original independence of the first two sections, there is no particular order in which a reader should read them. Books suggest a linear approach to learning, but that might not work well here when different readers first seeing this material might come in with very different backgrounds. It is probably best to think of a three-path approach where one hops between the second and third sections and then reads parts of the first one when a physical model or one of the classes does something the reader finds unusual or conflicting with what they know of physics from other sources. The principles section answers questions concerning why certain things are done they way they are, but the only reason it is placed first is because it was the first written. It is a rare reader who needs answers to those questions until they have struggled with the strangeness of a concept for awhile. A struggle explains a principle better than anything else. The first section lists five geometric principles and three numbering principles. They are not exactly independent of each other, but they are listed this way to act as a guide for modeling physical objects and their relationships. They represent the type of rules that often go unspoken or are taught as part of the problem solving methods students pick up over time. They are the rules that philosophers try to uncover either by observing us write and work models or by reasoning out what we had to have done to get where we went. No matter the approach, they are written here explicitly to help make them transparent to all. Of course, there may be other unwritten ones to be found by someone with a philosophical interest, but that is for another day. The first section finishes with what is probably the weakest part of this book and the part of Clados that is most likely to change in the near future. It is obvious that homogenous and conformal models must be better supported. Much work remains to be done.

The second section lists the classes of the CladosG and CladosF packages and a short description for each. It also includes a map showing the attributes of a class and its relationship to the other classes. Some classes are parts of the context against which geometry is defined while others do the grunt work of operations. Each class is describe in a bit more detail after the map with the list of methods limited to those that matter most to the functionality of a class. For example, context classes like an Algebra show methods for using it in a complicated model making the setters, getters and static methods important enough to mention. A class like Basis, however, focuses upon its nature as a sorted, ordered list of indexes so developers will understand what the GProduct class does later during multiplication.

The third section is a list of scenarios where particular problems are sketched and physical models for them are designed. Some problems have multiple models suggested while others have sketches of models instead. Some day when example code is written showing precisely how Clados works it will probably be these scenarios will be implemented first. There is work to do writing a physics package in Clados first, though.

Each of the scenarios is progressively more complicated starting with a simple calculator and ending with an E&M type field theory that is particularly easy to write and analyze with geometric tools. The earliest ones are likely to be the easiest for those whose experience focuses upon application design and development. The later ones are probably the easiest for physics students with little OOP experience, though the physics they contain will seem very strange indeed. They are meant as example models, though. One doesn't have to do physics precisely this way if one is willing to disagree over one or more of the modeling principles.

One of the traits shared between open source programming and independent research is the nature of the work done can best be described as a personal itch for the one initiating the effort. Others might discover they suffer from the same irritation that has led to the writing of the Clados library or they might not, but the work will continue until the itch stops or can finally be ignored. In the situation underlying Clados, the irritation is related to the odd assortment of math tools and modeling procedures taught to physics students. The menagerie is unnecessarily complicated and far too ad hoc to offer proper support of digital models that can be quality tested by someone other than an expert in the field. More than one expert is needed in many cases. That should annoy anyone who understands how important physical models are to our future.

As is often done with efforts like this, all the code is offered under an open source license. In the case of Clados, one of the GPL's applies. Special exceptions will be made to those who ask for it and have good reason for doing so, though, so nothing is written in stone. Contributions of patches, document corrections, new work, or constructive criticisms are always welcome. Clados is currently a private project not affiliated with any university or supported by any grant, so the door is open to suggestions from anyone who has an interest in the subject. The objective is to offer better support of physics through geometric tools, so anything that helps do that is likely to be welcomed.

The writing of the book has taken about a year of part-time work mostly done after working my day job. That means I'm deeply indebted to the tolerance my family has shown for this effort. Many nights have gone by where I sit at my desk with headphones on listening to music while I write this and I've rediscovered a joy I set aside so many years ago. Without their tolerance and support, this would not have been written, let alone finished enough to prepare the next stage of development for Clados where the frame concept gets expanded and the first physics package classes get written.

Alfred Differ – 2012/10/06