Posted 24 April 2017 - 07:53 AM
So I believe I had mentioned a while back (I wasn't very adept at coding) that I was working on a little graphing API called GraphKit. I unfortunately stopped working on it due to a lack of motivation, mainly caused by some peculiar bug in my rendering function that dissatisfied me to the point of… well, giving up. I didn't touch it for the last few months, and suddenly today I had the urge to work on it again. However this time I wanted to Ask A P…Bro.
First, the installer I made for it:
Now, Here's a breakdown of the issue:
On lines 70-101 is the function that is the cause of the issue. (called render)
As a test, I would suggest trying to graph a parabola.
1. Click Graph
2. Type in the equation (x*x) and press enter
3. type the name of the graph and press enter
4. select a color (Ex: red, green, blue. See "tocolor" API in the ".gkitprog" folder for more colors). Press enter
At this point you should see the graph show up on your screen. It should look like a parabola (shocker). You can also move around the graph by clicking "Move" and selecting the X/Y coordinates you want to move to. Everything should be working fine up until now…
Let's get to the problem. Cubic Graphs. Use the following tips as shown above for the parabola, except on step 2 use x*x*x, and on step 4, pick a different color than you parabola for viewing ease.
Everything should look perfectly normal initially, but they are not. Move the graph to X: 0, and Y: 36. You should see the parabolas sides, and then the cubic functions line in between it. Now move to X: 0, Y: 37.
Yeah, that's an issue… "Where the hell did the cubic graph go!?" ~Pissed off bagel, circa September 2016
It's so peculiar that the cubic graph just disappears off the face of the earth after that point, but the parabola still remains. Like I said above, lines 70-101 are where I believe the issue is. I beg of someone to have a jaunt through my (albeit bad) script, and just give me a heads up on what I am not doing here that would resolve this issue.
Thanks in advance,
~Your friendly Bagel
First, the installer I made for it:
pastebin run YivSuLQK
Then to run, just run "GKitProgram", this is my (incomplete) bodge of a program that would use the APINow, Here's a breakdown of the issue:
On lines 70-101 is the function that is the cause of the issue. (called render)
As a test, I would suggest trying to graph a parabola.
1. Click Graph
2. Type in the equation (x*x) and press enter
3. type the name of the graph and press enter
4. select a color (Ex: red, green, blue. See "tocolor" API in the ".gkitprog" folder for more colors). Press enter
At this point you should see the graph show up on your screen. It should look like a parabola (shocker). You can also move around the graph by clicking "Move" and selecting the X/Y coordinates you want to move to. Everything should be working fine up until now…
Let's get to the problem. Cubic Graphs. Use the following tips as shown above for the parabola, except on step 2 use x*x*x, and on step 4, pick a different color than you parabola for viewing ease.
Everything should look perfectly normal initially, but they are not. Move the graph to X: 0, and Y: 36. You should see the parabolas sides, and then the cubic functions line in between it. Now move to X: 0, Y: 37.
Yeah, that's an issue… "Where the hell did the cubic graph go!?" ~Pissed off bagel, circa September 2016
It's so peculiar that the cubic graph just disappears off the face of the earth after that point, but the parabola still remains. Like I said above, lines 70-101 are where I believe the issue is. I beg of someone to have a jaunt through my (albeit bad) script, and just give me a heads up on what I am not doing here that would resolve this issue.
Thanks in advance,
~Your friendly Bagel