@jonathanolson suggested putting the core of the rectangle layout engine here in dot. See https://github.com/phetsims/bending-light/issues/265 @jonathanolson or @samreid can work on it at their leisure.