How to align 4 cylinders on the same plane and keep them upright

Hi everyone, please I need some help. I working on a school project to simulate 4 cylinders floating in water.
they have the following attributes:

  1. they are connected at their top so that they all float on the same level.
  2. the cylinders have poles passing through them, keeping them upright and they don’t topple over when rising. Please see a diagram to explain:
    image

So far my model isn’t showing these two. Please how can I align the 4 cylinders so they rise together and keep them from toppling over?

Please see the file here:
4 tethered cylinders to float.gh (47.1 KB) with @DanielPiker 's buoyancy script for the water.
I sincerely appreciate any help, I’ve been working on this for daysss :sweat_smile:
Also please forgive them messy script I’m still new to using this. happy to learn better ways of connection!

THANK YOU VERY MUCH PLEASE HELP!!