Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Verification of Plots and Equations #1

Open
aditeyabaral opened this issue Oct 4, 2020 · 7 comments
Open

Verification of Plots and Equations #1

aditeyabaral opened this issue Oct 4, 2020 · 7 comments
Assignees
Labels
bug Something isn't working good first issue Good for newcomers hacktoberfest help wanted Extra attention is needed

Comments

@aditeyabaral
Copy link
Owner

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!

@aditeyabaral aditeyabaral added bug Something isn't working help wanted Extra attention is needed good first issue Good for newcomers hacktoberfest labels Oct 4, 2020
@ajayjha5899
Copy link

$ 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).]

@aditeyabaral
Copy link
Owner Author

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!

@aditeyabaral
Copy link
Owner Author

aditeyabaral commented Oct 4, 2020

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.

@Chakita
Copy link

Chakita commented Oct 4, 2020

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

@aditeyabaral
Copy link
Owner Author

Alright sure

@ritwikchakraborty123
Copy link

@aditeyabaral I want to contribute

@aditeyabaral
Copy link
Owner Author

@aditeyabaral I want to contribute

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers hacktoberfest help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants