"Community" alum Donald Glover lays out his plan for rescuing the stranded Matt Damon in a new clip from Ridley Scott's "The Martian."

Glover, who plays astrodynamicist Rich Purnell, shares the scene with Jeff Daniels, Kristen Wiig, Chiwetel Ejiofor and Sean Bean as he animatedly explains a slingshot trajectory that could return the Hermes spacecraft and the Ares 3 crew to Mars.

Based on the 2011 novel by Andy Weir, “The Martian” stars Damon as astronaut Mark Watney, who’s presumed dead during a mission to Mars and left behind by his crew. Struggling to survive with only meager supplies, Watney manages to get a signal to Earth, leading NASA to search for a way to bring “the Martian” home, even as his own crew hatches a daring — and seemingly impossible — rescue plan.

Opening Oct. 2, “The Martian” also stars Jessica Chastain, Kate Mara, Michael Pena and Sebastian Stan.