 |
 |
 |
 |
 |
 |
 |
>>> from math import cos, sin, pi
|
|
|
>>> def pol2cart(angle, radius):
|
|
|
... ```Convert polar to
cartesian```
|
|
... x = radius*cos(angle)
|
|
|
... y = radius*sin(angle)
|
|
|
... return x, y
|
|
|
...
|
|
|
>>> print pol2cart.__doc__
|
|
|
Convert polar to cartesian
|
|
|
>>> x, y = pol2cart(pi/3, 3)
|
|