Carlson’s sublime 170 not out was the jewel in the crown of Glamorgan’s 462 for four as he and captain Cooke (133 not out) shared an unbeaten club record fifth-wicket stand of 307.
Earlier in the day, Marnus Labuschagne (77) and Billy Root (45) also recorded a century partnership as Northants' bowling attack, minus the injured Gareth Berg, toiled.
The Welsh side go into Wednesday's final day leading by 247 runs and will hope to bowl 10-man Northants out on the final day to seal what would be a shock victory
Overnight batsman Labuschagne and Root had an untroubled first hour against the County's depleted seam attack.
Australian star Labuschagne smashed 276 for Glamorgan’s second team against Northants IIs last week and looked in effortless form again which was summed up by a superb drive through mid-on for four.
It forced the visitors to introduce spin option Simon Kerrigan into the attack. Labuschagne went to his 50 from 76 balls with eight fours thanks to a cut boundary from the bowling of Ben Sanderson.
Labuschagne’s sublime on-drive for four took his and Root’s partnership past the three-figure mark with the latter more restrained but equally comfortable.
Labuschagne looked completely untroubled and his shots grew increasingly aggressive so it was a surprise when he was clean bowled by Luke Procter for 77 when looking to leave.
Root followed him in the same fashion and in the same over when he chopped on for 45 attempting to play a cut shot when the ball was too close to his body.
Carlson and Cooke took Glamorgan past Northants' first-innings total of 215 and into the lead after lunch as they built on their top order’s good work.
Carlson did edge Kerrigan for four between wicketkeeper and slip, but he and Cooke were otherwise untroubled even though there were two brief stoppages for rain.
Carlson went to 50 from 81 balls with seven fours, but after the second break he was dropped off his own bowling by Rob Keogh who delivered nine overs with Berg on the sidelines.
Soon, Carlson and Cooke’s partnership was worth 100 with the latter bringing up his 50 from 87 balls. Glamorgan went to tea on 295 for four and in control.
Northants took the new ball for the third session, but Carlson remained unperturbed as he went to his third century of the season from 151 balls with a four off Procter through the leg side.
Cooke was criminally dropped on 79 off the bowling of Sanderson by Kerrigan at point which summed up the visitors’ day.
It allowed the Glamorgan wicketkeeper to reach three figures on his own from 186 balls with just four fours.
His team also went well past 400 in the final session as both batsmen opened up with an overnight declaration possible.
Scores - day three
Northants first innings: 215-9 (Zaib 50, Thurston 48)
Glamorgan first innings: 462-4 (Carlson 170no, Cooke 133no, Procter 3-77)