# Implementing geometric product

Hi folks,

I have used BiVector.net code generator to experiment a bit Geometric algebra, and now I want to tweak a bit the memory representation of float mvec[16] in it , for testing purposes.

Do you know a tool that could help to write the geometric product, in addition to the Cayley table ? A website or a software which could develop (a + be0 + ce1 + d*e2 …) * (a’ + b’*e0 + c’*e1 + d’*e2 …) formally would be great.

I don’t want to modify the generated code (which hardcode the current representation) but on the other side I don’t want to be too simplistic with just two for-loops implementing a generic geometric product (too many multiplications by 0), so having the geometric production unfolded formally would be nice.

If there is no tool for this then it’ll be pen & paper time I guess

Btw thanks for this website full of interesting resources around this (new for me) topic !

Of course Grassmann.jl is compatible with various symbolic computation packages, such as my own Reduce.jl, so you can do this type of thing:

julia> using Reduce, Grassmann

julia> basis"3"
(⟨×××⟩, v, v₁, v₂, v₃, v₁₂, v₁₃, v₂₃, v₁₂₃)

julia> (:a*v1+:b*v2+:c*v3)*(:x*v12+:y*v13+:z*v23)
0.0 + (-((b * x + c * y)))v₁ + (a * x - c * z)v₂ + (a * y + b * z)v₃ + (a * z - (b * y - c * x))v₁₂₃


However, this is an incorrect approach for implementing the geometric product. Looking at symbolic output like this is not the correct approach. Instead, if you actually understood the geometric product, then you wouldn’t need to look at this to implement it.

If you understood the principles of the geometric product, you’d be able to construct the source code from scratch without ever looking at somebody else’s output, as I have.

I understand the geometric product, but thank you for such a condescending and conceited response.
Intrigued by your post I looked at your other posts (on this forum as well as the discussions on your git project GitHub - chakravala/Grassmann.jl: ⟨Leibniz-Grassmann-Clifford⟩ differential geometric algebra / multivector simplicial complex), the least I can say is that I’m not impressed with your behavior in general… hints of vanity, lack of empathy and quick to judge harshly, a toxic personality if ever there was one.

I’m old enough to remember the netiquette that encouraged respect and polite behavior in online discussions. Even this forum mentions the following points while I’m typing this

• Be kind to your fellow community members.
• Constructive criticism is welcome, but criticize ideas, not people.

If you don’t get better at it then you can refrain from responding to people, if you’re going to do it that way. Everyone will be better off.

1 Like

Thanks for noticing, I identify as problematic.

If you were wise, then you wouldn’t take any of this personally and not to personally identify with problems, mistakes, or errors I point out in writings.

Be honored I even bothered to respond at all.

You want free advice from people with more experience than you … you’re getting it? Or did you want advice from people with less experience or pay for it? If you want to set some sort of terms for how we talk to each other, perhaps you ought to be paying me, I’m not your servant.

Using your turns of phrase my answer should probably have been something like « if you knew how to read a question such as the one I wrote, you’d have got that my intent is to tweak the memory in ways you cannot understand since your frameworks have such poor memory management unlike mine. » Such a joy.

Do you know that people give free advice to other people frequently in non-market relationships, and even when the former are more competent than the latter? You know these things called forums on the Internet?
In my job we have things like stackoverflow, but we even share entire software, it’s called free software. You should read about it, sometimes it can be useful to discuss (like this Discourse “the place to build civilized communities”) and even to do math (LaTeX)

It seems that money matters a lot to you, but I will refrain from paying as you must already be overwhelmed with requests with such a positive attitude.

Don’t feel obliged to answer, too much honor indeed.

1 Like

Hi Xavier_OM,

while not yet officially supported, my new library would be able to help you out without the need to install anything. Just check here:

https://enki.ws/ganja.js/examples/coffeeshop.html#bwMftLfTz

you can change the desired basis order on line 6, and the product to output on line 11, then simply hit run to update.

Let me know if I can be of anymore help, happy to squeeze that inbetween! When I find some time I will try to provide these basic symbolic capabilities directly on bivector.net also.

Happy GA-ing!

Steven.

You do realize I am literally a free software developer and you are not? Is this project you are working on free software? Show us the source code, I showed you mine.

You seem to be offended that I reminded people to know how the geomtric product works. With software like mine, you can get your answer but I still recommend to actually understand the geometric product. You’re not the only person who will read this, but I understand your ego is personally harmed by my recommendation, thanks for clarifying that I crumbled your ego with my simple (actually super advanced) recommendations.

Chakravala,

You have, (and this part is absolutely fine - we all make mistakes), completely misunderstood the OP’s question. The OP wanted to know if there was any symbolic software that can handle arbitrary basis permutations (e.g. \mathbf e_{31} instead of \mathbf e_{13}), and arbitrary mv layouts (e.g. 1,\mathbf e_{21}, \mathbf e_2, \mathbf e_1 instead of 1, \mathbf e_1, \mathbf e_2, \mathbf e_{12} ). Correct me if I am wrong, but your library supports neither - last time I checked anyway.

Alas, and again no biggy, that means your answer is completely irrelevant and your software suggestion incorrect. What is not ok however is the rude, offensive and condescending tone that you used in said irrelevant answer.

