Ordering of basis vectors?

This would be most compatible with other complement maps discussed here if the r degenerate bases appeared exclusively at (either) the beginning or end of your (p+q+r)pseudoscalar, no? If they are in the middle you could get some swapping which would change the polarity.

1 Like

@Orbots actually, as I have explained previously, I don’t recommend working with degenerate metrics because it introduces these type of issues. Instead, if you used a first order symmetric basis as I discussed in other threads, then there would be no concern about the ordering of that index, since it is not anti-symmetric. However, for some reason people in this community insist in making the extra basis element anti-symmetric as a Grassmann element, but with degenerate metric. An alternative would be to recognize the additional foruth basis element as a symmetric basis instead (it commutes), as I have discussed before. This is also e.g. more consistent with first order Taylor expansion as I wrote in my paper.

For those of us unable to read your paper. I think this is what you mean by:

julia> basis"-+++"
(⟨-+++⟩, v, v₁, vβ‚‚, v₃, vβ‚„, v₁₂, v₁₃, v₁₄, v₂₃, vβ‚‚β‚„, v₃₄, v₁₂₃, v₁₂₄, v₁₃₄, v₂₃₄, v₁₂₃₄)

julia> e0 = (1v1+1v2)/2
0.5v₁ + 0.5vβ‚‚ + 0.0v₃ + 0.0vβ‚„

julia> e0*e0

0.0v⃖

Is this correct? You use two of your basis vectors with metric - and + to make e_0 which effectively has a metric of 0.

Actually this doesn’t seem to be what you are talking about: [quote=β€œchakravala, post:42, topic:128”]
it commutes
[/quote]

julia> 1v2*e0
0.5 - 0.5v₁₂

julia> e0*1v2
0.5 + 0.5v₁₂

I’ve had to go through this process recently so here’s a little example I translated from my lib to Grassmann.jl, since Julia is my language of choice.

As described above in the excellent posts by @ninepoints, we want the map to be an involution J^2 = id. Also J(x) should β€œfill in the holes” of J(x)*I.

Grassmann has something like the reciprocal basis I described above. You can switch back and forth using the ' operator.

Here’s the J map for PGA(3)

using Grassmann

# specify PGA(3) metric with eβ‚„ as the degenerate metric
basis"+++0" 

# J map
dual(x) = (x'*SubManifold(V'))'

# put unit basis blades into list
E = (1v1,1v2,1v3,1v4,1v12,1v13,1v14,1v23,1v24,1v34,1v234,1v134,1v124,1v123,1v1234)

# test the J map to see it's an involution. 
zip(E, dual.(E), (dual∘dual).(E)) |> collect
# result: ( original blade, dual(blade), dual(dual(blade)) )
 (1v₁, -1v₂₃₄, 1v₁)  
 (1vβ‚‚, 1v₁₃₄, 1vβ‚‚)   
 (1v₃, -1v₁₂₄, 1v₃)  
 (1vβ‚„, 1v₁₂₃, 1vβ‚„)   
 (1v₁₂, -1v₃₄, 1v₁₂) 
 (1v₁₃, 1vβ‚‚β‚„, 1v₁₃)  
 (1v₁₄, -1v₂₃, 1v₁₄) 
 (1v₂₃, -1v₁₄, 1v₂₃) 
 (1vβ‚‚β‚„, 1v₁₃, 1vβ‚‚β‚„)  
 (1v₃₄, -1v₁₂, 1v₃₄) 
 (1v₂₃₄, -1v₁, 1v₂₃₄)
 (1v₁₃₄, 1vβ‚‚, 1v₁₃₄) 
 (1v₁₂₄, -1v₃, 1v₁₂₄)
 (1v₁₂₃, 1vβ‚„, 1v₁₂₃) 
 (1v₁₂₃₄, 1v, 1v₁₂₃₄)

# now we use this map above build our objects in dual space with correct signs
# e.g. entry for v234 is -, so we use -x*1v234
point(x, y, z, w=1) = -x*1v234 + y*1v134 - z*1v124 + w*1v123

p = point(-1.0,2.0,3.0)
1.0v₁₂₃ - 3.0v₁₂₄ + 2.0v₁₃₄ + 1.0v₂₃₄

# signs for coordinates in standard space are what you would expect.
dual(p)
0.0 - 1.0v₁ + 2.0vβ‚‚ + 3.0v₃ + 1.0vβ‚„

I’ve done a few things differently here. These are design choices, not β€œcorrect” or β€œincorrect” math. Again, just my personal preference, not the right way to do things, nor the wrong way. Maybe a little opinionated.

