Chapter Summary

Chapter Summary

Key Points

  • 1.

    Matplotlib 3D is good enough for simple surfaces. Use projection='3d' for quick exploratory plots and journal figures. It produces vector PDF output and integrates with your Matplotlib workflow. But it has no true depth testing, no lighting, and performance degrades beyond ~10K polygons.

  • 2.

    PyVista for serious 3D work. PyVista wraps VTK with a Pythonic API, providing GPU-accelerated rendering, volume rendering, isosurfaces, and interactive exploration. Use it for volumetric data, large meshes, and EM field visualization.

  • 3.

    Always visualize antenna patterns in 3D. 2D polar cuts miss sidelobes in other planes. Convert from spherical to Cartesian coordinates: x=rsinθcosϕx = r\sin\theta\cos\phi. For NN-element ULAs, beamwidth scales as 50.8°/N\approx 50.8°/N.

  • 4.

    Volume visualization requires care with memory. A 2563256^3 float64 array is 128 MB; 100031000^3 is 8 GB. Use coarser grids for visualization, float32 to halve memory, and chunked I/O for large datasets. Isosurface extraction with Marching Cubes runs in O(N3)O(N^3).

  • 5.

    Open3D and Trimesh for mesh processing. Use Trimesh for loading/saving meshes (STL, OBJ), computing properties (volume, area), and decimation. Use Open3D for point cloud processing and surface reconstruction from LiDAR/depth data.

Looking Ahead

Chapter 18 integrates Matplotlib with LaTeX for automated reporting — programmatic figure generation and auto-generated tables that feed directly into papers and reports.