aditeyabaral/gpython

Verification of Plots and Equations

Opened this issue · 7 comments

Some equations do not support plotting. These equations are of the form y n = f(x).
It would be great if these plots can be added somehow!

$ python3 Plotter.py 
Enter function : (3*x+5)**0.1

This is working fine.
[P.S- Please correct me if I've misunderstood yn = f(x).]

Hello,
If you take the example of a circle at Origin given by x 2 + y2 = r2, then the application requires an input as a function of y, hence it would turn out to be y = sqrt(r2 - x2). Plotting this would only return an incomplete circle.
This issue would arise for all even powers due to the nature of the function (as well as 3D plots). It would be great to find a workaround, or maybe even a different algorithm that handles all cases!

Just an addition to this -
This can be obtained using the numexpr library. It can be used to evaluate expressions and can be used to remove the eval function used in the current implementation. Check here for more details.

As far as I can see, the only generic approach is to evaluate the LHS and RHS separately or in parallel (if possible) and then equate and pick the values that do satisfy. However any other workaround is appreciated.

I'd like to take up this issue, and replace eval with numexpr

Alright sure

@aditeyabaral I want to contribute

@aditeyabaral I want to contribute

@ritwikchakraborty123 this issue is currently being handled by @Chakita, please contribute to another issue