
Let's put these visualization commands in a FOR loop to animate. Isosurface where V = 1e-5 and V = -1e-4 clf If you connect all the points with the same value, you get an isosurface In contrast to making slices (whether they're flat planes or nonlinear), a different way of exploring volumetric data is to view the "boundaries". You can create contour slices using contourslice.Ĭontourslice(x, y, z, v,, , 0, 20) % 20 contour linesĬontour slice along Y = 0, Z = -1, Z = 1 clf Ĭontourslice(x, y, z, v,, 0,, 10) % 10 contour linesĬontour slice along Z = sin(X) - cos(Y/2) clf Ĭontourslice(x, y, z, v, xs, ys, zs, 50) % 50 contour lines Slice along non-planar surface, Z = sin(X) - cos(Y) zs = sin(xs) - cos(ys) Slices along Y = 0 and Z = 0 slice(x, y, z, v,, 0, 0) Slice along Z = 0 % Even higher resolution One way of understanding volumetric data is to take a slice out of it.

Scatter3(x(:), y(:), z(:), 30, v(:), 'filled') Īs you can see, the higher the resolution gets, the harder it becomes to visualize. Let's look at a larger data set by increasing the resolution.

We'll use scatter3 to visualize the values at each grid point. Let's look at a simple, coarse-grained example = meshgrid() We'll define volumetric data by assigning a value at every 3D grid point. Let's start with a simple example to understand what volumetric data is and how it's represented in MATLAB.
