Visualization tool for python in PGA

A vector in different GA can mean many different things.
In 3DPGA is a plan; In 2DPGA is a line. In CGA is a sphere.
In STA is an event. So, I can understand that it is difficult to have a universal visualization tool.

However, I only focus on PGA and python. But I am having problems visualizing it.
I know that ganja.js lib has excellent visualization. But it is java.
The python lib pygae/clifford dose not come with visualization tool.
Therefore, I wonder if there is a visualization tool for 3D PGA in python.
Something like matplotlib but for geometric algebra.

Thank you for the help.

1 Like

Iā€™m also interested in something like that. I once played around a bit with pyopengl (together with pygame) and clifford, which worked for a pure visualization. There you can use the old style OpenGL functions in a more or less straight forward way to model points, lines, and planes.

    # Notice: these are functions from a class
    # self.point_coords extracts the coordinates
    # from a given point
    def draw_point(self, point, color=(1, 1, 1, 1)):
        glBegin(GL_POINTS)
        glColor4fv(color)
        glVertex4fv(self.point_coords(point))
        glEnd()

    def draw_segment(self, point1, point2,
                     color1=(1, 1, 1, 1),
                     color2=(1, 1, 1, 1)):
        glBegin(GL_LINES)
        glColor4fv(color1)
        glVertex4fv(self.point_coords(point1))
        glColor4fv(color2)
        glVertex4fv(self.point_coords(point2))
        glEnd()

But at the end, it is just that: a visualization. For nice effects, I think you have to use shaders and more modern OpenGL libraries. That was the point, where I did not have time to go into the details.

Hopefully, this helps.

Best wishes
Johannes

1 Like