DrawComplex

drawpak.spad line 1 [edit on github]

DrawComplex provides some facilities for drawing complex functions.

drawComplex: (Complex DoubleFloat -> Complex DoubleFloat, Segment DoubleFloat, Segment DoubleFloat, Boolean) -> ThreeDimensionalViewport

drawComplex(f, rRange, iRange, arrows?) draws a complex function as a height field. It uses the complex norm as the height and the complex argument as the color. It will optionally draw arrows on the surface indicating the direction of the complex value. Sample call: f z == exp(1/z) drawComplex(f, 0.3..3, 0..2*\%pi, false) Parameter descriptions: f: the function to draw rRange : the range of the real values iRange : the range of imaginary values arrows? : a flag indicating whether to draw the phase arrows for f Call the functions setRealSteps and setImagSteps to change the number of steps used in each direction.

drawComplexVectorField: (Complex DoubleFloat -> Complex DoubleFloat, Segment DoubleFloat, Segment DoubleFloat) -> ThreeDimensionalViewport

drawComplexVectorField(f, rRange, iRange) draws a complex vector field using arrows on the x--y plane. These vector fields should be viewed from the top by pressing the “XY” translate button on the 3-d viewport control panel. Sample call: f z == sin z drawComplexVectorField(f, -2..2, -2..2) Parameter descriptions: f : the function to draw rRange : the range of the real values iRange : the range of the imaginary values Call the functions setRealSteps and setImagSteps to change the number of steps used in each direction.

setClipValue: DoubleFloat -> DoubleFloat

setClipValue(x) sets to x the maximum value to plot when drawing complex functions. Returns x.

setImagSteps: Integer -> Integer

setImagSteps(i) sets to i the number of steps to use in the imaginary direction when drawing complex functions. Returns i.

setRealSteps: Integer -> Integer

setRealSteps(i) sets to i the number of steps to use in the real direction when drawing complex functions. Returns i.