Reconstructing a Motor

In section 6.8 of Dorst’s Guided Tour to PGA in step 2 eq(94) we have a motor that moves a line into another where lines have an intersection point. My example below gets a motor which moves line AB into AB1 but I don’t get the second point B1 from B with this motor.

A=ga.PGAPnt(1,2,3)
B=ga.PGAPnt(4,5,6)
B1=ga.PGAPnt(6,5,8)

AB=B&A #line AB
AB1=B1&A #line AB1

M=ga.MotorAtoB(AB,AB1)
print(“M=”,M)
print(“M * ~M=”, M * ~M) #checking
print("----------------------------------------------------------------------------------------")

print(“AB1=”,AB1.normalized())
print(“M * AB * ~M =”,(M * AB * ~M).normalized())

print(“B1=”,B1)
print(“M * B * ~M =”,M * B * ~M)

=============== output ====================

M= 0.9942685 + 0.1511958e01 + -0.3023916e02 + 0.1511958e03 + 0.0755979e12 + -0.0755979e23
M * ~M= 1

AB1= 0.1301889e01 + 1.3018891e02 + -0.9113224e03 + 0.6509446e12 + 0.3905667e31 + 0.6509446e23
M * AB * ~M = 0.1301889e01 + 1.3018891e02 + -0.9113224e03 + 0.6509446e12 + 0.3905667e31 + 0.6509446e23
B1= 8e021 + 5e013 + 6e032 + 1e123
M * B * ~M = 6.3824071e021 + 4.0294443e013 + 4.3824071e032 + 1e123

Hi @fractal97,

It seems the distance \lvert A,B_1\rvert and \lvert A, B\rvert are not the same, so you should not expect the motor (which is one that rotates around A) to take point B_1 to B.

Two motors are visualized above. The green one (M) is the one you have. It takes one line to the other by rotating around their intersection point.

The pink one (M2) is the motor that takes the point to the point, and the line to the line.

  var A = !(1e0 + 1e1 + 2e2 + 3e3);
  var B = !(1e0 + 4e1 + 5e2 + 6e3);
  var B1= !(1e0 + 6e1 + 5e2 + 8e3);
  
  var AB  = (B & A).Normalized;
  var AB1 = (B1 & A).Normalized;
  
  // This motor takes line to line
  var M = (1+AB1/AB).Normalized;
  
  // This motor takes line to line and point to point.
  var M_pp = (1 + B1/B).Normalized;
  var M2   = (1 + AB1/(M_pp>>>AB)).Normalized*M_pp;

Play around with it here : https://enkimute.github.io/ganja.js/examples/coffeeshop.html#-1kBrKM2W

Cheers,

Steven.

Thanks for your quick reply. In the proof after eq(94) Dorst says the motor V_B leaves A’ invariant and rotates B_A into B’. I tried to do that, but, as you pointed out the motor M only rotates around intersection point A onto the line AB1, but it doesn’t move B1 to B while it leaves A invariant. So, I cannot get what is claimed in section 6.8 . Your M2 moves B1 to B, but it doesn’t leave A invariant (intersection point moves on the pink line). So, what is needed is the motor that in effect rotates line segment AB around A and stretches it at the same time so that point B moves into B1.

I don’t understand M_pp>>>AB in your motor. What geometric algebra operation is that?

That is shorthand for applying the motor.

The text talks about a motor that sends B to B1 exactly. Since all motors of PGA are rigid body motions, that means that the distance AB and AB1 should be the same. So you have applied it to an example that is incorrect, you could not have made B1 by an RBM. But I think I should clarify this in the text, you had me baffled for a moment. If you want the transformation you specified, you should use CGA: conformal motions can do this with their versors.

Hi @fractal97

The setup (right under section 6.8) states:

Let us assume that we have three normalized labeled points A, B, C (not on a line), and that we know where an exact motor sends each of them, to A', B', C', with the same weights

this specifically requires A,B,C and A',B',C' to be congruent, that is with the following requirement on the distances:

\lvert AB \rvert = \lvert A'B' \rvert
\lvert BC \rvert = \lvert B'C' \rvert
\lvert CA \rvert = \lvert C'A' \rvert

This was not the case in your example, and hence no isometry (distance-preserving map) exists between the points you had. Notice however that it is still possible to find the motor that:

  • aligns the first point A to A'

(i.e. you translate the point cloud as a whole, until one point corresponds)

  • compose that with a motor that aligns the line AB to A'B'

(i.e. you rotate around the point from the previous step until that first line AB corresponds to A'B'. If additionally the distance \lvert AB \rvert = \lvert A'B' \rvert this will also align point B to B'.

  • compose that with a motor that aligns the plane ABC to A'B'C'

(i.e. you rotate around the line from the previous step until the plane ABC coincides with A'B'C'. Again if the distance requirement from above is met, this will also align C to C'.

This technique is not just very geometric, it is also substantially more flexible as with the exception of A and A' all other points can be any mix of euclidean and infinite (ideal) points. I made a little writeup that aims to demonstrate that versatility:

(those graphs are all interactive).

Cheers,

Steven.

1 Like

Thank you for clearing up my confusion. The sentence you cited did not ring a bell to me that it should mean that the points belong to the rigid body. I am an engineer, so, unless I see “rigid body” I don’t know what it means. I suppose “with the same weights” should mean that there is a constraint on relative distances of the points, but my training doesn’t have that. Also, I didn’t know that motors of PGA must be rigid body motions. Thanks again. My implementation reconstructing a motor from rigid body motion given starting and final position of 3 points works now.

Great to hear you got things working.

Each of these geometric algebras has a set of versors (=products of invertible vectors) with close connection to a transformation group, so one mindset gives you access to

  • \mathbb R_{2}^+ : isomorphic to complex numbers. (2D VGA) (rotations)
  • \mathbb R_{3}^+ : isomorphic to the quaternions. (3D VGA) (rotations)
  • \mathbb R_{3,0,1}^+ : isomorphic to the dual quaternions. (3D PGA) (rotations + translations)
  • \mathbb R_{4,1}^+ : conformal transformations. (3D CGA) (rotations + translations + scaling)

In each case these representations are the most efficient way to handle that type of transformations, and all of them give you access to the associated (linear) Lie algebra. (i.e. where you can interpolate transformations).

Hope you’re enjoying GA so far! :smiley:

Steven.