Curve-based diagram specification and construction