🐉 Author: Samuele Ferri (@ferrixio)
Since quaternions are 4-dimensional objects, we can't represent them using our standard tools, because we live in a 3-dimensional cage. However, with special methods it's possible to project (part of)
The class doesn't have an initializer, but I added a decorator to check invalid inputs.
At this moment forward, the word Iterable
means any iterable object of quaternions.
This is the main function to plot quaternions. It splits the 4-dimension in a 3D-space of points + 1D-line of colors
; in mathematical symbols,
The boolean colored
, if set to False, paints differently the graph. Actually, this list of colors will be graduated from black to red, according to the order of the given quaternions.
At this time, no other args and kwargs are implemented (work in progress).
This particular way evaluates the relative distances among quaternions and plots a bar graph of the minimum distances, sorted by the order in input.
This is wacky and (maybe) useless, but at least shows something about their distances.
This method is interesting but difficult to understand. It draws a 3-dimensional graph of the list of given quaternions, as plot
do, connected according to the minimum mutual distances among them. As before, the three imaginary parts are coordinates in
I decide to write this method to add the possibility in the future to study the topology of the points. Recently I discovered a branch of mathematics called topological data analysis, which amazed me.
At this moment, the method draws constellations of connected colored point in 3D.
The
Since the projections are maps