Homework answers and code for plots. 3d not quite right