cmd_drawparm Function (ROM Call 0x343)

AMS 1.01 or higher bascmd.h

void cmd_drawparm (CESI ExprList);

Executes TI-Basic 'DrawParm' command.

cmd_drawparm displays the Graph Screen and draws a parametric graph, using "t" as the independent variable. This function expects one of the following eight layouts on the expression stack:

END_TAG tstep tmax tmin y_expr x_expr
END_TAG tmax tmin y_expr x_expr
END_TAG tstep NOTHING_TAG tmin y_expr x_expr
END_TAG tstep tmax NOTHING_TAG y_expr x_expr
END_TAG tmin y_expr x_expr
END_TAG tmax NOTHING_TAG y_expr x_expr
END_TAG tstep NOTHING_TAG NOTHING_TAG y_expr x_expr
END_TAG y_expr x_expr

The parameter ExprList should point to the tag of the last item. x_expr and y_expr are the expressions for "x(t)" and "y(t)", which define the curve. tmin, tmax and tstep are floating point items which determine the starting value, the ending value, and the increment of the independent variable "t" which will be used for drawing. For example, to draw the curve defined by x=cos(t) and y=sin(t) where t varies from 0 to 2*pi in steps of 0.1, you can use the following code fragment:

push_Float (0.1);
push_Float (2. * PI);
push_Float (0);
push_parse_text ("cos(t)");
push_parse_text ("sin(t)");
cmd_drawparm (top_estack);
If the current graphing mode is not parametric, only the first layout is valid. Otherwise, the omitted expressions will be picked from the current settings of the "tmin", "tmax", and "tstep" system variables, which can be set using the "Window Editor" application.


Uses: ER_catch, ER_success, ER_throwVar, next_expression_index, push_expression, push_Float, push_quantum, top_estack, gr_active, StepCk, OSCheckBreak, is_transfinite, CptIndep, ForceFloat, GraphActivate, GrLineFlt, QSkipGraphErr


See also: cmd_drawpol, cmd_drawfunc