Table of Contents

Advertisement

6-4 Numeric Functions
REC
Function:
(r coordinate,
e
coordinate)
Numeric expression
Transforms polar coordinates (r , e) to rectangular coordinates (x , y ).
Parameter:
r
coordinate
:
e
coordinate:
Explanation:
Numeric expression. O
<:;;,r
< 10
100
Numeric expression
DEG:
tel<
1440°
RAD
:
te
I
< 8
7f
rad
GRA:
tel<
1600 gra
®
1) Transforms polar coordinates (r , e) to rectangular coordinates (x
,
y) using
the following
relational_
expressions.
x
=
r
cos
e
y
=
r
sine
2) The x coordinate of (x , y) will be given as the output of the function, and
the value of the x coordinate will be assigned to variable X and the value of
they coordinate will be assigned to variable Y at the same time
.
3) An error will occur if
r
< 0
.
4) The output values will correspond to the setting of the angle unit (DEG
,
RAD
or GRA).
Example:
10 CLEAR
20 MODE 4
-~
INPUT
"r
=''
,
R
40
INPUT
"t
<
0
l=", T
50 X=RECCR,Tl
60
PR I NT"x='' ;X
70
PR I NT"Y='' ;Y
80
GOTO
30
*
(x ,y) will be displayed if (r , e) is input.
153

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents