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

Mirroring & gluing surfaces together. More...

Go to the source code of this file.

Detailed Description

Mirroring & gluing surfaces together.

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


This example illustrates the same object as ear_surface.cpp, but uses a different strategy to generate the triangulation. For reference, the surface we are interested in is defined by the zeros of the following polynomial:

\[ x^2-y^2*z^2+z^3 \]

In ear_surface.cpp we used a mesh of cubes covering a 3D region, and extracted the triangulation as a contour surface. In this example, we solve this equation for \(x\) giving us two surfaces:

\[ +z\cdot\sqrt{y^2-z} \]

\[ -z\cdot\sqrt{y^2-z} \]

As in the example surface_plot_edge.cpp, we use the NaN solver to flesh the surface out so that it hits the X plane. And as in surface_branch_glue.cpp, we then glue the two surfaces together.

Definition in file ear_surface_glue.cpp.