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

Surface with a step discontinuity along a curve. More...

Go to the source code of this file.

Detailed Description

Surface with a step discontinuity along a curve.

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


The function illustrated here is defined on the entire plan, but has a step discontinuity on the unit circle. Except on the unit circle, the function's derivative is zero. If we sample on a uniform grid, some of the resulting polygons will have vertexes both inside and outside the unit circle – they cross over the discontinuity! When drawn we get a continuous surface with a circular bump! It should look like the x-y plane has a circle cut out that is hovering one unit above the plane.

  • How to drive up the sample rate near a particular SDF – so that we get higher resolution where the surface meets the plane.
  • How to delete triangles that cross over a discontinuity – via an SDF.

Definition in file surface_plot_step.cpp.