quick math q
 

MegaSack DRAW - This year's winner is user - rgwb
We will be in touch

[Closed] quick math q

11 Posts
8 Users
0 Reactions
44 Views
Posts: 0
Free Member
Topic starter
 

Trying to derive the formula for distance from a line with the form ax+by+c=0 to a point (u,v).

I know the formula, don't need it. Trying to work out the way to get there.

I think I've found the right way, but it seems like I've got to do a LOT of algebra to get there, and it doesn't feel quite right (or I'm just lazy).

Is there a simple way to do this, or is it really long?


 
Posted : 24/10/2010 8:30 pm
Posts: 4274
Full Member
 

OK I think I got the gist of your problem and it's a nice one.

Yes, it sound like it'll take a few steps to get there. From the top of my head (bear in mind it's been a while since I did A-Level (gawd that's making me feel old)).

ax + by + c is a linear equation, find the gradient.

then you cna find the inverse of that, which is normal to your line.

the shortest distance from your point to the line is along that normal.

when that line crosses your point, it will intesect your original line.

find the distance from your point to your intersection using pythagoras.

QED.


 
Posted : 24/10/2010 8:47 pm
Posts: 0
Free Member
Topic starter
 

Yeah, but I'm trying to derive the formula here.

The formula is (in this context)

|au+bv+c|/sqrt(a^2+b^2)


 
Posted : 24/10/2010 8:52 pm
Posts: 0
Free Member
 

Well done JonT!


 
Posted : 24/10/2010 8:56 pm
Posts: 91098
Free Member
 

Do what JonT says and then juggle the algebra.

Simples *squeak*


 
Posted : 24/10/2010 9:14 pm
Posts: 91098
Free Member
 

Or.. wait a minute... can you not just write a formula for the distance to any point from your point, then constrain that with the formula for your line.. then differentiate it and solve....?

I could maybe have a look at that if I could be bothered and it hadn't been 15 years.


 
Posted : 24/10/2010 9:15 pm
 GJP
Posts: 0
Free Member
 

chapeau molgrips - you're a ****in maths genius.

My first thoughts were to do it the way JonT suggested but I couldn't be ar$ed with all the algebra.


 
Posted : 24/10/2010 9:37 pm
Posts: 0
Free Member
 

If Manville is in the USofA then you are forgiven, if not its MATHS.

Sorry I was crap at algebra, but at least I can spell it 😀


 
Posted : 25/10/2010 7:54 am
Posts: 91098
Free Member
 

chapeau molgrips - you're a ****in maths genius.

Did that work?!

Calculus is nasty there isn't it.. you've got X and Y.. but wait - you've got a formula for y based on x.. hmm.. making me want to get the pen and paper out now.


 
Posted : 25/10/2010 11:19 am
 GJP
Posts: 0
Free Member
 

[/i]molgrips - Member
chapeau molgrips - you're a ****in maths genius.
Did that work?![i]

Nah .. still a Sh1t load of algebra.


 
Posted : 25/10/2010 5:23 pm
Posts: 0
Free Member
 

As JonT said find the gradient and the x and y co-ordinates, then put them into

Y1-Y2=m(X1-X2)

M being the gradient

put the x and y co-ords into Y2 and X2 then put them all on the same side.


 
Posted : 25/10/2010 6:02 pm
Posts: 0
Free Member
 

So that was a quick maths question, I can't wait until the complicated stuff comes. 😯


 
Posted : 25/10/2010 6:21 pm