Linear and Nonlinear Topology Optimization with Morphing Beam Networks