3.2 Drawing in interactive mode

Another method is interactive mode, where Asymptote reads individual commands as they are entered by the user. To try this out, enter Asymptote’s interactive mode by clicking on the Asymptote icon or typing the command asy. Then type

draw((0,0)--(100,100));

followed by Enter, to obtain the above image.

At this point you can type further draw commands, which will be added to the displayed figure, erase to clear the canvas,

input test;

to execute all of the commands contained in the file test.asy, or quit to exit interactive mode. You can use the arrow keys in interactive mode to edit previous lines. The tab key will automatically complete unambiguous words; otherwise, hitting tab again will show the possible choices. Further commands specific to interactive mode are described in Interactive mode.