Dynamically corrected gates from geometric space curves