On Sunday 10 Jan 2010 03:31:42 Waldek Hebisch wrote:
> Martin Baker wrote:
> > I have put a rewritten version of CliffordAlgebra here:
> >
> > http://github.com/martinbaker/multivector/
> >
> > Would you consider putting this into FriCAS?
> >
> > This works with a non-orthogonal basis unlike the existing code which
> > gives incorrect results.
> 
> Yes, we certainly want handle non-orthogonal basis.  I had no time
> to look deeper, but AFAICS there are at least small problems to fix:
> 
> 1) Description: the formula e[i]*e[j] = -e[j]*e[i] is valid only
>    for orthogonal basis.  General rule for symmetric forms is
>    u^2 = Q(u).  I am not sure about non-symmetric case.

Yes this is a comment remaining from the old version, I will change this.

> 2) Comment 'eFromBinaryMap(n) sets the appropriate unit elements' is
>   misleading.  From code it is clear that it produces corresponding
>   element of basis, but 'unit element' in a ring typically means
>   something quite different.  And formulas in the comment look
>   wrong in non-orthogonal case.

Perhaps I should say it produces corresponding element of _Grassmann_ basis. 
You can see that the /\ multiplication has been added for the exterior product 
(along with the various inner products). So both Grassmann and Clifford 
multiplication are supported. The 'multivectors' are stored using the 
Grassmann basis as before.

> Also, it would be good to compare speed of current code and your
> version.  Orthogonal case is doing much simpler computation, so
> it may be faster.  If that is the case then it makes sense to
> keep current code (renamed) and implement a switch so that
> non-orthogonal case is done by your code but orthognal one
> by old.  Of course, if there is no significant difference in
> speed (or your is faster) then we will just replace old version.

the variable 'orthogonal' is set when the domain is created:
orthogonal:Boolean :=  diagonal?(bLin)
The Clifford multiplication tests this and if true it uses a version that is 
similar to the previous code. So there should not be a big performance drop. 
It may be slightly slower because the old code returned the results to a 
global variable 'z'. I had to change this in the non-orthogonal case to return 
the result at the end of the function, in the usual way, to allow it to be 
recursive and I changed it in the orthogonal case also for compatibility and 
because using global variables in this way seems a bit messy. Do you prefer 
things to be optimised for speed or more maintainable code? I guess this is 
something to keep in mind for anyone who want to use this to build a realtime 
raytracing program.

> BTW: At the URL you gave I can view code, but it inside HTML
> markup.  How I can fetch the source?  Given that it is github
> I guess 'git....' but what I should put in place of dots?

I am new to github (I used it because Ralf suggested it) so I don't really 
know how to use it but it seems to work for me. I go to
http://github.com/martinbaker/multivector/
then click on:
clifford.spad.pamphlet
under multivector / section of the page. This shows the text of the pamphlet 
file.  Can anyone else see it? I would welcome any advise if there is a better 
way to use github?

Martin
-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/fricas-devel?hl=en.


Reply via email to