SFRPG

The forum for Science Fiction Role Playing Game inspiration and information! So Say We All!
It is currently Mon Apr 23, 2018 1:49 am

All times are UTC




Post new topic  Reply to topic  [ 14 posts ]  Go to page Previous 1 2
Author Message
PostPosted: Mon Apr 17, 2017 7:43 pm 
Offline
User avatar

Joined: Mon Dec 02, 2013 1:43 pm
Posts: 300
Location: Queens, NY
Am I reading the formula above correctly?

In excel (c = x, d = y, e = z)

x eq =(0.58074*C3)+(0.81792*D3)+(-0.72362*E3)
y eq =(-1.44633*C3)+(-0.73681*D3)+(-0.32781*E3)
z eq =(0.47736*C3)+(1.23662*D3)+(0.67377*E3)

I think I must have erred somewhere as that puts proxima centauri only 3.22 ly away.


Top
   
PostPosted: Tue Apr 18, 2017 12:50 am 
Offline
User avatar

Joined: Sun Jul 06, 2008 1:04 pm
Posts: 1051
Location: the Retirement Coast, NSW, Australia
Let's check.

Project Rho gives

Xg = -(0.0550*X) -(0.8732*Y) - (0.4839*Z)

Yg = (0.4940*X) - (0.4449*Y) + (0.7470*Z)

Zg = -(0.8677*X) - (0.1979*Y) + (0.4560*Z)

And in matrix form that's
Code:
⎡X[sub]g[/sub]⎤   ⎡ -0.0550 , -0.8732 , -0.4839 ⎤⎡X⎤
⎢Y[sub]g[/sub]⎥ = ⎢  0.4940 , -0.4449 ,  0.7470 ⎥⎢Y⎥
⎣Z[sub]g[/sub]⎦   ⎣ -0.8677 , -0.1979 ,  0.4560 ⎦⎣Z⎦
*

(We curse Nyrath under our breath for using capital X, Y, and Z instead of lowercase, because ordinates are conventionallly lowercase and a position vector is conventionally X. We decide to use A for the position vector to avoid confusion.)

If

Ag = R A

Then we can premultiply both sides by R-1

R-1 Ag = R-1R A

R-1R is the appropriate-dimensioned identity matrix I3 by definition, so

R-1 Ag = A

i.e.

A = R-1 Ag

Right?

So we plug

Code:
⎡ -0.0550 , -0.8732 , -0.4839 ⎤
⎢  0.4940 , -0.4449 ,  0.7470 ⎥
⎣ -0.8677 , -0.1979 ,  0.4560 ⎦


into the matrix inverter at http://matrix.reshish.com/inverse.php, check the input (especially signs), press "calculate" and get

Code:
-0.05505281429661579   0.4940301836677352   -0.8677206228901982
-0.8735900485746186   -0.4450385588930613   -0.19799653730732772
-0.48388771398704145   0.7469229376393793    0.4559107473356467


And then we get very suspicious because that looks a lot more like RT than we expected. Is the inverse of a rotation matrix its transpose? Could be. Try another matrix inverter. Here's one: http://ncalculators.com/matrix/inverse-matrix.htm

Type the original rotation matrix R into that and press "calculate", get:

Code:
-0.0548 , 0.4939 , -0.8683
-0.8742 , -0.4449 , -0.1979
-0.4838 , 0.7468 , 0.4558


There is an explanation that this gadget is using an analytical solution for 3×3 matrices in which it calculates a matrix called the "adjoint" and then divides by the determinant of the original matrix as explained in Wikipedia. (I'm not familiar with these analytical special cases: I was taught matrix algebra by statisticians.) Now, the determinant for a rotation matrix ought to be 1 or -1 exactly, and it gets something damned close. The thing it calls the Adjoint (which I haven't heard of) looks very close to the transpose, but perhaps that's correct for a rotation matrix.

Okay, so we do a web search on "rotation matrix tranpose inverse" and discover that yes indeed, the inverse of any rotation matrix is simply its own transpose. If we had known that at the beginning we could have saved a lot of trouble. We have learned something, but we feel rather stupid. In our own defence, we are an economist, and economists are calculus guys, not algebraic geometry guys.

<sigh>

Okay, so our original transformation was

Code:
⎡X[sub]g[/sub]⎤   ⎡ -0.0550 , -0.8732 , -0.4839 ⎤⎡X⎤
⎢Y[sub]g[/sub]⎥ = ⎢  0.4940 , -0.4449 ,  0.7470 ⎥⎢Y⎥
⎣Z[sub]g[/sub]⎦   ⎣ -0.8677 , -0.1979 ,  0.4560 ⎦⎣Z⎦


and because it is a rotation its inverse is
Code:
⎡X⎤   ⎡-0.0550 ,  0.4940 , -0.8677 ⎤⎡X[sub]g[/sub]⎤
⎢Y⎥ = ⎢-0.8732 , -0.4449 , -0.1979 ⎥⎢Y[sub]g[/sub]⎥
⎣Z⎦   ⎣-0.4839 ,  0.7470 ,  0.4560 ⎦⎣Z[sub]g[/sub]⎦


Spreading that out into a trio of separate equations for the co-ordinates individually

X = -0.0550 Xg + 0.4940 Yg + -0.8677 Zg
Y = -0.8732 Xg + -0.4449 Yg + -0.1979 Zg
Z = -0.4839 Xg + 0.7470 Yg + 0.4560 Z g

Is that what I had before? No, it isn't. The most likely explanation is that I made a typing error entering the co-efficients of the matrix into the on-line matrix inversion tool.

__________________________________________

* Given what "code" tags do to formatting, it would be nice to have a monospace font to do this sort of thing with.

_________________
— Brett Evill

My SFRPG setting, Flat Black

© My posts on SFRPG must not be reproduced beyond the board except with explicit permission from me.


Top
   
PostPosted: Tue Apr 18, 2017 4:40 pm 
Offline
User avatar

Joined: Mon Dec 02, 2013 1:43 pm
Posts: 300
Location: Queens, NY
That does the trick! Especially when I correctly type 0.8732 and not 0.8372.

Thanks for all the help.


Top
   
PostPosted: Tue Apr 18, 2017 11:23 pm 
Offline
User avatar

Joined: Sun Jul 06, 2008 1:04 pm
Posts: 1051
Location: the Retirement Coast, NSW, Australia
No worries. I'm only sorry that I gave you a bum steer at the beginning.

_________________
— Brett Evill

My SFRPG setting, Flat Black

© My posts on SFRPG must not be reproduced beyond the board except with explicit permission from me.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 14 posts ]  Go to page Previous 1 2

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Limited