1

2D problem: I measure the position of the 3 ends of a triangle in a cartesian system. Now i move the system (triangle) to another cartesian system and measure the position of just two ends. How can I identify the location of the 3rd end based on this data?

thanks! (and sorry for the bad english as a second angle)

user1118321
  • 25,567
  • 4
  • 55
  • 86
Jon
  • 13
  • 3
  • Several assumptions need to be made. First, we must assume that you know to which two of the old vertices of the triangle the new vertices correspond. This allows us to get a "scaling factor." Next, we must assume the transformation is, in a sense, orthogonal with determinant 1, otherwise we also have the possibility of a reflection. I don't have the time and energy to work it out right now, but I think these facts are important. – TNi Jul 09 '10 at 22:39

2 Answers2

2

This question is from 8 years ago, but even though it is a little vague, I think it could be answered fairly concisely, and if I have come across it then maybe someone else will come across it and gain some benefit from an actual real answer rather than the one which was accepted. (I apologize for accidentally upvoting the accepted "answer". I had originally downvoted it, but realized that the question was actually a bit vague and tried to reverse my downvote. Sadly, because of my noob rep, that seems to have translated into an actual upvote. It didn't deserve the downvote, but it didn't deserve an upvote, either.)

Lead-Up

So, lets say you have a simple cartesian grid, or reference frame:

A 10x10 cartesian reference frame

And within that 10x10 reference frame you have a triangle object:

A isosceles triangle in a cartesian reference frame with one point at origin

I failed to lable the images, but the (a, b, c) co-ordinates of this triangle are obviously a=(0,0), b=(0,4), and c=(4,0).

Now let's say that we move that triangle within our cartesian reference frame (grid):

Triangle object translated from origin on a cartesian grid

We've moved the triangle x=x+1 and y=y+1, therefore, given that the new co-ordinates of "b" and "c" are b=(1,5) and c=(5,1), what is "a"?

It's pretty obvious that "a" would be (1,1), but looking at the math we can see that

Δb=b2-b1

Δb=(x2,y2)-(x1,y1)

Δb=(1,5)-(0,4)

Δb=(1-0, 5-4)

∴Δb=(1,1) or (+1,+1)

If we do the same for the two "c" co-ordinates we arrive at the same answer, Δc also equals (1,1), therefore it's a translation (a linear movement) and not a rotation, which means that Δa is also (1,1)! So:

a2=a1+Δa

a2=(0,0)+(+1,+1)

a2=(0+1,0+1)∴

∴a2=(1,1)

And if you take a look at the image you can clearly see that the new position of "a" is at (1,1).

Translation

But that's just the lead-up. Your question was in converting from one cartesian reference frame to another. Consider that your 10x10 reference frame is within a larger reference frame:

A "local" cartesian reference frame within a "global" cartesian reference frame

We can call your 10x10 grid a "local" reference frame, and it exists within maybe a "global" reference frame. There may actually be a number of other "local" reference frames within this global reference frame:

Multiple "local" cartesian reference frames within a "global" cartesian reference frame

But to keep it simple, of course we're going to just consider one cartesian reference frame within another:

A "local" cartesian reference frame within a "global" cartesian reference frame

Now we need to translate that "local" reference frame within the "global" reference frame:

A "local" cartesian reference frame translated within a "global" cartesian reference frame

So, "locally", the (a,b,c) co-ordinates of our triangle are still {(0,0),(0,4),(4,0)}, but the origin of our local reference frame is not aligned with the origin of the global reference frame! Our local reference frame has shifted (+3.5,+1.5)!

Now what's the position of our triangle?!

You basically approach it the same way. The relative position of our "local" reference frame is (+3.5,+1.5), which we will call Δf for difference in frames, therefore the triangle relative to the global origin will be ag=al+Δf, bg=bl+Δf, and cg=cl+Δf, where (ag,bg,cg) are the co-ordinates within the global reference frame and (al,bl,cl) are co-ordinates within the local reference frame.

Three-Dimensional Cartesian System

It's exactly the same, you just include the third "z" co-ordinate to the position of the triangle.

Rotation

One of the assumptions I'm making from your original question is that you were actually asking about translation and were not interested in rotation at the time that you asked this question 8 years ago.

Very quickly, however, you need to use trig in order to rotate your 2d object within your reference frame, so you need to first determine from where you're rotating your object, which we call a rotational axis. Then, once you decide where the rotational axis is, recalculate the (x,y) for each of the three points in your triangle:

x = r · cos θ

y = r · sin θ

where θ is the angle at which we're rotating the object, "r" is the distance of that point from the axis of rotation, and "·" just means multiplication.

So, if we were to rotate our triangle 30° counter clockwise around piont "a" it may look similar to this:

An isosceles triangle rotated 30° counter clockwise within a cartesian reference frame

But, again, that wasn't your question. Your questions was, "given the locations of two of the points, determine the position of the third".

Without any explanation whatsoever, only because I don't think you were asking about rotation, what you do is you work backwards:

if x = r · cos θ, then θ = arccos(x/r)

Now you have the angle of rotation which you can now apply to the original position of the missing point to find its (x,y) and, as with our original translational example, also works from one cartesian reference frame to another. Meaning, that if your "local" reference frame rotates within the global reference frame, even though it appears that nothing has changed within your local frame, you can plot the locations of the points of your objects within the global frame.

And, again, that also works for 3D reference frames, as well.

And finally, if your cartesian local reference frame is both translated and rotated, which it almost certainly is, then you would apply both methods to plot your points onto the other (global?) cartesian reference frame.

Real-World Application

Oh, so many! Our brains do this so intuitively every day when we're driving or walking down the street that I don't know where to begin!

Translation is easy, but rotation gets a little hairy when crossing axes. One trick to make things easier is to translate the object from one frame of reference to another in order to make the trig more straight-forward.

Telling the story in pictures:

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

And that's just the start...

I hope that helps.

Ian Moote
  • 851
  • 8
  • 15
1

This is a pretty vague question, but if I'm reading it right, then you need even less information than that. If you have the transformation of the first coordinate system to the second, then apply that to each of the three points to find each of the 3 equivalent points.

Otherwise, if you don't have the transformation, I would think it's impossible. After all, an infinite number of possible transformations of a coordinate system can result in the same two locations of two points yet different locations of the third.

eruciform
  • 7,680
  • 1
  • 35
  • 47
  • To try to clarify the problem, the way i see it could be solved is as follows. Since i do not have the transformation from the first to the second coordinate system i am to use the coordinates of the two points to actually determine the transfomration. Once i have it i can find the position of the third point. I am not sure how to put this into equations though - its been a while since I atttended the analytical geometry class... – Jon Jul 12 '10 at 15:41
  • I don't think it's possible in the general case unless you know something about the general nature of the transformation. If you know it's a linear translation, then you can use the movement of one point to figure it out. If it's a rotation, you may need 2-3 (I'm rusty here, too). But if it's nonlinear, or more complex than the above, or a combination, then multiple transformations could result in the same displacement for the two points. – eruciform Jul 12 '10 at 15:44
  • What i know is that the transformation involves a translation followed by a rotation. Also I can measure more than 2 points if that helps in identifying the details of the transformation. Thanks for taking the time to reply to my posting! Best regards, Jon – Jon Jul 13 '10 at 21:43
  • no problem, good luck! if you find out, please post so I can know, too! oh, if the answer was helpful, a checkmark would be cool. ;-) – eruciform Jul 13 '10 at 23:01