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, and some thinking about how to do moving 3D models.

Code

Planets

TYPO-FIXED! 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.

Code to make the PLY file for a hydro galaxy sim

This code reads in multi-particle type galaxy data and makes a PLY file containing each particle as a colored vertex. Make sure you have the "large galaxy data" from the resources list below for this code.

Code for Galaxy Simulators: NOTE - Not well documented

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.

Resources

Planets

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.

Generic Planet Files + Texture Maps

These are the files to go in your "generic_dir" to plot planets in 3D.

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.

Galaxies

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 #1.

Resources

How to start with Sketchfab VR on a smartphone

How to view your Sketchfab model with Google-cardboard VR headsets.