[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Math question.
Yes, ok:
Let's say you have a line with start point 0,0 and end point 10,10. The
slope is obviously 1, so it's simple to work with, but this should (almost
positively) work with all lines.
You want to find the coordinates of a point that is 4 units along that
line. To find this, you can use simple trig. First, you have to know the
angle measure. To find this you use:
tan-1(10/10) or tan-1(Y2-Y1/X2-X1) (That's inverse tangent function.)
So, the angle measure is 45 degrees.
Now, the measure of the hypotaneuse (the line that is actually there) is
4, and you form a triangle from that. So:
sin45 = X = 4*sin45 = 2.83
---
4
cos45 = X = 4*cos45 = 2.83
---
4
So, in this case the coordinate of the point is (2.83,2.83).
I actually got out a piece of paper and a calculator for this one, i feel
proud.... :)
Cullen
On Mon, 5 Jan 1998, Scott Yellig wrote:
>
> I know this is a little off topic here. But, i figured what the heck.
>
> If i have a line segment, about which i can determine two points, and the
> equation for its line, how would i find a point that is a certian
> distance along the line from one end?
>
> I figured that since it can be done manually by measuring, then it can
> somehow be done mathematicly.. any ideas?
>
> --
> -------------------------------------------------------------------------------
> Finger syellig@deepthought.dyndns.com for PGP public keys.
> -------------------------------------------------------------------------------
>
____________________________________________________________________
/ | \
| Cullen Stevenson | "Could it be that I have bad breath, Tom? Well,|
| cullen@net-link.net | Ed, if you're worried about that, try today's |
|_ _ _ _ _ _ _ _ _ _ _ _| new Ubik, with powerful germicidal foaming |
| action, guaranteed safe when taken as |
|"Ubik" directed." |
| Philip K. Dick |
\ ____________________________________________________________________ /