|
-
Sep 1st, 2005, 04:16 AM
#1
-
Sep 1st, 2005, 08:43 AM
#2
Re: Calculate coordinates...
Does the first line between the dots intersect the green line at 90 degrees?
-
Sep 1st, 2005, 08:58 AM
#3
Re: Calculate coordinates...
also, you need to know the angle of the structure relative to the x-axis. Otherwise, you don't know how to add the coordinate differences on.
-
Sep 1st, 2005, 09:01 AM
#4
Re: Calculate coordinates...
 Originally Posted by penagate
Does the first line between the dots intersect the green line at 90 degrees?
Yeah, it does. The green lines are just imaginary lines though...just to tell you what and where we are.
- ØØ -
-
Sep 1st, 2005, 09:03 AM
#5
Re: Calculate coordinates...
 Originally Posted by penagate
also, you need to know the angle of the structure relative to the x-axis. Otherwise, you don't know how to add the coordinate differences on.
Forgot about that. I can makea vector that will devide the 45degree angle in exactly 2...so that way I can find the angle between that one and anyline I wan't. Then add 22.5 or subtract 22.5 to get the two long blue lines...
- ØØ -
-
Sep 1st, 2005, 10:06 AM
#6
Re: Calculate coordinates...
OK let's assume for the moment that the green line goes along the x-axis.
The closest dots let's call P1 (above x-axis) and P2 (below), the further P3 and P4.
The angle between the lines is you stated A.
Let the bright cyan dot be (x,y).
y{P1} / L1 = tan(A / 2),
therefore y{P1} = L1*tan(A / 2),
and y{P2} = -(L1*tan(A / 2)).
x{P1,P2} = L1, so the coordinates of P1 and P2 are (adding to the origin)
P1 (x+L1, y+L1*tan(A/2)); P2 (x+L1, y-L1*tan(A/2)).
For P3 and P4 it is the same but you use L2 instead so
coordinates are
P3 (x+L2, y+L2*tan(A/2)); P4 (x+L2, y-L2*tan(A/2)).
I think that's right...
I'm trying to figure out how you would do it to allow for rotation.
-
Sep 1st, 2005, 12:09 PM
#7
Re: Calculate coordinates...
I would say: The cyan dot, a red dot, and a green/black intersection form a triangle, calling these points C,R and I.
The angle of I = 90 degrees, C is 1/2 A.
The length RI = 1/2 Ln (L1 or L2, depending on which red dot you chose)
Now you can calculate CR = RI * tan(C) = 1/2 Ln * tan(1/2 A)
As far as I can tell you don't know how much the green lines or blue lines are rotated from the origin, lets call that angle theta for the red dots on the left (in your picture). Then:
R1x = Cx + CR * cos(theta)
R1y = Cy + CR * sin(theta)
R2x = Cx + CR * cos(theta + A)
R2y = Cy + CR * sin(theta + A)
-
Sep 1st, 2005, 02:57 PM
#8
Re: Calculate coordinates...
I guess you are able to turn your figure in any direction, so let us assume your green line goes along the X-axis. That way you can calculate to coordinates for the points using A/2 as the angle to each point (I will only discuss the upper one).
Since we turned the picture to have the green line along the X-axis, the X-coordinate for the length of the green Line (for the inner Point L1+the X-coordinateof the origin ).
It is more difficult for the Y-coordinate. You the "Sinussatz" [German!, don't the english name of it]. First calculate the length of the line from the center to the point(Length). Using the sinussatz it is Length/Sin(90 degrees)=L1/sin(90-A/2).
since Sin(90)=1, you have: Length=L1/sin(90-A/2).
Knowing this Length you can calculate the Y-coordinate using Cos(A/2)*Lenght.
You're welcome to rate this post!
If your problem is solved, please use the Mark thread as resolved button
Wait, I'm too old to hurry!
-
Sep 2nd, 2005, 05:07 AM
#9
Re: [RESOLVED] Calculate coordinates...
Thanks, I managed to figgure it out when I saw twanvl post. And Opus Sinussatz helped a bit too..
DoomSharp(); - Is greatfull.
Thanks
- ØØ -
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|