Jump to content

Trigonometry!


Mark Ian

Recommended Posts

This isn't really homework, but it being basic math I thought Id post here. I have the following problem:

 

say I have two points in a 3d space A & B and want to find a Point C that is on a line between A & B but has a specific length. The coordinates of A & B are given (x,y and z respectively).

 

My brain handles trig fine in 2d, but for some reason I am making some sort of mistake in 3d.

 

thanks a bundle,

 

Mark

Link to comment
Share on other sites

say I have two points in a 3d space A & B and want to find a Point C that is on a line between A & B but has a specific length. The coordinates of A & B are given (x,y and z respectively).

What has a specific length? (It can’t be point C because points have no length.)

Link to comment
Share on other sites

the length of* a third point between A and B to A or B, AC (or BC) if you must.

 

It isn't the length that I am looking for but the coordinates of C, I am in the wierd (or not so wierd while you are programming) position in which I know the length of AC but not the coordinates of C.

Edited by Mark Ian
Link to comment
Share on other sites

Okay, suppose point C is a fixed distance [latex]d[/latex] from point A, which has co-ordinates [latex](a_1,a_2,a_3)[/latex]. Point C will lie on the surface of the sphere [latex](x-a_1)^2+(y-a_2)^2+(z-a_3)^3=d^2[/latex]. The line on which C lies will be described by the equation of a line in [latex]\mathbb R^3[/latex]. So you just need to solve the two equations to find the point(s) of intersection. (Note: Depending on the actual values, there may be two, one, or no points of intersection.)

Edited by Nehushtan
Link to comment
Share on other sites

Okay, suppose point C is a fixed distance [latex]d[/latex] from point A, which has co-ordinates [latex](a_1,a_2,a_3)[/latex]. Point C will lie on the surface of the sphere [latex](x-a_1)^2+(y-a_2)^2+(z-a_3)^3=d^2[/latex]. The line on which C lies will be described by the equation of a line in [latex]\mathbb R^3[/latex]. So you just need to solve the two equations to find the point(s) of intersection. (Note: Depending on the actual values, there may be two, one, or no points of intersection.)

 

Or if you want a more, erm, emotional and less maths-y way of thinking of it;

 

If you take the difference between the A and B point (A - B) then you have the vector of the line between them.

 

If you apply pythagarous to this you get the length of the line. (AB)

 

If you want the point location of C then you want to find what proportion of the length of the line AC is to the line AB.

 

So divide AC by AB. This gives you the fraction of the AB vector you want.

 

Multiply the vector by this fraction. Add it to the point A. Bob's your uncle.

 

I'm sure the mathmaticians on here will be tearing their heir out at that but you get the idea and it's easier in maths than writing it down.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.