FuncViz examples
Generalized bitree/quadtree/octree library
Loading...
Searching...
No Matches
complex_magnitude_surface.cpp File Reference

Complex magnitude surface with coloring. More...

Go to the source code of this file.

Detailed Description

Complex magnitude surface with coloring.

Author
Mitch Richling http://www.mitchr.me/
Date
2024-07-13
Standards
C++23
Details


One popular way to plot complex functions is to use a surface plot of \(\vert f(z)\vert\) and color the surface with \(\arg(f(z))\). This way we can simultaneously represent the magnitude and phase over the complex plain. There are several ways to color the plots, and we will be following the method described by Richardson in 1991. In this example, we demonstrates several techniques:

  • Alternate ways to do an initial sample (grid vs recursive)
  • Sample near a point in the domain
  • Sample below a level in the range
  • Sample near level curves
  • Sample based on a data value that is not part of the geometry
  • Sample near domain axis
  • Use MRaster to compute colors for complex numbers
  • Directly attach colors to geometric points
  • Do rough clipping with high sampling and cell filtering.
  • Precision clipping by folding & culling.

Definition in file complex_magnitude_surface.cpp.