compute data for curves of ranks 0-3