Mark Wickens

POL

Purpose

Converts rectangular coordinates (π‘₯,𝑦) to polar coordinates (π‘Ÿ,πœƒ).

Format

POL         ( x-coordinate , y-coordinate )
              β””β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”˜   β””β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”˜ 
         Numeric expression  Numeric expression

Example

POL(3, 2)

Parameters

Explanation

  1. Converts rectangular coordinates (π‘₯,𝑦) to polar coordinates (π‘Ÿ,πœƒ). The following relational expressions are used at this time:

    r = √(π‘₯Β²+𝑦²) cos πœƒ = π‘₯ / (√(π‘₯Β²+𝑦²)) sin πœƒ = 𝑦 / ((√(π‘₯Β²+𝑦²))

  2. The value of π‘Ÿ is automatically assigned to variable X, while πœƒ is automatically assigned to variable Y.
  3. The value of πœƒ is given as follows: DEG: -180ΒΊ < πœƒ ≦ 180ΒΊ RAD: -Ο€ < πœƒ ≦ Ο€ GRA: -200 grads < πœƒ ≦ 200 grads

Sample Program

10  A=5 : B=3
20  Z=POL(A,B)
30  PRINT X; Y

Converts rectangular coordinate point (5,3) to polar coordinates.