Visualization: DAY 3
Lecture Notes

Part 1: Day 3 Lecture Slides
All of the notes from the intro of day 3. This includes some of Day 2's lecture about static 3D models.

Part 2: Day 3 Lecture Slides
Starting to think about how to do moving 3D models.
Activity #1: Static 3D
Code
Main Library

solverlibs.py - Main Library for Reading and Processing Data
This streamlines the code and makes it more modular. This library provides both solver and plotting unit conversions and data readers.
Individual Projects
Planets

Code to make the set of OBJ + MTL Planet files
This code reads in planet data and makes the files needed to view a series of 3D spheres based on a single time snapshot (static model).
Galaxies

Code to make the PLY file for an N-body galaxy sim
This code reads in 2-particle type galaxy data and makes a PLY file containing each particle as a colored vertex.
Resources
Planets

DOWNLOAD ME!!! Generic Planet Files + Texture Maps
These are the files to go in your "generic_dir" to plot planets in 3D.

Simple Mars Model
This is a simple low-ish resolution sphere wrapped with a Mars texture map.

Wavefront .obj file format
Detailed wiki article about the Wavefront file format.

Just a google search of planet maps
This is just a google search for planet texture maps. Make sure they have widths about 1000-1200 pixels - bigger ones take up too much memory.
Activity #2: Interactive 3D Movies FTW!
Code
Planets

Code to make the set of OBJ + MTL Planet files for movies
This code reads in planet data and makes the files needed to view a series of 3D spheres based on a specified number of timesnaps.
Galaxies

Code to make the PLY files for an N-body galaxy sim movie
This code reads in 2-particle type galaxy data and makes a PLY file containing each particle as a colored vertex for each specified snapshot file.

Code to make the PLY filed for a hydro galaxy sim movie
This code reads in multi-particle type galaxy data and makes a series of PLY files containing each particle as a colored vertex. Make sure you have the "large galaxy data" from the resources list in Activity #2.
Resources
General

How to start with Sketchfab VR on a smartphone
How to view your Sketchfab model with Google-cardboard VR headsets.
Galaxies

Some decimated files of a smooth particle hydrodynamics sim of a galaxy merger
26M of hydro-galaxy-merger-delicousness.
For Reference ONLY (not covered here)
Code for Galaxy Simulators: NOTE - Not well documented, we will not go over
This is mainly to serve as a reference for folks that do galaxy simulations in their research and want to plot some stuff in 3D in the future. Feel free to email me whenever about this!

Convert galaxy merger HDF5 into text file
Reads in Gadget-2/Gizmo/Arepo-like data and converts it to text file format. Also can be used to reduce the number of particles. So far, only 2 particle types, but more can be added by the user.

Reads & decimates files
Reads in SPH text file data and reduces the number of particles.