Re: Determining angle via Arcsine?
- From: LC Killingbeck <NOTlynn.killingbeck@xxxxxxxxxxxxxxxx>
- Date: Thu, 27 Oct 2005 05:15:42 GMT
"Jaxim" <mr_nice_1973@xxxxxxxxx> wrote in news:1130368871.082739.108900
@g14g2000cwa.googlegroups.com:
> I clarified my initial question with my 2nd response, let me try to be
> more clear.
>
> --------------------------------
> The following are my assumptions:
> I know that the x and y coordinates are:
> x= -5
> y= 0
>
> I also know that the sine of the triangle is:
> sin(Z) = 0; where "Z"=the angle we're trying to determine
>
> Furthermore, we also know that the angle must be between 0-360 Degrees
>
> -------------------------------------------
>
> With that the above information, I think it is safe to surmise that in
> THIS PARTICLAR case:
> asin(0)= 180 Degrees
>
> -------------------------------------
>
> I really don't know how to be more clear than this. Yes, I know asin(0)
> has infinite amount of possible answers. HOWEVER, given the above
> ASSUMPTIONS, I think it's safe to say that the only answer is "Z = 180
> Degrees"
>
>
What is "the sine of the triangle"? Let me try to state the "givens" and
the "to find", of what may (or may not) be the problem you are trying to
solve.
Given: (1) A point (x,y) in the cartesian plane; and,
(1a) (x,y) is not the origin (0,0); and,
(2) A line from the origin (0,0) to this point; and,
(3) A function arcsin(x) which is the angle in the range [0,90]
degrees whose sine is x.
To Find: The angle theta which a line from the origin (0,0) to the point
(x,y) makes with the positive X axis, in the half-open range
[0,360) degrees.
One possible algorithm is to first determine the angle from the origin to
the point (|x|,|y|), then correct for the quadrant based on the signs of
x and y. Something like:
t = arcsin(|y|/sqrt(x^2+y^2)), an angle in the range [0,90] degrees
if (x<0) then t = (180-t) degrees, an angle in the upper half plane
if (y<0) then t = (360-t) degrees
theta = t. End of algorithm.
Your example of (x,y) = (-5,0) comes out of this algorithm with 180.
If this is related to a programming language, look in the manual for
something like an atan2(y,x) function, instead. Lacking a 2-argument
inverse tangent, look for a 1-argument atan(y/x) which you still need
to correct to the proper quadrant by use of the signs of x and y. In
the later case, you also need to be careful about division by zero
and similar numerical problems, though.
I'm still unable to decipher exactly what you are given, and exactly
what you are after, but maybe some of this will help.
Lynn Killingbeck
.
- References:
- Re: Determining angle via Arcsine?
- From: Jaxim
- Re: Determining angle via Arcsine?
- From: Jaxim
- Re: Determining angle via Arcsine?
- Prev by Date: Re: More on triangle numbers and primes!
- Next by Date: Re: Marble problem--put in 10 marbles, then remove 1
- Previous by thread: Re: Determining angle via Arcsine?
- Next by thread: Re: Determining angle via Arcsine?
- Index(es):
Relevant Pages
|