avwhite / phplotter Goto Github PK
View Code? Open in Web Editor NEWA School project. A tool for generating graphs(images) from functions written as strings
License: BSD 2-Clause "Simplified" License
A School project. A tool for generating graphs(images) from functions written as strings
License: BSD 2-Clause "Simplified" License
The test userinterface is shit at the moment, make it better. ;)
cfunc assumes correctly formatted expressions(except for unkown characters, it ignores those). There should be error handling.
Results in a division by zero error. Since it is a part of the graph drawing, it might be a little tricky, since graph drawing is also whats shows the error.
At least it seems that way. Haven't had the time to investigate further.
The plotter should draw connected lines instead of spots.
This gets more complicated when you consider undefined areas in the function. This should probably first be implemented after cfunc gets support for undefined values.
Right now that axis are just lines.
The trigonometric functions are the most important.
Even when accounting for the fact that division by 0 isen't handled properly, by doing 1/(x+1).
It just gives a straight line at y=0.
You should be able to choose x-min, x-max and y-min y-max values, that decide what part of the graph is drawn.
The scaling functionality will still be needed, but the amount of scaling will be calculated by the difference between the x/y-min/max values, instead of set by the user.
The tokenizer function in cfunc.php does not handle decimal numbers.
I think it has something to do with the tokenizer not properly recusively handling the brackets.
Right now, when evaluation a function. Things like division by 0 can happen. It is quite important to handle this, as drawing graphs is all about throwing a bunch of numbers after a function, and none of them must make it crash.
So the evalu method should ba able to return some kind of 'not defined' value.
Also, the draw function should be able to handle this.
Draws through x coordinates for which f(x) is undefined, if the function dosen't excatly hit the undefined value.
This is a hard problem, and i might not be able to solve it before hand in.
plot.php should be able to draw a very simple graph, scaling atleast on the x-axis.
drawing one point per pixel in the x axis is okay, no line between them is required for this issue.
Right now there is only scaling on the x-axis, the y-axis always goes from 0 to 500.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.