You are browsing as a guest. Sign up (or log in) to start making projects!

Ship #1

Hi i made a tool, that i named Graphler. It can:
-plot 2 graphs
-find the intercept of these graphs
-animate both of the graphs if you want them to be animated
-find the global maximums and minimums of these graphs.
I used a little bit of Ai for debugging purposes.
I hope you enjoy the project.
I made this project, because we started focusing on functions a lot more in school and i hate sketching them on my own.
The quality of live improvements: Graphs, intercepts, maximums and minimums.

Try project → See source code →
Open comments for this post

46m 36s logged

I added an animation function using a clever tool called .after(). It basically updates something after a given amount if time. I just converted the locations given to me from the eval() function to pixel locations and created circles that update every millisecond and that creates an effect of an animation. I also added an ‘‘clear’’ button because i can’t just reset the animations as i can with the normal plot function.

0
0
2
Open comments for this post

1h 28m 14s logged

So i added a minimum nd aximum functions for both equations. If you press the corresponding button it creates a dashed line through the global maximum/minimum of the function. Here’s how it works: First apoint gets selected. Than it checks if the point is bigger than an another point that is a pixel away from that point. If the next point is bigger, the next point becomes the fiirst point essentially. The code does that until the next point is smaller than the current point and it stores that point as max_y. Than it continues until it finds yet another point whose next point is smaller than the point. The code than chcecks if this point’s bigger than max_y and if it is than this point becomes max_y. And so on till it checks the entire function.

0
0
2
Open comments for this post

1h 3m 20s logged

Ive added a second equation therefore a 2nd graph. After yuo plot the graph you can find the intercept of the 2 graphs. This took a lot of a shorter time to make and i happy about that. It shoes that im getting more accustomed to tkinter and programming in general. Also i think the code to find the intercpet is pretty neat so im going to paste it in  for pixel_x in range(450):        x = (pixel_x - 450/2) / k        try:            y1 = eval(rovnica1)            y2 = eval(rovnica2)            rozdiel = abs(y1-y2)            if rozdiel < najmensi_rozdiel:                najmensi_rozdiel = rozdiel                priesecnik_x = pixel_x                priesecnik_y = 225 - (y1 * k)        except:            continue 

0
0
1
Open comments for this post

46m 24s logged

Before thisi worked on the project for an another hour but it didnt get allocated to my project. Im working with support to get that fixed. During these @ hours or so i finished the model UI im going to add a lot more functions and buttons also i moght add an anmiation.

0
0
5

Followers

Loading…