To answer the question regarding the author's purpose in comparing each "mast and spar" to a certain idea, you can use the following phrases as placeholders:
- "prison-bar"
- "create a sense of entrapment"
So, the completed sentence would look like this:
The author’s purpose in comparing each "mast and spar" to a prison-bar, is to create a sense of entrapment.