soo recently I was making a math plotter, and I managed to make functions like the parabola, the sine function and something like that. But I don't know how to change the string into a desiarable function type,

For example If I want a function of x^2 and enter a string through the function parameter, How do I interpret it through the vertex array?