A Scanner Darkly is a 1977 science fiction novel by Philip K. Dick. The semi-autobiographical story was set in a dystopian Orange County, California in the then-future of June 1994. The book includes an extensive portrayal of drug culture and drug use.
The protagonist is Bob Arctor, member of a household of drop-out drug-users, who is also living a parallel life as Agent Fred, an undercover police agent assigned to spy on Arctor's household. Arctor/Fred shields his true identity from those in the drug subculture and, ironically, from the police themselves. (The requirement that narcotics agents remain anonymous, to avoid collusion and other forms of corruption, becomes a critical plot point late in the book.) While supposedly only posing as a drug user, Arctor becomes addicted to "Substance D" (also referred to as "Slow Death," "Death," or "D"), a powerful psychoactive drug derived from a small blue flowering plant , Clerodendrum ugandense[citation needed]. An ongoing conflict is Arctor's love for Donna, a drug dealer through whom he intends to identify high-level dealers of Substance D. Arctor's persistent use of the drug, which causes the two hemispheres of the brain to function independently, or "compete," produces the strange scenario in which Arctor and Agent Fred do not realize they are the same person. Incapable of combining what each persona knows, Fred begins spying on himself, Arctor, more passionately. Through a series of drug and psychological tests, Arctor's superiors at work discover that his addiction has made him incapable of performing his job as a narcotics agent. Donna takes Arctor to "New-Path," a rehabilitation clinic, just as Arctor begins to experience the symptoms of Substance D withdrawal. It is revealed that Donna has been a narcotics agent all along, working as part of a police operation to infiltrate New-Path and determine its funding source. Unknowingly, Arctor has been selected to penetrate the secretive organization.
As part of the rehab program, Arctor is renamed "Bruce" and forced to participate in cruel group-dynamic games intended to break the will of the patients. The story ends with Bruce working at a New-Path farming commune, where he is suffering from a serious neurocognitive deficit after withdrawing from Substance D. Although considered by his handlers to be nothing more than a walking shell of a man, "Bruce" manages to spot rows of blue flowers growing hidden among rows of corn; and realizes the blue flowers are the source of Substance D. The book ends with Bruce hiding a flower in his shoe to give to his "friends" - undercover police agents posing as recovering addicts at the Los Angeles New-Path facility - on Thanksgiving.