In-place curves calculation