The heart-shaped figure, called a cardioid by mathematicians, does not exist in the picture at all except by implication.
The red circles, which we identify with the heart, are not the cardioid, but they approach it from the inside.
The black lines, which we call the prison, approach the cardioid from the outside.
The cardioid itself gets squeezed between the circles and the lines, and in this sense the circles are as much part of the prison.
At the same time, the lines define the cardioid by forming a tangential envelope just as much as the circles define it.