-
Notifications
You must be signed in to change notification settings - Fork 10
DefFuncRtoC
Jim Pivarski edited this page Mar 15, 2015
·
1 revision
- summary Convert a "z(t)" complex string to a function acceptable for Curve
- labels Reference,Version1
_(This page applies only to the 1.x branch of SVGFig.)_
Converts a "z(t)" string to a function acceptable for [ClassCurve Curve]. Use this to draw on the Argand plane.
- funcRtoC(expr, var, globals, locals)*
expr | _*required*_ | string in the form "z(t)" | ||||
var | _default_="t" | name of the independent variable | ||||
globals | _default_=None | dict of global variables used in the expression; you may want to use Python's builtin `globals()` | ||||
locals | _default_=None | dict of local variables |
All symbols from Python's [http://docs.python.org/lib/module-cmath.html cmath library] are in scope, so you can say things like "cos(t)".
Example use of globals.
>>> funcRtoC("c*t", globals={"c": 1+1j})
This does the same thing.
>>> c = 1+1j >>> funcRtoC("c*t", globals=globals())