# Graphing coordinates help

1. Feb 22, 2010

### tuanle007

hi,
i have this object.
and i have drawn an oval, the horizontal, and vertical line.

y=145
x=203

when degree = 0

how would i draw the vertial/horizontal line how if it is 45 degree different?

2. Feb 22, 2010

### Staff: Mentor

If what is 45 degrees different? If the object shown is angled down to the horizontal or up to vertical? Is that what you mean? Can you show us a little more clearly what you are asking about. Seems like straightward trig, unless I'm missing something.

3. Feb 22, 2010

### tuanle007

I need to redraw the vertical/horizontal line so that it is correct.
i know the angle of the rotation.
i just dont remember how to do my trig to redraw the line.

i want these yellow lines ?

I have already draw the green lines.
i know that the green line and the yellow line is about 45 degree off?
what can i do if i know the coordinates of the green lines and i want to draw the YELLOW LINES.
I think this is more clear right?

4. Feb 22, 2010

### Staff: Mentor

Yes, it's making more sense now. How did you define the length of the green lines before? I assume this is the center point?

y=145
x=203

And you did some delta-x to draw the horizontal line, and some delta-y to get the vertical line? You are defining the endpoints of the lines, or the center point and length?

It's just some basic trig to figure out where the end points rotate to when you turn the lines. You will get (x,y) coordinates based on the distance from the center point, and the angle of rotation. You will use cos() and sin() functions to get you the x and y components of the rotation (assuming the angle is taken from the horizontal).

5. Feb 22, 2010

### tuanle007

okay,
the x, y value i have given you was from other images..
for this particular one..
the center point is
x=400
y=220

so i start by drawing the red oval.

about 100 points from x and y.
givin 4 points

OVAL
(500,220), (300,220)
(400,220), (400,120)

Vertical line is (400,120), (400, 320)
Horizonal line is (500,220), (300, 220)

knowing the Vertical and Horizontal coordinates.
Can you show me and give me the coordinates for Vertical and Horizontal lines if it is 45 degree different?

6. Feb 22, 2010

### Staff: Mentor

I'm not sure what the OVAL numbers mean. Do they define an oval shape? If so, can you just connect up lines with them? Are they the major and minor axes' endpoints?

On your question about rotating a line, I'll just give you an example. You should be able to extrapolate how to do it for your particular problem. Take an example of a line 100 units long, going from the origin (0,0) to (100,0). It' obviously horizontal. Now rotate it up CCW by 45 degrees. The endpoint rotates up from (100,0) to (100 cos(45),100 sin(45)). Does that make sense?

7. Feb 23, 2010

### tuanle007

i sorta understand the (100cos(45),100sin(45))

but for instant my number
Horizonal line is (500,220), (300, 220)
it would be (500,220) to (500cos(45),500sin(45))?

8. Feb 23, 2010

### tuanle007

okay.
i have 2 end points
(265,218) to (503,218)
and i need to rotate it 45 degree.

what is the formula i can use to do this?

by the axis, i think its roughly about

(313, 290) to (454, 144)

can you help me prove this? the cos(45) and sin(45) doesn't come out close to it for me.