A psychiatrist was "tortured and left for dead" in a "homophobic" attack at a city park, a jury heard.
Lee Strickland, 36, Jason Edwards, 25, and a girl, 16 at the time, have admitted the manslaughter of Dr Gary Jenkins and robbery, but deny murder.
Dr Jenkins, 54, died 16 days after the attack in Bute Park, Cardiff, on 20 July, Merthyr Tydfil Crown Court heard.
He had "encountered the worst traits of human kind", according to Dafydd Enoch QC, opening the prosecution's case.
Mr Enoch said Dr Jenkins had been "viciously beaten, robbed, tortured and left for dead by the three defendants in the dock".
He said they were motivated by "greed, homophobia and a straightforward liking of violence".
Mr Enoch told the court the three defendants had been "in search of vulnerable gay men who were in the park" to rob.
The teen was described by witness Lewis Williams, who tried to intervene to stop the beating, as "evil" and "sadistic", Mr Enoch said.
The court heard Dr Jenkins pleaded for his life but the defendants laughed as they carried out the attack.
The jury was told Dr Jenkins had been married and had two daughters but separated from his wife and was openly bisexual when he moved back to his home city of Cardiff about six years ago.
He used to go to Bute Park in the early hours, "looking for sexual contact with like-minded men", said Mr Enoch.
He told jurors that his "sexual predilection would be his undoing" and he was an "easy target" as he wandered around the park.
The court heard that three defendants had met on Queen Street and eventually made their way to Bute Park, to a place near the Summerhouse cafe, known to be where gay men met to have sex.
They engaged in conversation with one man but eventually left him alone.
Mr Enoch told the court the attack on Dr Jenkins was witnessed by another man who said he saw two men and a girl shouting at and kicking a man on the floor.
The man had said they were pulling at Dr Jenkins' bag and laughing saying, "take his bag, get his bag".
He ran to get help and returned to find the attack ongoing with Dr Jenkins "beaten senseless".
Jurors were told they would see various CCTV footage showing the defendants, including Jason Edwards, from Cardiff, and the girl hugging as they left each other after the attack.
The girl, now 17, cannot be identified due to legal reasons.
Dr Jenkins' injuries included fractures to his skull, bleeding on the brain and severe bruising.
Jurors were told to prepare themselves as they looked at photos of the injuries, with Mr Enoch telling them "it's important that you see how these people left this man".
A post-mortem examination gave his cause of death as blunt head injury, including bleeding on the brain.
Mr Enoch told the jury they would hear "chilling" evidence from the audio of a CCTV camera at the cafe where Dr Jenkins could be heard begging for the attack to stop.
The teenage defendant, Mr Enoch said, could be heard shouting "money" at Dr Jenkins.
"He pleads over and over and again until he can speak no more. He then moans and grunts as he's cruelly beaten and the life is kicked out of him."
He added: "Edwards says, 'Stamp on his head, stamp on his head'. There's homophobic abuse.
"[The youth] at the end is heard saying, 'Yes, I needed that'."
Mr Enoch said the defendants were "indulging in sport" and that Mr Strickland, of no fixed address, left the park following the attack and went to a garage and used Dr Jenkins' debit card to buy alcohol.
The trial continues.