In what I think is the last set of diagrams and illustrations describing the fortifications of Ville de Québec, we have the reason why the overall design and construction were so difficult as well as why there are so many star-like bastions pointing out of the walls.
The difficulty comes from the topography. Québec was, as I mentioned earlier, described by Charles Dickens as the Gibraltar of North America. It features a high, defensible cliff and then a city on the lowlands below it. But building a wall that defends it from the cliffs to the river is not easy. Especially because the angles and slopes of the walls have to account for the fact that enemy cannon near Cap Diamant could otherwise see very well into the city below. And therefore target the city. But how drastic was the descent?
And then to point the second, why so many stars? Well, the problem with straight walls is that if you manage to get beneath the firing range of the cannon along the wall, the defenders really cannot fire at you. And that gives you all the time to plant explosives and blow a massive hole in the fortifications. So the stars actually give the defenders nearly a complete field of fire along the entirety of the city walls.
Credit for the pieces go to the graphics department of Parks Canada.