FuncViz examples
Generalized bitree/quadtree/octree library
Loading...
Searching...
No Matches
surface_branch_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-07-16
Standards
C++23
Details


In surface_plot_edge.cpp we encountered the unit sphere defined by the zeros of \(1^2=x^2+y^2+z^2\), and the related function \(f(x,y)=\sqrt{1-x^2-y^2}\) obtained by "solving" for \(z\). Note that if \(z=f(x, y)\), then both \(z\) and \(-z\) satisfy the original equation. While the square root function is positive by definition, we might wish to think of \(f(x, y)\) as a multi-valued function with two branches – a positive one and a negative one.

In simple cases like this, where the two branches are reflections across an axis plane, we can use MR_cell_cplx::mirror() to mirror the geometry and seal up any holes. This is really the only change from surface_plot_edge.cpp.

Definition in file surface_branch_glue.cpp.