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

Simple surface function graph. More...

Go to the source code of this file.

Detailed Description

Simple surface function graph.

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


Surface normals may be used by many visualization tools to render smoother results. In this example we demonstrate:

  • How to compute a surface gradient for a function plot
  • How to unitize the gradient into a surface normal
  • How to add the normal to the sample data stored by a MRPTree
  • How to include normals in the cell complex
  • How to increase sampling with a SDF function
  • How to increase sampling near humps by testing derivatives
  • How to balance a tree
  • How to dump a cell complex into various file types

Definition in file surface_with_normals.cpp.