2D Coordinate SystemDate: 05/13/99 at 01:27:18 From: Ilya Burda Subject: Coordinate transform I have two 2D coordinate systems S1 and S2 arbitrarily positioned on a plane. I also have two points A and B with known coordinates in the S1 system. I have angles between S2 coordinate axes and lines connecting the S2 origin with points A and B. Is this enough data to determine the relative position of S2 and S1, or I need one more point? This is actually a simplified version of the ultimate problem in 3D. How many points do I need for 3D? Thanks. Date: 05/13/99 at 08:08:04 From: Doctor Jerry Subject: Re: Coordinate transform Hi Ilya, Except in degenerate cases, the the lines from the origin of S2 to the points A and B will intersect at a point (h,k) relative to S1. This is the origin of the S2 system (if I understand your problem properly). From the angles you can figure out the rotation of S2 relative to S1. I think, therefore, that you have enough information. Before I could offer an answer for the 3D part of your question, I'd have to spend more time than I can offer, given the number of questions we have. - Doctor Jerry, The Math Forum http://mathforum.org/dr.math/ Date: 05/15/99 at 00:38:21 From: Ilya Burda Subject: Re: Coordinate transform Hello Dr. Math, I think it's a little more complicated than it seems at the beginning. Here is where I get stuck. Let's call the axes of S1 X1 and Y1, its origin O1, and X2, Y2 and O2 the same for S2. We have the positions of points A and B defined in S1 as A(X1a,Y1a) and B(X1b,Y1b). Since the lines connect O2 with A and B we can write their equations in S2 as: Y2 = alpha*X2 alpha is a slope of line O2A Y2 = betta*X2 beta is a slope of line O2B If we call the rotation angle between S2 and S1 theta then the same two lines could be rewritten in S1 as: Y1 = (theta+alpha)*X1+Ca Y1 = (theta+betta)*X1+Cb Ca and Cb are some offsets since those lines don't cross O1. For X1,Y1 in those equations we can substitute X1a, Y1a, X1b and Y1b. We get Y1a = (theta+alpha)*X1a+Ca; Y1b = (theta+betta)*X1b+Cb; two equations with three unknowns: theta, Ca and Cb. Even if I bring a third point C(X1c,Y1c) it does not solve the problem by introducing one more unknown Cc. Thanks. Date: 05/15/99 at 08:36:59 From: Doctor Jerry Subject: Re: Coordinate transform Hi Ilya, I don't think that you can add a slope and an angle. If I understand your original statement, then we are given (a1,a2), (b1,b2), alpha, beta, and theta. Relative to the (x,y)-system, with (h,k) unknown, we see that (b2-k)/(b1-h) = tan(beta+theta) (a2-k)/(a1-h)= tan(alpha+theta). This is a system of two equations in two unknowns. You can solve for h and k. If theta is not known, then I believe that another point is needed. Date: 05/15/99 at 09:00:34 From: Ilya Burda Subject: Re: Coordinate transform Yes. That is the whole idea that Theta is NOT known. I treat slopes and angles the same because I can always find one from another. I think dealing with slopes simplifies equations. (It gets rid of tan()). I don't think another point can help. Can you please show me how a third point resolves the problem? Thanks again for your time. Date: 05/16/99 at 06:36:04 From: Doctor Jerry Subject: Re: Coordinate transform Hello Ilya, I gave the equations (b2-k)/(b1-h) = tan(beta+theta) (a2-k)/(a1-h)= tan(alpha+theta) in my last message. They are two equations in the three unknowns h, k, and theta. If we use a third point (c1,c2) and assume the angles between the line from (c1,c2) to the origin (h,k) of the second system and the axes of the second system are known (as before), then we will have a third equation (c2-k)/(c1-h) = tan(gamma+theta) So, now we have three equations in the three unknowns h, k, and theta. Of course, I have used the geometry of the figure Actually, I think one can approach this a little differently, to avoid the special features of the figure. Suppose {cos(t),sin(t)} and {-sin(t),cos(t)} are vectors in the directions of the axes of the second system. The angle t is not known. Also not known are the coordinates (h,k) of the origin of the second system. Given a point (a1,a2) we know that the vector from (a1,a2) to (h,k) makes a known angle t1 with the vector {cos(t),sin(t)}. So, we can write {cos(t),sin(t)} dot {h-a1,k-a2} = |{cos(t),sin(t)}|*|{h-a1,k-a2}|*cos(t1) This can be rewritten as (h-a1)*cos(t)+(k-a2)*sin(t) = sqrt((h-a1)^2+(k-a2)^2)*cos(t1). This is one equation in the unknowns h, k, and t. With each of two other points we can form a similar equation in the same unknowns. So, we have three equations in three unknowns. However, the equations are not easy. - Doctor Jerry, The Math Forum http://mathforum.org/dr.math/ Date: 05/16/99 at 21:30:28 From: Ilya Burda Subject: Re: Coordinate transform Thank you, Dr. Math. That is precisely what I was looking for. I'll try not bother you with 3D for a while and give it a try on my own. Thanks again for your time and effort. Ilya Burda. |
Search the Dr. Math Library: |
[Privacy Policy] [Terms of Use]
Ask Dr. Math^{TM}
© 1994-2013 The Math Forum
http://mathforum.org/dr.math/