Alan Bromborsky - 2023-03-16

Aside from the graphics structures and functions is there a listing of the differences between Asymptote code and C code other than the graphics calls. Three I have found is that -

C-code: real a[4] = {1,2,3,4};
Asymptote-code: real[] a={1,2,3,4};

C-code: complex z;
Asymptote-code: pair z;

In addition Asymptote can slice arrays and has built in data types such a "triple."

The reason for my question is that sympy/python has a code generator for C-code that with some minor modifications should be able to generate Asymptote code for functions to be plotted. I have attached the html file for a Jupyter/python/sympy notebook where I am plotting in the notebook using Asymptote. In this case I am plotting curves from my piece wise function class (I wrote an Asymptote code generator for that class) but wish to generalize the method to other functions to be plotted. The graphics commands would be inserted as shown in the notebook.