First, I wanted the homogeneous coordinate in the familiar w component of a coordinate vector. Yes, I care about coordinates, that’s what computers work with.
Second, we don’t really care for cyclical ordering, our implementation and cognitive load prefer sorted.
Third, I wanted coordinates in the standard space to be easily read-off without any mental sign flips. The suggestion to view points as an intersection of 3 planes in dual space is unintuitive… who triangulates positions when you can just not?
Fourth we want a simple way to figure out when/where signs flip.

You can see we’ve achieved our first three goals with basis"+++0", dual and point.

Last goal is achieved by looking at the map I created above. Or better yet, take the tetrahedron from @ninepoints post and add signs.
Consistently orient edges from lower index to higher index.
Add a little + or - by vertices that end up with a + or - from our map.
Edge signs are simply the parity of the two verts on that edge. ie. sign(edge12) is sign(vertex1)*sign(vertex2)
Face signs are the same as the opposing vertex.
Make the origin the homogeneous coord, so your e1,e2,e3 basis visually match x,y,z axis.
I’d draw a picture, but my programmer art is probably worse than no art.

Hope this helps.

@Orbots, there are several aspects of (specifically) my library that you are misunderstanding in your last 2 posts, I’ll respond later when I get around to it!

@chakravala my intention was to show how to easily create a grade reversing involution ( J, the duality map ) with the same metric signature used in popular PGA literature using a Geometric Algebra library not designed specifically for PGA.

If I got something wrong let me know.

I’m new here, and newbie, and had the same question.

I have read the initial chapters of Brown’s amazing book a long time ago, so I’m going to apply that reasoning to try to explain why

1, e0, e1, e2, e3, e01, e02, e03, e12, e31, e23, e021, e013, e032. e123, e0123

are picked as the basis elements

Each basis element is picked in such a way that Grassmann’s β€œErgΓ€nzung” aka β€œcomplement” in Browns book of that element is again a basis element.

The elements are picked in such a way so that:

  • the complement of the scalar 1 is the pseudo-scalar e₀₁₂₃
  • the complement of the origin e₁₂₃ is the ideal plane eβ‚€
  • the complement of the β€˜YZ’ plane e₁ is the β€˜X’ direction e₀₃₂
  • the complement of the β€˜ZX’ plane eβ‚‚ is the β€˜Y’ direction e₀₁₃
  • the complement of the β€˜XY’ plane e₃ is the β€˜Z’ direction e₀₂₁
  • the complement of the β€˜Z’ axis e₁₂ is the ideal line e₀₃ (ideal line in the β€˜XY’ plane)
    etc

If I recall correctly, the complement C(E) of any element E is defined in such a way that

E ∧ C(E) = I

In PGA, this would be

E ∧ C(E) = e₀₁₂₃

where

e₀₁₂₃ = eβ‚€ ∧ e₁ ∧ eβ‚‚ ∧ e₃

And remember ∧ is anti-commutative, so

eᡒⱼ = eᡒ ∧ eⱼ = -eⱼ ∧ eᡒ = -eⱼᡒ

So the complement of each basis element is (I’ll only flip one pair at the time)

C(1) = e₀₁₂₃ because 1 ∧ e₀₁₂₃ = e₀₁₂₃
C(eβ‚€) = e₁₂₃ because eβ‚€ ∧ e₁₂₃ = e₀₁₂₃
C(e₁) = e₀₃₂ because e₁ ∧ e₀₃₂ = e₁₀₃₂ = -e₀₁₃₂ = e₀₁₂₃
C(eβ‚‚) = e₀₁₃ because eβ‚‚ ∧ e₀₁₃ = e₂₀₁₃ = -e₀₂₁₃ = e₀₁₂₃
C(e₃) = e₀₂₁ because e₃ ∧ e₀₂₁ = e₃₀₂₁ = -e₀₃₂₁ = e₀₂₃₁ = -e₀₂₁₃ = e₀₁₂₃
C(e₀₁) = e₂₃ because e₀₁ ∧ e₂₃ = e₀₁₂₃
C(eβ‚€β‚‚) = e₃₁ because eβ‚€β‚‚ ∧ e₃₁ = e₀₂₃₁ = -e₀₃₂₁ = e₀₃₁₂ = -e₀₁₃₂ = e₀₁₂₃
C(e₀₃) = e₁₂ because e₀₃ ∧ e₁₂ = e₀₃₁₂ = -e₀₁₃₂ = e₀₁₂₃
C(e₁₂) = e₀₃ because e₁₂ ∧ e₀₃ = e₁₂₀₃ = -e₁₀₂₃ = e₀₁₂₃

etc…

Because we happen to have 4 basis 1-elements in 3D PGA, an even number, the complement of the complement is again the complement, so that works out nicely. If the number of basis 1-elements is odd, the complement of the complement would have a sign flip.

I haven’t read any of the threads here, and I’m new to PGA, so this might be completely wrong :wink:

I’m currently trying to port Klein to C#, so I’m trying to get a better understanding.