Path: ...!nntp-relay.ihug.net!ihug.co.nz!logbridge.uoregon.edu!canoe.uoregon.edu!newsfeed.news.ucla.edu!not-for-mail From: rob@trash.whim.org (Rob Johnson) Newsgroups: sci.math Subject: Re: Rectangular to Polar Conversion Help Date: Wed, 16 Jul 2003 14:18:21 +0000 (UTC) Organization: West Hills Institute of Mathematics Lines: 18 Message-ID: <20030715.143342@whim.org> References: Reply-To: rob@trash.whim.org (Rob Johnson) NNTP-Posting-Host: bilbo.whim.org X-Trace: gladiola.noc.ucla.edu 1058365101 19959 63.207.170.90 (16 Jul 2003 14:18:21 GMT) X-Complaints-To: abuse@ucla.edu NNTP-Posting-Date: Wed, 16 Jul 2003 14:18:21 +0000 (UTC) In-reply-to: "N" In article , "N" wrote: >The formulas from polar to rectangular and back are this > >x = cos(L)* cos(B) * R >y = sin(L) * cos(B) * R >z = sin(B) *R > >then >R = sqrt(x*x + y*y + z*z) >B = sin-1(z/R) >L = tan-1(y/x) Better is L = 2*atan(y/(x+sqrt(x*x+y*y))). This formula for L eliminates the uncertainty as to its quadrant. Rob Johnson take out the trash before replying