- #1
physicisTboB
- 6
- 0
So for a while i have been wondering if there was a way to find a point a certain distance along a linear function, so I decided that with my extreme pre-calc level of math that I would try and write an equation for it. long story short I would appreciate it if someone would take a look at the equation and try and figure out where I goofed up. The equation I came up with is:
c = sqrt((ox+a)^2+(m*(ox+a)+b-oy)^2)
where
c is the distance of the hypotenuse of a triangle with coords (ox,oy),(ox+a),(ox+a,f(ox+a))
a is the distance of the horizontal leg of the triangle
m, b are the slope and y-intercept of the line respectively
ox, oy are the original x and y coords on the line
px, py are the projected coords along the line
z is the distance along the line to the new projected point
deltax = (a*z)/c
where
deltax is the distance to the new point along the x-axis
px = deltax + ox
py = m(deltax+ox)+b
where
px, py are the projected coords along the line
I hope this post isn't too incomprehensible seeing as I'm writing this at 12:30
c = sqrt((ox+a)^2+(m*(ox+a)+b-oy)^2)
where
c is the distance of the hypotenuse of a triangle with coords (ox,oy),(ox+a),(ox+a,f(ox+a))
a is the distance of the horizontal leg of the triangle
m, b are the slope and y-intercept of the line respectively
ox, oy are the original x and y coords on the line
px, py are the projected coords along the line
z is the distance along the line to the new projected point
deltax = (a*z)/c
where
deltax is the distance to the new point along the x-axis
px = deltax + ox
py = m(deltax+ox)+b
where
px, py are the projected coords along the line
I hope this post isn't too incomprehensible seeing as I'm writing this at 12:30
Last edited: