Re: Determining angle via Arcsine?



"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
.



Relevant Pages

  • Re: Compound miter brainteaser
    ... I agree with your algorithm, ... One of the other common algoriths for computing the miter (x in your ... times the cosine of the angle between them. ... A second way to calculate the dot product is to write the vectors as ...
    (rec.woodworking)
  • Re: Compound miter brainteaser
    ... >I agree with your algorithm, ... recall that the dot product of two vectors is ... > times the cosine of the angle between them. ... > If we take the peak of the roof to be the point, and we imagine ...
    (rec.woodworking)
  • Re: Whats a radian...
    ... VB uses right-hand coordinate system for its trig functions, ... VB angle Your desired angle ... you will be in the proper quadrant, however, by taking the numeric ... C187--it appears you've switched the reference legs around end-for-end ...
    (microsoft.public.vb.general.discussion)
  • hough transform
    ... Hello guys!I have a problem with the algorithm i created on implementing ... hough transform over some points in an image. ... to all the angles the sum at each angle in the accumulator matrix is equal ... degrees because the document has none or very little skew angle. ...
    (sci.image.processing)
  • Re: Material flow rate to power required.
    ... Consider that the angle while conveying is an average of theta degrees. ... CONSIDER A DISTANCE OF L METRES FOR THE MATERIAL TO BE RAISED AT ... ANGLE THETA. ...
    (sci.engr.control)