Coding up a simple geometric algebra in MATLAB

Click For Summary

Discussion Overview

The discussion revolves around implementing a simple geometric algebra in MATLAB, focusing on the representation and manipulation of its elements. Participants explore different programming approaches, particularly object-oriented programming, and express uncertainty about specific implementation details, such as handling the parameter \(\varepsilon\).

Discussion Character

  • Exploratory, Technical explanation, Debate/contested

Main Points Raised

  • One participant proposes using a long vector to represent the 16 elements of the geometric algebra but is unsure if this is the best approach.
  • Another suggests an object-oriented approach, referencing a tutorial on GABLE, while noting that it requires overloading MATLAB functions.
  • A participant clarifies that they are not interested in GABLE specifically but acknowledges the object-oriented approach as a potential method.
  • Another example of a Clifford Algebra implementation using an object-oriented approach is provided as a reference.
  • One participant expresses support for the object-oriented approach, suggesting that representing multivectors as 1-D arrays could work, but emphasizes that an object-oriented method may be more user-friendly.
  • A participant raises a concern about how to represent \(\varepsilon\) in the code, indicating a lack of experience with object-oriented programming in MATLAB.

Areas of Agreement / Disagreement

Participants generally agree on the potential benefits of an object-oriented approach but have not reached a consensus on the best way to implement the geometric algebra or how to handle \(\varepsilon\>.

Contextual Notes

There are unresolved questions regarding the representation of the elements of the geometric algebra and the specific implementation of \(\varepsilon\). Participants have varying levels of experience with object-oriented programming in MATLAB, which may affect their contributions.

Who May Find This Useful

This discussion may be useful for individuals interested in programming geometric algebras in MATLAB, particularly those exploring object-oriented programming techniques and seeking insights on implementation challenges.

hunt_mat
Homework Helper
Messages
1,816
Reaction score
33
Hi,

I have been wanting to do this for a while but not too sure how to go about it. I have the following geometric algebra
\lbrace\mathbf{e}_{i}\rbrace_{i=0}^{3} which satisfy the following relations: \mathbf{e}_{i}\mathbf{e}_{j}=-\mathbf{e}_{j}\mathbf{e}_{i} and \mathbf{e}_{1}^{2}=\mathbf{e}_{2}^{2}=\mathbf{e}_{3}^{3}=1\quad \mathbf{e}_{0}^{2}=\frac{1}{\varepsilon}

There are 16 elements in this geometric algebra. I thought about doing it as one long vector but didn't know if there was a better way of doing it. I also am not quite sure about dealing with the \varepsilon, any suggestions?

Mat
 
Physics news on Phys.org
I am aware of GABLE but it's not the geometric algebra which I am interested in.
 
hunt_mat said:
I am aware of GABLE but it's not the geometric algebra which I am interested in.

I wasn't really suggesting you use GABLE, but that you use the same type of object oriented approach that was used to create GABLE.

You can write a class that creates objects of the geometric algebra with all of the properties you listed.

Here is another example that implements a Clifford Alebra using an object oriented approach:

http://www.mathworks.com/matlabcentral/fileexchange/34286-clifford-algebra
 
Anyone else care to comment?
 
I think Kriel's approach is the right one. You could represent multivectors as ordinary 1-D arrays, and then write functions to work with them, but an object oriented approach seems like the most user-friendly way to go about it.
 
The trick comes in with how to represent epsilon in te code which I have no idea what to do with it.

I've not done much OO, and NONE with matlab.
 

Similar threads

  • · Replies 3 ·
Replies
3
Views
5K
  • · Replies 5 ·
Replies
5
Views
931
  • · Replies 1 ·
Replies
1
Views
900
  • · Replies 4 ·
Replies
4
Views
4K
  • · Replies 5 ·
Replies
5
Views
1K
Replies
19
Views
3K
  • · Replies 29 ·
Replies
29
Views
2K
  • · Replies 4 ·
Replies
4
Views
6K
Replies
5
Views
3K
  • · Replies 4 ·
Replies
4
Views
2K