Mark Wickens

back to Command Reference

REC

[All Models]

Purpose

Converts polar coordinates (r,theta) to rectangular coordinates (x,y).

Format

REC         ( distance r    , angle theta )
              └────┬───┘     └───┬──┘
         Numeric expression  Numeric expression

Example

REC(10,15)

Parameters

Explanation

  1. Converts polar coordinates (r,theta) to rectangular coordinates (x,y). The following relational expressions are used at this time:

    x = r cos theta, y = r sin theta

  2. The value of x is automatically assigned to variable X, while y is automatically assigned to variable Y.

See

Sample Program

10  A=2 : B=30
20  Z=REC(A,B)
30  PRINT X; Y

Converts polar coordinates (2,30) to rectangular coordinates.