There are all sorts of reasons why people become New York City police officers. Tradition. Family ties. The pension. Antonio Bolfo’s reasoning was simple.

“I was bored,” he said.

It was 2006, and Mr. Bolfo – a born-and-bred New Yorker with a degree from the Rhode Island School of Design – was an animator working on PlayStation games like Guitar Hero and Amplitude. Still, he was unfulfilled. The attack on the World Trade Center had gotten him thinking about law enforcement.

“I wanted street-level experience, so I opted to be a cop,” he said recently. “I didn’t want to just ride a desk all day in the F.B.I. right off the bat. It was a really idealistic time in my life. I really thought I could make a difference. Save some people. It was very naïve, but that was my thought process at the time.”

Antonio Bolfo/Reportage by Getty Images

He got his wish quickly.

“They stuck me at P.S.A. 7 in the South Bronx,” he said, referring to Police Service Area No. 7 in the department’s housing bureau. “They cover all the housing projects in that area.” It was dangerous work, performing vertical patrols — marching up and down staircases — watching for drug deals, responding to violent fights and domestic brawls, and worse.

Two years passed, and Officer Bolfo brought something else to work, along with his radio and his gun. A camera.

“It was a hard job emotionally and physically,” he said. “To get the stress off, I would use photography. I would never let it interfere with my police work.”

His photographs from those days and nights in 2008 — and many more taken as a citizen tagging along with officers in 2009, after he resigned from the force to pursue photography full time — offer a unique and fascinating glimpse into the world of the housing police. They are at turns raw and tender, scary and sweet, and they humanize people on both sides of the badge — those who wear one and those who face them, night after night.

There are photos of arrests, with onlookers jeering at officers handcuffing a shirtless suspect. The very same people had called the police about the man in the first place.

Antonio Bolfo/Reportage by Getty Images

“The cops broke up a house party because this guy was allegedly looking through people’s bags,” said Mr. Bolfo, who is now a photographer with Reportage by Getty Images. “Everyone was angry at each other all of a sudden.”

In another picture, a livid officer shouts at a handcuffed teenager who had refused to drop a realistic toy pistol.

“The cop’s screaming at the kid: ‘I could have shot you! I could have shot you!’ ” Mr. Bolfo said.

At the other extreme are officers at rest, taking the personal breaks built into a shift. They go to the roof, where civilians are forbidden.

“This is like a safe haven for them,” he said. “Kind of like, collect their thoughts, talk to their loved ones, be people. Shed their police persona and relax a little bit.”

Mr. Bolfo, now 30, hopes that the pictures from his time on the beat will educate. “It’s not a cop drama where it’s just black and white,” he said. “Cops grow, and this is where they learn their skills and have a trial by fire. They’re put in the most dangerous neighborhoods in New York City. They have to learn superfast.”