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 drawrRange
: the range of the real valuesiRange
: the range of imaginary values arrows? : a flag indicating whether to draw the phase arrows forf
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 thex--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 drawrRange
: 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 tox
the maximum value to plot when drawing complex functions. Returnsx
.