The shocking dashcam video showing the death of Chicago teenager Laquan McDonald—who was felled by 16 bullets as he walked away from police—led to angry protests throughout the city and murder charges against the shooter, officer Jason Van Dyke.

Now, as Van Dyke’s trial nears a close, his lawyers have presented their own animated recreation of what supposedly happened the night 17-year-old McDonald died.

On Tuesday, jurors saw the forensic recreation of McDonald’s movements—shown from Van Dyke’s point of view—using laser scanning and drones, as the defense tried to persuade them that Van Dyke had reason to fear for his life when he shot and killed McDonald in October 2014.

“Our analysis demonstrates that Mr. McDonald was getting closer to Officer Van Dyke up until the shooting,” said Jason Fries, whose San Francisco-based firm 3D-Forensic created the defense’s animated version of events.

Van Dyke is charged with two counts of first-degree murder, 16 counts of aggravated battery and one count of official misconduct.

Before McDonald died on Oct. 20, 2014, he was holding a three-inch blade and attempting to break into cars. A truck driver dialed 911, and two responding officers trailed McDonald as they waited for a Taser unit for backup. McDonald had slashed the tires of their patrol car and refused to drop his knife.

Van Dyke arrived on scene soon after and pumped 16 bullets into McDonald within seconds of encountering him in the middle of the street. The prosecution has emphasized that no other cops who met McDonald that night discharged their weapons.

During Tuesday’s testimony, defense attorney Dan Herbert asked Fries, “How long did it take Laquan McDonald to get from 39 feet away to close the distance at approximately 15 feet [from Van Dyke]?”

“Approximately four seconds,” Fries testified.

Fries said the video was made using a laser scanner to reconstruct the area, dashcam video, security footage and the medical examiner’s report.

The recreation included a bird’s-eye view of the area that coincided with dispatcher audio, from the moment a 911 caller reported McDonald breaking into trucks, to his movements toward a Burger King as two responding officers trailed him.

The real video of McDonald jogging away from Van Dyke played for a few seconds before the animated rendition of Van Dyke on the scene. The animation showed McDonald being shot five times while he was standing and did not include images of Van Dyke continuing to fire after McDonald had collapsed.

On cross examination, assistant special prosecutor Marilyn Hite Ross grilled Fries over the video’s lack of exact detail from the scene—including lighting conditions, the speed of McDonald’s and cops’ movements, McDonald’s attire, and the plumes rising around his body after he was gunned down.

“In the actual, the real video footage of the shooting was Laquan McDonald wearing all black?” Hite Ross asked of the video, which depicts McDonald in a black hoodie. She pointed out McDonald had jeans with light pockets in dashcam footage.

“I don’t know,” Fries answered.

The testimony came on a day that would have marked McDonald’s 21st birthday.

Van Dyke, hired by Chicago PD in 2001, is the first member of the force to face first-degree murder charges in nearly four decades. The killing sent waves of anger through the city—igniting protest after the dashcam video of McDonald’s killing was released—and became part of the rallying cry of Black Lives Matter. McDonald’s death also led to a Justice Department inquiry into Chicago policing and the firing of the city’s police superintendent.

In the soundless dashcam footage, McDonald is walking away from police when the first bullets spin him around before his body hits the pavement. “Plumes” of debris rise from around McDonald’s body as the gunshots continue, some bullets hitting the roadway. Van Dyke’s partner kicks the knife out of McDonald’s hand, stopping Van Dyke from reloading his weapon.

An autopsy found a small amount of PCP in McDonald’s system.

Testimony in the trial began Sept. 17. During opening arguments, special prosecutor Joseph McMahon that Van Dyke emptied his clip, pulling the trigger for 12.5 seconds, even after McDonald fell to the ground.

McMahon said Van Dyke murdered McDonald because he saw “a black boy walking down the street” and “having the audacity to ignore the police.”

