Comic-book origin stories don’t get more fascinating and downright kinky than the story behind the creation of “Wonder Woman,” which writer-director Angela Robinson tells with verve and style in the drama “Professor Marston and the Wonder Women.”

The professor of the title is William Moulton Marston (Luke Evans), shown in 1945 having to defend his brainchild, the Amazon princess Wonder Woman, to a Catholic-sponsored bluenose (Connie Britton) investigating salacious material in comic books. Marston argues the books’ bondage and sadomasochistic material — think of what Wonder Woman does with that lasso — are part of her superpower.

Wonder Woman’s story is rooted in Marston’s work two decades before as a psychology professor teaching at Harvard’s Radcliffe College. His research partner is his wife, Elizabeth (Rebecca Hall), as he espouses theories on dominance and submission — and opines that women would make better leaders than men, because their nurturing mindset would prevent war and crime.

The Marstons seek a lab assistant and find one in Olive Byrne (Bella Heathcote), a bright student with a family history of feminism. (Her aunt, she mentions, is the birth-control advocate Margaret Sanger.) Elizabeth shocks Olive in her job interview by asking her the courtesy of not sleeping with Prof. Marston.

Olive’s shocked reaction inspires the breakthrough in the Marstons’ long-unworkable invention: the first lie detector. While testing the lie detector, the couple discover Olive is, indeed, in love — not with William but with Elizabeth. This discovery leads to a happy polyamorous relationship and down a road of S&M experimentation that, in the movie’s view, provides inspiration for the Wonder Woman character.

Writer-director Angela Robinson (“D.E.B.S.”) weaves the facts of Marston’s nontraditional family circumstances and his comic-book creation into a mesmerizing sexual drama. The lines between science and creativity, and fantasy and reality, become porous in this narrative, which frequently parallels incidents in the Marstons’ tumultuous life and the professor’s theories with the Amazon princess’s adventures.

Evans gives a dynamic performance as the crusading Marston, and Heathcote is endearing as the smart but slightly naive student drawn into this unusual romance. But the linchpin is Hall’s flinty, full-blooded performance as Elizabeth, the most pragmatic of the trio — the one most torn between her desires and her fears of how society will judge them.

“Professor Marston and the Wonder Women” was teased to audiences when “Wonder Woman” was released in June, but this movie‘s frank sexual content is out-of-bounds for the younger fanbase of “Wonder Woman.” For adults interested in exploring the racy story behind the superhero, Robinson’s film is an eye-opener.

* * * 1/2

Professor Marston and the Wonder Women

The sexually charged story of the creator of “Wonder Woman,” and the two women in his life, makes for a dynamic and frankly adult drama.

Where • Area theaters.

When • Opens Friday, Oct. 13.

Rating • R for strong sexual content including brief graphic images, and language.

Running time • 108 minutes.