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: . For -element ULAs, beamwidth scales as .
- 4.
Volume visualization requires care with memory. A float64 array is 128 MB; is 8 GB. Use coarser grids for visualization,
float32to halve memory, and chunked I/O for large datasets. Isosurface extraction with Marching Cubes runs in . - 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.