Re: A trig question ...
- --- In email@example.com, "bob_kellock" <bob@...> wrote:
> Convert the Cartesian coordinates to polar, add the angularI suggest avoiding this method. Simple example: let x1=-3 and y1=-
> displacement to the polar angle and convert back to Cartesian.
> As an example say x1=3, y1=8 and the displacement is 120 deg.
> Initial polar coordinates:
> Angle A1 = arctan(3/8) = 20.556
> Radius R = Square root(3 squared + 8 squared) = 8.544
> A2 = A1 + displacement = 140.556
> x2 = R*sin(140.556) = -6.598
> y2 = R*cos(140.556) = 5.428
8. Plug that in and you'll get the incorrect result. Inverse trig
function are very dangerous to use, since they usually have multiple
possible results. I tell my students this all of the time and still
get programs sometimes that fail for certain angles because they used
inverse trig function. The previous solution using sin and cos is a
much better choice. If you have a calculator that can do rectangular
to polar conversions for you, that can work very well, since they use
a better way to do arctan of write a C program using the atan2
- --- In firstname.lastname@example.org, "Charles Owen" <cbowen4@...> wrote:
> .........I stand corrected. My somewhat feeble excuses being (a) I suspect
> I suggest avoiding this method. Simple example: let x1=-3 and y1=-
> 8. Plug that in and you'll get the incorrect result. Inverse trig
> function are very dangerous to use, since they usually have
> multiple possible results.
that I was taught trig even longer ago than the OP and (b) I verifed
the results of some examples using the R/P and P/R coordinate
conversions on an HP calculator.
The x2 = x1*Cos(A) etc. formula is far more elegant anyway.