0

Edit: To say more simply, there a are two parts. 1. I have a 2D plane existing inside of a 3D coordinate system. The 2D plane is defined by two 3D vertices. How do I then transform coordinates that lie on the 2D plane into 3D points and back again? 2. imagine the 2D plane has a 3rd defined by another 3D vertice perpendiculat to the 2D plane (ie stretch the 2D rectangle into a 3D rectangle) and then perform the trans.

I have coordinate system $X,Y,Z$ with points with known values $A,B,C,D,E,F$.

I also have an imagined point $G$ that I need to use to measure two angles (let's call them $\theta_1$ and $\theta_2$) from points $DBG$ and $CBG$.

The relationship of all 7 points to one another is known, including $G$. I shall propose a coordinate system $I,J,Z$ that holds the relationship of all points.

The rotation or location of the $I,J,Z$ coordinate system inside of $X,Y,Z$. It can only be determined using the known $X,Y,Z$ coordinates of the listed points and the known relationship of those points in $I,J,K$.

Please see the following illustration. https://i.stack.imgur.com/zo2lo.png

  1. How do I find the $X,Y,Z$ position of $G$?
  2. Is this the sensible approach to determine $\theta_1$ and $\theta_2$?
  3. Can this be done without points $E$ and $F$?
  4. What should I research and familiarize myself with so that I understand this problem?
  • Does http://math.stackexchange.com/a/804187/3301 help? – John Alexiou Aug 05 '15 at 05:10
  • $\theta_1$ and $\theta_2$ are orientation angles of C in a spherical coordinate system centered at B. Transform C into the ijk coordinate system and look up spherical to cartesian transformation and back. – John Alexiou Aug 05 '15 at 05:15
  • Hi @ja72 thanks for the input. I have spent the time to try and solve this using the above information, but I still seem to be failing. The quested/answer you linked is probably relevant but beyond my level of mathematics (I ask this as a programmer).

    spherical to Cartesian transformation looks like what I want, however I have yet yo figure out how to implement it. Would you be able to provide any further assistence?

    I have restated my question more simple http://stackoverflow.com/questions/31848706/how-to-perform-cartesian-transformation however you seem to have grasped it perfectly already

    – user1611172 Aug 06 '15 at 07:22
  • First things first. Look at my answer at http://stackoverflow.com/a/31858246/380384 and if you can follow then we can do the cartesian to spherical transformation also. – John Alexiou Aug 06 '15 at 14:22

1 Answers1

0

Q4: I think I'll answer question 4 first. The nice part here is that the relationship (direction and distance) between D and G is the same as the relationship between B and F (i.e. same direction, same magnitude, different start point). This means that using vectors is ideal - I would strongly recommend looking into vector arithmetic - you don't need too much, specifically you should learn basic operations (vector definition, vector addition), then dot product and angle between two vectors. As a mathematician and programmer myself, I'd recommend learning vectors even if you don't end up finding it useful here.

So, assuming you haven't looked up vectors, here are some answers to the earlier questions.

Q1: The point G is fully determined by D - B + F. The proof (using vectors) is as follows:

G -> OG = OD + DG = OD + BF = OD + BO + OF = OD - OB + OF -> D - B + F

Q2: I think that it is a sensible approach. I think it's algorithmically simple and I can't think of a simpler approach which will guarantee your understanding (although it is possible that a good spherical rotation algorithm might have more computational efficiency).

Q2b: I'm going to assume that you'd like an equation for this. To determine the angles θ1 and θ2, you can use the relationship cos(θ)=(a.b)/(|a||b|). Obviously that makes no sense if you don't know magnitudes and dot product, so I'll go for the easy explanation:

Let the coordinates of point B be (Bx, By, Bz); D = (Dx, Dy, Dz); F = (Fx, Fy, Fz) and G = (Gx, Gy, Gz) = (Dx-Bx+Fx, Dy-By+Fy, Dz-Bz+Fz) (as noted above).

Define new points M = (Mx, My, Mz) = (Dx-Bx, Dy-By, Dz-Bz) and N = (Nx, Ny, Nz) = (Gx-Bx, Gy-By, Gz-Bz) [note that from O to M is exactly the same distance and direction as from B to D, and similarly ON = BG].

The angle θ1 is defined by cos(θ1)=(OM.ON)/(|OM||ON|), or more specifically:

cos(θ1)=[Mx.Nx+My.Ny+Mz.Nz]/[sqrt(Mx^2+My^2+Mz^2).sqrt(Nx^2+Ny^2+Nz^2)]

The angle θ2 can be similarly defined with the point P = (Px, Py, Pz) = (Cx-Bx, Cy-By, Cz-Bz) and then swapping θ1 with θ2 and M with P in the equation above.

Q3: Yes, but it takes a little bit more knowledge, specifically the topic of vector resolutes. I don't want to answer it here because I think that you'd probably want to solve the first part before you go for the second part. The short answer is that it's (the vector resolute of BC in the direction of BD) plus (the vector resolute of BC in the direction of BF).

Good luck, I hope this helps!

Andrew
  • 1
  • Hi @Andrew thank you for your answer. I am in the process of digesting it. A quick comment/question. Does your answer presume that D.j = G.j and F.i = G.i? This would not be a correct assumption in my problem. Sorry if I drew my diagram incorrectly. – user1611172 Aug 10 '15 at 06:15