1

Diagrams

I actually have two questions, I found the answer to the second and didn't update the diagram. I'm not actually sure if these are possible, they really stumped me.

Question 1: Given point A and e, the angle of the line A is on relative to the x-axis where 0<=e<360 degrees, how do you calculate the coordinates of B? BA is perpendicular to A's line and 1 unit long.

SOLVED: I start by taking the unit vector from a parallel to the x-axis and then I rotate it 90 + e degrees.

Question 2: I'm using this approach. If anyone has any better suggestions, please let me know.

SOLVED: I find the dot product of the vector from step 1 and the normalized vector AC.

Question 3: This one should be pretty self-explanatory from the diagram. I need to find the coordinates of C given A, B, the angle of BAC and the distance between A and C.

SOLVED: I rotate BA e degrees and then change the magnitude to d.

If anyone spots problems with my solutions, please comment.

Community
  • 1
  • 1
Brad Zeis
  • 10,085
  • 5
  • 26
  • 20

1 Answers1

0

Easy if you understand vectors. Learn about how 2D vectors work and you'll have it. Is that the course you're taking?

  1. Take the unit vector from e to A, knowing that a unit vector has length 1. Assume l1 = xi + yj. The perpendicular vector has components that are the reverse of l1 with one sign changed. In this case, l2 = -yi + xj.
  2. Take the vector l2 that you got from the first problem and transform it as follows:

cx = -cos(t)y - sin(t)x cy = +sin(t)y + cos(t)x

where t is the rotation angle in radians.

I'll leave the third one for you. Read about 2D vectors and transformations.

duffymo
  • 305,152
  • 44
  • 369
  • 561
  • e isn't a point on the line, it's the angle of the line relative to the x-axis. The only point that I know on that line is A. – Brad Zeis Aug 09 '09 at 01:25
  • Yes, I know. Like I said, you need to learn about 2D vectors and transformations. – duffymo Aug 09 '09 at 12:10