Post Reply 
Rectangular to Polar Coordinate Conversion
10-24-2017, 10:55 AM (This post was last modified: 12-30-2017 09:50 AM by lschroeder1947.)
Post: #4
RE: Rectangular to Polar Coordinate Conversion
Anders said:
Quote:...that in my opinion should be built in to the HP Prime CAS from the beginning especially since there is a dedicated ∡ button!...

Anders, that would be nice. Here is simplified version of my post to make it easier for HP Prime Free - Lite users to follow.

Note: HOME view conversions of Polar to Rectangular and Rectangular to Polar are built-in.

Alternate Approach below seems to be more stable.

Implement CAS View versions: Press Define, type Name, and copy Function

Name:P_to_R
Function: CAS.exact(X*COS(Y))+CAS.exact(X*SIN(Y))*i

Name: R_to_P
Function: CAS.exact(CAS.collect(ABS(X+Y*i)))+"∡"+CAS.collect(ARG(X+Y*i))

<Edit 1 - Dec 26, 2017>

Alternate Approach - using CAS variables with local paramenters
Copy each of these functions to the CAS command line and press enter (BEGIN, return, ENTER necessary for Windows Store version of Free - used for iOS Lite and Android Free as well):

P_to_R(r,a):=
BEGIN
return (r*COS(a)+r*SIN(a)*i);
END;


R_to_P(x,y):=
BEGIN
return (CAS(collect(ABS(x+y*i)))+"∡"+CAS(collect(ARG(x+y*i))));
END;

</Edit 1>

[Image: convert_b1_p_r.png]

[Image: convert_p_r.png]

Use your Define blue key with system copy and paste to set your User Functions to these values. Use the upper right hand icon to toggle between radian and degrees. Use <approximate> key if necessary. <arrow> key does not toggle CAS defined functions results.
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Rectangular to Polar Coordinate Conversion - lschroeder1947 - 10-24-2017 10:55 AM



User(s) browsing this thread: 2 Guest(s)