Here's my problem: Given a point (x,y) and a slope m what is the formula to find the point (a,b) which lies d units away from point (x,y) at slope m when point (a,b) is on the left side of (x,y). When (a,b) is on the right side?
I'm not asking someone to just give me the answer, I need to know how to find the answer. This is not for homework, it's for a program i'm writing that requires collision detection and something to position items to a touching position of they happen to collide / intersect. Googling around, I've seen some crazy stuff involving theta and arctangent, which I haven't been over because I'm in pre-calculus.
I also saw the formulas:
x = D/sqrt(1+m^2), and y = mD/sqrt(1+m^2) for right side of (x,y)?
or
x = -D/sqrt(1+m^2), and y = -mD/sqrt(1+m^2) for left side of (x,y)?
however I don't understand how to use these formulas given a point.
If these formulas are the answer could someone please explain to me how to use them?
I'm not asking someone to just give me the answer, I need to know how to find the answer. This is not for homework, it's for a program i'm writing that requires collision detection and something to position items to a touching position of they happen to collide / intersect. Googling around, I've seen some crazy stuff involving theta and arctangent, which I haven't been over because I'm in pre-calculus.
I also saw the formulas:
x = D/sqrt(1+m^2), and y = mD/sqrt(1+m^2) for right side of (x,y)?
or
x = -D/sqrt(1+m^2), and y = -mD/sqrt(1+m^2) for left side of (x,y)?
however I don't understand how to use these formulas given a point.
If these formulas are the answer could someone please explain to me how to use them?