partial port of beam model (need to port VisibleColor and figure out gradient paint)