Creating a form where hemisphere transforms to rectangle

I’m currently learning to use Grasshopper and I’m currently trying to model where one sphere in the middle joins to two hemispheres and the hemispheres transforms to rectangular shape (and it’s covered with the glass box but that’s not the problem).

The problem is that I actually don’t know how to model it with the Grasshopper. I have tried metaballs and and with those i can model three spheres but I don’t how to transform the metaballs on sides to hemispeheres or is it even possible to do with metaballs.

And after that I have to figure out how to transform those hemispheres to rectangle shape but I don’t how to to do it eather.

I’m glad if anyone could help me with my problem. Even if you can link a youtube or something that could help me with my problem I would be glad!