Three points in space are given by A = ( 5 , 6 , 1 0 ) , B = ( 5 , 1 8 , 2 6 ) , C = ( − 1 6 , 6 , 1 0 ) . You want to shift these points by the same vector d , then rotate the resulting points (after the shift) about a certain axis that passes through the origin by a certain angle, such that the final images of the three points are A ′ = ( 1 , 1 , 0 ) , B ′ = ( 1 , − 1 9 , 0 ) , C ′ = ( 2 2 , 1 , 0 ) .
If the vector d = ( d x , d y , d z ) , find the sum ( d x + d y + d z ) .
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
This is really an outstanding solution. However, I wonder how you managed to solve the three quadratic equations in the three unknowns?
Log in to reply
Thank you! I subtracted the third equation from the first equation to get ( − 1 6 + d x ) 2 − ( 5 + d x ) 2 = 4 8 3 , which solved to d x = − 6 . Then the first two equations become ( 6 + d y ) 2 + ( 1 0 + d z ) 2 = 1 and ( 1 8 + d y ) 2 + ( 2 6 + d z ) 2 = 3 6 1 . Solving for d y on the first equation gives d y = − 6 ± 1 − ( 1 0 + d z ) 2 , and substituting this in the second equation gives ( 1 8 + − 6 ± 1 − ( 1 0 + d z ) 2 ) 2 + ( 2 6 + d z ) 2 = 3 6 1 , which simplifies to 2 5 d z 2 + 5 4 0 d z + 2 9 1 6 = 0 , which has one repeated root d z = − 5 5 4 . Substituting d x = − 6 and d z = − 5 5 4 into the first equation gives ( 6 + d y ) 2 = 2 5 9 and into the second equation gives ( 1 8 + d y ) 2 = 2 5 3 2 4 9 . Subtracting these equations and solving gives d y = − 5 3 3 . Therefore, ( d x , d y , d z ) = ( − 6 , − 5 3 3 , − 5 5 4 ) .
Let R be the rotation matrix. The following relations are described in the problem statement:
R ( A + d ) = A ′ R ( B + d ) = B ′ R ( C + d ) = C ′
The rotation matrix is defined by an axis and an angle. Let the axis coincide with the unit vector whose components are:
u x = cos θ sin ϕ u y = sin θ sin ϕ u z = cos ϕ
Let α be the rotation angle about the axis. The rotation matrix is defined as per the description at the Wikipedia page in the section "Rotation matrix from axis and angle". The equations are also given in the code below.
It is evident from the first set of equations that the rotation matrix effectively determines the d vector.
d = R − 1 A ′ − A
I used the following process in conjunction with a hill-climbing algorithm:
1)
Move around randomly in
(
θ
,
ϕ
,
α
)
space via mutation
2)
For each
(
θ
,
ϕ
,
α
)
, form a candidate rotation matrix
R
3)
From the candidate rotation matrix and the other information, calculate
d
=
R
−
1
A
′
−
A
4)
Form a residual quantity.
residual
=
∣
R
(
B
+
d
)
−
B
′
∣
+
∣
R
(
C
+
d
)
−
C
′
∣
5)
If the most recent mutation results in the smallest residual thus far seen, store the mutated values. Otherwise, reject them
6)
This process results in
(
d
x
,
d
y
,
d
z
)
=
(
−
6
.
0
,
−
6
.
6
,
−
1
0
.
8
)
Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 |
|
I think this an unnecessary complication of a simple problem. Please see my solution.
The images of A , B , C after the shift and rotation are given by, A ′ = R ( A + d ) , B ′ = R ( B + d ) , C ′ = R ( C + d ) , where d is the shift vector and R is the rotation matrix. Substracting the first from the second, and the first from the third, results in:
[ B ′ − A ′ C ′ − A ′ ] = R [ B − A C − A ]
To determine R we need a third vector on either side of the equation, and for that we can use the cross product, so the equation becomes:
[ B ′ − A ′ C ′ − A ′ ( B ′ − A ′ ) × ( C ′ − A ′ ) ] = R [ B − A C − A ( B − A ) × ( C − A ) ]
And this is of the form, U = R V , so we can determine R by matrix inversion then multiplication, namely, R = U V − 1 .
Now that R is determined, we use any of the first three equations, to determine the vector d . For example, since A ′ = R ( A + d ) , it follows that d = − A + R T A ′ .
Carrying out the aforementioned operations, results in d = [ − 6 , − 6 . 6 , − 1 0 . 8 ] T ; therefore, ( d x + d y + d z ) = − 2 3 . 4 .
Problem Loading...
Note Loading...
Set Loading...
Since rotating the resulting points (after the shift) about a certain axis that passes through the origin results in A ′ , B ′ , and C ′ , the new points after the shift must be the same distance away from the origin as A ′ , B ′ , and C ′ , so:
( 5 + d x ) 2 + ( 6 + d y ) 2 + ( 1 0 + d z ) 2 = 1 2 + 1 2 + 0 2
( 5 + d x ) 2 + ( 1 8 + d y ) 2 + ( 2 6 + d z ) 2 = 1 2 + ( − 1 9 ) 2 + 0 2
( − 1 6 + d x ) 2 + ( 6 + d y ) 2 + ( 1 0 + d z ) 2 = 2 2 2 + 1 2 + 0 2
which solves to ( d x , d y , d z ) = ( − 6 , − 5 3 3 , − 5 5 4 ) , so d x + d y + d z = − 5 1 1 7 = − 2 3 . 4 .