Halfway through a long lunch at Tavern on the Green on a sunny September day, the trim, tanned filmmaker Paul Thomas Anderson, dressed in a Southern California beach bum’s uniform — Quiksilver shorts, faded blue T-shirt, crumpled white bucket hat — went silent. Mr. Anderson, 44, had been asked a simple question: Does Thomas Pynchon, the reclusive author of “Gravity’s Rainbow,” “Mason & Dixon” and “The Crying of Lot 49,” make an on-screen cameo in Mr. Anderson’s “Inherent Vice,” the first movie adapted from one of the writer’s celebrated novels?

A cameo seems like the kind of sly prank that might amuse Mr. Pynchon, who has seemed to love hiding in plain sight since his spectacular rise to literary fame began with his 1963 novel, “V.” In 2004, he “appeared” in two throwaway bits on “The Simpsons,” and even then wore an animated bag over his presumably oversized and yellow head as he shouted, “Get your picture taken with a reclusive author!” In 2009, Mr. Pynchon narrated an online trailer for “Inherent Vice.” And his novels are littered with an obsessive cineaste’s catalog of obscure references.

A cameo would also be in keeping with the mischievous tone of Mr. Anderson’s madcap adaptation, which will have its premiere as the centerpiece of the New York Film Festival next Saturday, and open in theaters Dec. 12. A 180-degree turn from Mr. Anderson’s relentless oil odyssey “There Will Be Blood,” “Inherent Vice” is his most comedic and anarchic film since “Boogie Nights.” It’s a stoner detective film so overstuffed with visual gags and gimmicks that the filmmaker said he was inspired by slapstick spoofs like “Top Secret!” and “Airplane!”