Three-dimensional contour¶
Isolines of the Julia field drawn in three dimensions, each at the height of its own level, so that they trace the shape of the surface.
The figure above is live, drawn in the browser by the same engine that draws the viewer: drag it to pan, and click it to zoom with the wheel. Download the PDF for the vector figure that IronLAB exports, or read how to embed a figure of your own.
Source¶
The figure is built by the following code. Its data comes from the functions on the data helpers page.
use ironlab::prelude::*;
use crate::fields::*;
pub const TITLE: &str = "Three-dimensional contour";
pub const DESCRIPTION: &str = "Isolines of the Julia field drawn in three dimensions, each at the height of its own \
level, so that they trace the shape of the surface.";
pub fn figure() -> Figure {
let (x, y, z) = julia_grid(81);
let mut fig = Figure::new()
.size_mm(160.0, 100.0)
.title(r"Isolines of $\ln(1 + |z_3|)$ at their levels")
.label("contour")
.label("colormap")
.label("levels")
.parameter("dimensionality", "3D")
.parameter("artists", 1)
.parameter("data_points", 6723)
.parameter("has_legend", false);
let mut ax = fig.axes3(0, 0);
ax.contour3(&x, &y, &z).levels(20).line_width(1.0);
ax.colormap(Colormap::Cividis)
.xlabel("$x$")
.ylabel("$y$")
.zlabel(r"$\ln(1 + |z_3|)$")
.grid(true);
fig
}
