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

Surface with an undefined regions. More...

Go to the source code of this file.

Detailed Description

Surface with an undefined regions.

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


Surface plots are frequently complicated by regions upon which the function singular or undefined. These functions often behave quite poorly on the boundaries of such regions. For this example we consider \(f(x, y)=\sqrt{1-x^2-y^2}\) – the upper half of the unit sphere. Outside the unit circle this function is complex. As we approach the unit circle from the center, the derivative approaches infinity.

Right now this example illustrates two things:

  • How to drive up the sample rate near NaNs.
  • How to repair triangles containing NaNs.

Definition in file surface_plot_edge.cpp.