This little code (slightly changed for my purpose) worked nicely for me, thanks a lot !
But to go a step further ... does anybody know how to randomly rotate elements in a similar way ? i've tried a Geom::Transformation.rotation but as it's my first try in ruby, i've no idea of whats going wrong