Recently for a project I have been trying to figure out the correct time to launch a spaceship and have it successfully reach Mars. This is what I've managed so far
Because of Earth's orbit around the sun a ship would have a transfer orbit that looks like this
Distance from starting point...