If you choose this approach again, I will have to make sure this entire forum of idiots is banned from the absolute honor and privilege of interacting with you ever again. (and just to make sure there is not going to be another reading comprehension problem: behave according to the forum rules or you will be banned.)

Steven

1 Like

You are incorrect, I have addressed the original request:

My response addresses the request because it “unfolds the geometric product” in a way which could let you inspect the algebra to avoid multiplications of zero.

Therefore, I have precisely addressed the request.

Even though my program can give this result to aid with the desired “unfolded geometric product”, I still recommend anyone trying this out to actually understand the principles of the geometric product. Somebody without the knowledge can try it out as well, but I recommend understanding the principles.

You are doing this on purpose right? It’s not that difficult - from the opening sentence in the original question one can easily see

• OP is using a 4D algebra (bivector.net starts by default in 3DPGA)
• the bivector.net generator uses \mathbf e_{31} (easily verified)
• the OP wants to tweak the ‘float mvec[16]’ memory layout, i.e. the basis order.

The OP then goes on to make a suggestion on the form he would suspect the solution comes in.
Your post ignores the question, gives a useless remark about the suggested form and closes with a condescending remark about something the OP clearly already knows how to do. (as he suggested the alternative was to do it with pen and paper).

Anyway, I’m happy to help out, for free, no need for you to feel honored, if you have further reading problems.

Steven

Incorrect, the original post does not specify a desire to use a specific algebra, it mentions no algebra at all, and the way it’s written implies just general GA and nothing specific, so giving a generic answer is appropriate. The reader can substitute whatever specific algebra choice they want into my post, the principle is the same.

I am purposefully addressing the general concerns expressed in the question, my answer applies to any specific algebra, and you can choose whatever algebra you want and still do similar calculations.

You are the one misinterpreting this, tweaking the memory layout can also be interpreted as: skip allocation of the zero products by simplifying the algebraic expressions. This also tweaks memory layout, as it enables less allocations.

Original poster never made clear what they meant by memory layout or that they only desire a specific algebra, these were all left open ended and ambiguous.

Overall, the question was quite vague, and if the original author wanted something more specific they would make that explicitly clear.

Well, if you didn’t scare away the OP with your rude behavior, we’ll find out soon enough.

Thanks very much, it seems to fit my needs indeed.

I have another question related to distances between lines but I will open a new post about this to avoid mixing different subjects !

Both interpretation can be considered here indeed, I could have been clearer (english is not my native language so I’m a little less precise in English than in French indeed). Both points are interesting : to handle arbitrary basis permutation (what I want) and to automatically simplify the zero products with doing it manually (what I could want).

Great, maybe next time you won’t insult the personality of the free software developer offering inspiration.

Thankless people like you are the reason why I am so cold and unfriendly on the internet. I try to offer something useful to the world along with recommendations about understanding principles, and the responses I get are insults directed at my personality and authoritarian douche bags who want to threaten me because they think my response is irrelevant.

It proves to me that your character is not respectable, so I will take note of this and remember how @Xavier_OM insulted me for no reason for offering inspiration based on my free software which I sacrificed a lot for to create, just so that I can be insulted for sharing it.

Thanks for clarifying that you’re a douche bag. @Xavier_OM is the person who started with the irrelevant insults, maybe you should threaten that person to be banned instead. I didn’t derail the discussion and make it into an insult, that was @Xavier_OM and you, so you two are the disgusting despicable ones.

Personally, I don’t care if @Xavier_OM or @enki do get banned or not, but I just want to point out their hypocrisy and the fact that they attacked me first with irrelevant insults and didn’t bother to grasp how my post was related to the original request.

If you think your answers were a respectful and acceptable way to respond to someone then I can’t help you. Here you are the exact thing you denounce, someone condescending and a kind of authoritarian “douche bag” to use your own words.
You seem to consider you have nothing to blame yourself for so continue not to question yourself, you even feel insulted if we dare to criticize this behavior.

If everywhere you go smells like shit, maybe one day it’ll be time to check your own shoes.
Good day sir.

You are still complaining about the fact I emphasized to understand the geometric product and you consider that disrespectful, huh? I couldn’t care less whether you know the geometric product or not. Either way I would add that recommendation to my post because the world doesn’t revolve around you, there are other people who will read my post without understanding the geometric product.

The fact that you are upset about it demonstrates that you think the world revolves around you and you don’t care about anyone else uninformed reading this.

You could have just ignored it or agreed and said “yes, I agree that knowing the principles of the geometric product is important for this application, by the way I already know it but maybe others don’t.”

Ironically, my post was strictly about the ideas you requested to discuss (geometric product), while your response was only about criticising me and didn’t address the topic about geometric products.

Also, I don’t expect people to respect me, I couldn’t care less about your social validation. I only wanted to show people what’s possible and include disclaimers about knowing the underlying principles.

In conclusion, you seem to be a cry baby who is desperately trying to insult me because I included a disclaimer that understanding the principles of the geometric product will help people out. I don’t care about social validation from you, but I find it fascinating how much of a cry baby you are about this.

@chakravala was silenced for six months. We all have better things to do and I apologize to the readership for his immature attitude