English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

Ok, Im trying to create a smart way of solving this. I have a point on a line lets say (3,2) and it cross's thru the origin (0,0). So that means the distance from 0,0 to 3,2 is 3.6055~. What is the point on the same line when the distance is 5.40825~ (Increase of 50%). This function will be used in a program. Note: All my lines will ALWAYS cross thru the origin.

I searched all over for this but cant find an answer. A way I solved this was created a loop that used the equation of the line and looped thru it increasing or decreasing the X till its distance was greater or equal to what I desired. There has to be a simple (or semi complex) way of properly solving this. Thank you for your time.

2006-11-06 21:16:57 · 3 answers · asked by coder_rick 1 in Science & Mathematics Mathematics

3 answers

the length of any line passing through the origin is sqrt(x^2 + y^2) The equation of the line is y = ax, so the length L = x*sqrt(1+a^2), and x = L/(sqrt(1+a^2).

2006-11-06 21:32:46 · answer #1 · answered by Helmut 7 · 1 0

let the pointbe (x,y)
slope of the line joining (3,2) to (0,0)=2/3
slope of the line joining (x,y) to (0,0)
should be the same
so y/x=2/3
or 3y=2x
now distance
5.40825=(x^2+y^2)^1/2
squaring
(5.40825)^2=x^2+y^2
expressing y in terms of x
x^2+(2x/3)^2=(5.40825)^2
9x^2+4x^2=9(5.40825)^2
x^2=(9/13)(5.40825)^2
x=sq.rt (9/13)(5.40825)^2
=4.5
substituting
y=(2/3)(4.5)=3
sothe pointis (9/2,3)

2006-11-06 21:30:14 · answer #2 · answered by raj 7 · 0 0

good question.

general point is (3t,2t)

distance from (0,0) is t(sqrt(13))

so if t is 1.5, distance will be 150%,
so point is (4.5,3)

2006-11-06 22:22:33 · answer #3 · answered by paladin 1 · 0 0

fedest.com, questions and answers