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

Stress test with a large surface object. More...

Go to the source code of this file.

Detailed Description

Stress test with a large surface object.

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


Just a nice parametric surface without any weirdness. Some things demonstrated:

  • How to time various operations.
    • Try with a large mesh (use a 9 in refine_grid).
    • Try reducing the number of data variables stored in the cell complex
    • Try removing the normal vector from the output
    • Try both MRccT5 & MRccF5 for cc_t
  • How to include a synthetic value that can be used for color mapping – \( c(u,v) \) can be used to render stripes on the surface.
  • How to compute a normal to a parametric surface. If the surface is defined by

    \[ \vec{f}(u,v)=(x(u,v), y(u,v), z(u,v)) \]

    Then the normal vector is given by:

    \[ \vec{n}=\frac{\partial \vec{f}}{\partial u}\times\frac{\partial \vec{f}}{\partial v} \]

    Note that \( \frac{\partial \vec{f}}{\partial u} = \left[ \frac{\partial x}{\partial u}, \frac{\partial y}{\partial u}, \frac{\partial z}{\partial u} \right] \) & \( \frac{\partial \vec{f}}{\partial v} = \left[ \frac{\partial x}{\partial v}, \frac{\partial y}{\partial v}, \frac{\partial z}{\partial v} \right] \)
  • How to include a normal in the cell complex

Definition in file performance_with_large_surface.cpp.