Yet Van Dyke’s attorney Dan Herbert said the officer was in fear for his life and likened McDonald’s movements before he died to those of a horror-movie villain, and said McDonald had been on a “wild rampage through the city”

“Race had absolutely nothing to do with this, and there will be no evidence whatsoever to suggest race was a factor,” Herbert said.

Van Dyke, a 40-year-old father of two daughters, insisted to the Chicago Tribune last month that he’s not racist. “Everyone wants to be part of the bandwagon of hatred. Anyone who knows me, knows me personally, knows ... that I’m not a racist. That’s a great false narrative ... It’s just slander,” the suspended cop said.

One former FBI agent testified last week that McDonald’s actions “did not rise to the necessity of using deadly force to stop it.”

“He never said anything to anybody, never made any threats, never made any move towards the police officers confronting him,” said Urey Patrick, who testified for the prosecution before it rested its case on Thursday. “Here in this video he’s walking away from them.”

Meanwhile, an FBI ballistics expert, Scott Patterson, testified that after McDonald fell, “plumes” of debris swirled above his body from bullets hitting the street. Some of those bullets passed through McDonald and hit the road.

A video of an FBI agent shooting 16 shots in four seconds, followed by the lawman shooting 16 shots in 14 seconds, accompanied Patterson’s testimony.

“He was taking the time to aim each shot, it was deliberate methodical – only way to describe that,” Patterson told jurors.

Another state witness, Jose Torres, said he was driving his son to the hospital when they encountered the scene with McDonald and police on Pulaski Road.

Torres testified that McDonald was trying to walk away from cops, and that he heard more gunfire after McDonald fell.

“Why the F are they still shooting him if he's on the ground?” Torres recalled saying.

McDonald’s story has been marked by tragedy. He was born to a teenager mother and his father was absent from his life. For most of his 17 years, he’d been a ward of the state and bounced between relatives’ homes.

When he was 3 years old, child-protective officials took him from his mother after officials allegedly found evidence of neglect. He was put into a foster home—which would soon be investigated for abusing McDonald, according to one CNN report.

McDonald was then placed at a relative’s home for seven months, before he was moved to his great-grandmother’s home and then back with his mother. After the state determined McDonald was being abused by his mother’s boyfriend, McDonald was again placed into foster care.

His great-grandmother, Goldie Hunter, would become his legal guardian in 2008, CNN reported. She died in the summer of 2013, when McDonald was 15. In January 2014, McDonald was arrested for marijuana possession and placed in juvenile detention until the following May.

A Chicago Tribune investigation McDonald had learning disabilities and was diagnosed with mental-health issues including post-traumatic stress disorder.

Hunter said McDonald would “normally get arrested 2-3 days a week” but didn’t believe cops were “picking on him,” according to a court record reviewed by the Tribune.

McDonald’s mother, Tina, was working to get custody of him just before he died. McDonald and his younger sister were living with an uncle, the Tribune reported.

One month before the fatal shooting, McDonald was enrolled in an alternative school. The principal of the school, Thomas Gattuso, said McDonald never got into any trouble and had good grades: As and Bs.

“It takes a while to get a life back on track,” Gattuso said in November 2015. “With Laquan, we unfortunately never got to finish his story.”

On Monday, the defense focused on McDonald’s troubled background.

“When he first came in, he was really agitated. Yelling, screaming, swearing. He wasn’t happy at all that he was taken into custody,” Joseph Plaud of the Cook County’s Sheriff’s Office testified, adding that McDonald was intimidating another detainee.

Miguel DeJesus, an employee of the Cook County Juvenile Detention Center, recalled a January 2014 episode where McDonald was allegedly under the influence of PCP and threatened to beat him up.

McDonald swung and hit DeJesus, and a rapid response team rushed in to move McDonald to another room, the guard testified.

Tyler Sage, another employee, testified about an April 2014 incident where McDonald was “violently resisting” officers trying to restrain him.