Sam Alter, CSE 167 Final Project Circulatory System Simulation This project is an attempt to simulate an animated circulatory system via OpenGL. The main components of the simulation are Vessels and Cells. The vessels form a data structure linked via pointers to make a path that can trace itself back to the root. The cells are placed in a particular vessel via two position coordinates. One, a translational coordinate that follows the center of the vessel, no matter what direction the vessel's path is taking. The second is a radial vector on the cross-section of the vessel's path that polar coordinates (angle in radians, and radius from center of the vessel). I used these instead of X,Y,Z coordinates because I wanted to be able to calculate vessels in relation to each other and cells in relation to vessels. I basically had to do nearly all of the trig calculations myself, but I viewed it as a chance to refresh my memory. The entire system has one arbitrary root vessel, with one hardcoded starting point. All other positions, including Vessels and Cells, are calculated recursively starting from that root. I added heart vessels later on to provide added animation effects. They are like normal vessels except their radius varies depending on the current simulation state. The camera has two different modes: The first mode which I call Omniscient Mode, is the starting mode of the simluation. It views the whole system head-on with lighting turned off to see a view of all the animation at once. This is nice to watch but doesn't show all of the cells' movements, orientations, etc. The second mode toggled by pressing 'c' is Cell Targeting Mode. In this mode, the camera goes inside the vessel and follows a randomly selected cell closely to give a more animated view of the cell's movement. This mode also has lighting turned on for a 'real world' effect. All in all, I found this project to be very rewarding and met my objectives considering the time restraints. I didn't get to implement lungs and hemoglobins and oxygen meters but despite that I enjoyed working on this project. If I had more time I would also sew up the bridges between Here are the program controls: 't' or 'T' - Toggles Cell Targeting Mode and Omniscient Mode 'C' - Creates a Cell in the simulation 'c' - Removes a Cell from the simluation 'M' - Increases the resolution of the drawn objects 'm' - Decreases the resolution of the drawn objects 'w' - Turns on Wireframe mode (Recommended for Cell Targeting Mode) 'S' - Increases the speed of the simulation 's' - Decreases the speed of the simulation Arrow Keys - In Omniscient mode, the vertical keys scroll up and down, and the horizontal rotate. In Cell Targeting Mode, all the arrow keys randomly re-choose a cell to follow.