Caerlaverock Castle is theorized to have been built in a triangular layout to allow a tower to be built at each corner to aid in its defence. However, some historians believe the castle has 3 sides due to the shape of the underlying bedrock.