Function Mesh
Examples
- Plotting a simple function mesh.
::
fmesh({x, y => sin(x) + cos(y)})
Result:
.. image:: ../../../tests/imgs/function_mesh/function_mesh_1.png :align: center :width: 360
- Plotting a parameterized surface as a mesh.
::
let r = {u: Float64, v: Float64 => 2.0 + sin(7.0 * u + 5.0 * v)}
let fx = {u: Float64, v: Float64 => r(u, v) * cos(u) * sin(v)}
let fy = {u: Float64, v: Float64 => r(u, v) * sin(u) * sin(v)}
let fz = {u: Float64, v: Float64 => r(u, v) * cos(v)}
fmesh(fx, fy, fz, smin: 0.0, smax: 2.0 * PI64, tmin: 0.0, tmax: PI64)
Result:
.. image:: ../../../tests/imgs/function_mesh/function_mesh_2.png :align: center :width: 360
- Plotting two surfaces side-by-side in a single axis as a mesh.
::
fmesh({x, y => erf(x) + cos(y)}, xmin:-5.0, xmax:0.0, ymin:-5.0, ymax:5.0)
hold(true)
fmesh({x, y => sin(x) + cos(y)}, xmin:0.0, xmax:5.0, ymin:-5.0, ymax:5.0)
hold(false)
Result:
.. image:: ../../../tests/imgs/function_mesh/function_mesh_3.png :align: center :width: 360
- Plotting a surface as a mesh with custom edge color.
::
fmesh({x, y => sin(x) + cos(y)}).edge_color("red")
Result:
.. image:: ../../../tests/imgs/function_mesh/function_mesh_4.png :align: center :width: 360