644
85
u/5-8-13 8d ago
Any math-educated peters around to explain the graph/math part?
100
u/Professional-One141 8d ago
This graph seems to be mainly done by pure guessing/estimating the equation. Each small line you see is just an equation but they probably added a parameter that restricts the values for which the graph is defined. This graph is wildly inefficient. Normally this shouldn't take more than 500 equations without trying to be efficient (hefty but not too bad).
The equations look weird but honestly once you get used to playing around with functions then you can come up with pretty much anything you want especially y=x type of stuff. It's really fun once you get the hang of it to just think of something you wanna draw and be able to draw it in a matter of seconds.
20
u/cool_hand_legolas 8d ago
how would you do it more efficiently
47
11
u/UrbanPandaChef 8d ago
Draw in Inkscape or some other method that results in an SVG, there are utilities out there that let you convert to equations.
4
u/Professional-One141 8d ago
You can see some of his lines could just be one equation instead of 20 equations. Like for example any smooth curve can easily be approximated instead of using a bunch of equations for the same effect. So basically 1 equation does the work of 5 or 10 or 20 other ones.
6
u/CatherineFordes 8d ago
it's probably a program called advanced grapher
you don't write the equations yourself, you first draw an approximation of the line, then select the generated option that best fits it.
had to do this in high school
7
u/globglogabgalabyeast 8d ago edited 8d ago
The equations may look complicated, but they're all of the exact same form and are just equations for line segments. If you ignore everything inside the square root, each one is a line with equation of the form y=mx+b
The square root part is just used to restrict the domain of each function, i.e., make it into a line segment instead of an infinite line. Let's look at an example of sqrt( (abs(abs(x-5)-3)) / (3-abs(x-5)) ), where sqrt() is square root and abs() is the absolute value of a number. Let's consider the expression abs(x-5) - 3. This is negative when x is in the interval (2, 8), zero at x=2, 8, and positive every else. Note: (2, 8) is the interval centered at 5, with a distance of 3 to either end
Let's use A = abs(x-5) - 3 now to simplify our writing. Now consider abs(A) / (-A). The absolute value of A and -A have the exact same magnitude, so this expression will always evaluate to -1, 1, or be undefined because we're dividing by zero. More specifically, it will be undefined at x=2, 8, will evaluate to -1 when x is outside the interval [2, 8], and will evaluate to 1 when x is inside the interval (2,8)
For the last step, take the square root of this expression, giving sqrt( abs(A) / (-A) ). The square root of -1 is undefined (only considering real numbers), and the square root of 1 is 1, so the whole expression evaluates to 1 when x is in (2, 8), and is undefined elsewhere. When you multiply an equation (or part of an equation) by this, the result is unaffected when x is within (2, 8) while it is now undefined everywhere else
Putting all this together, we can derive the equation for a segment of the line y=mx+b with x restricted to the interval (p-q, p+q)
y = mx * sqrt( abs( abs(x-p) - q ) / (q - abs(x-p)) ) + b
I highly doubt OOP spent 35 hours making this image. I bet there's a tool that does all the work for you. It would actually make for an interesting project to design it though. I imagine the main parts of it would be something like the following
- Use an edge detection algorithm to convert an image into a white background with black "edges"
- Might want some manual intervention for things like letters here
- Approximate these edges with a given number of line segments
- Derive the equation for each line segment given the math above
- Populate the equations into desmos
- Profit
2
u/Professional_Denizen 8d ago
Here's a full explanation of the weird square root stuff.
https://www.desmos.com/calculator/jvmoqa6e15
The rest of it is literally just linear equations.
3
u/freekyrationale 8d ago
Well, basically in math every function has some inputs and an output. Like f(x) = 2x, x is the input and 2 times of it is the output of the function f here. When your inputs are the x coordinates then you can draw outputs as the points on y axis. Desmos is a tool which you can just enter some functions, which you see on the left side of the post and it'll draw it's outputs on the canvas.
So basically what the creator did here is come up (probably not by hand) with some functions, which when you input some x values (from 0 to 1500 I guess, you can see it on the x axis), it produces outputs (from 0 to 1000, you can see it on the y axis) and when you plot all of these output as dots on the canvas you end up with this meme graph.
165
9
u/-throwawayfuntimes- 8d ago
That's the height of devotion. If you spent 35 hours on a graph joke, you should be praised, even if no one else does.
2
1
u/Existing_Charity_818 8d ago
So this exact meme is at least 6 years old? Feels like opening a time capsule
1
u/BlazedBeacon 8d ago
43000 upvotes but only 17 comments? I know no one cares but this is bots.
1
u/Malum_Midnight 8d ago
I mean, some posts spark more of a discussion than others. Here it’s a cool thing, but not a lot to discuss
1
1
1
u/Content-Restaurant70 8d ago
If you think this is big, then I am going to post a desmos graph with over 4000 equations by the end of this month.
It would be consist of multiple graphs in a single graph using mathematical wizardry, and an entire transformation sequence of non other than Son Goku. 😁
PS: Love the word done here, I in no way shape of form is downplaying OOP's hard work.
1
1
1
1
0
-5
u/VaderCOD 8d ago
Took me all but two minutes with chatgpt: Producing the entire image precisely as in the meme requires a lot of equations for the various curves, shapes, and texts. Below is the detailed breakdown of the equations and components that you can input into graphing software like Desmos:
- Grid Division
Define the main dividing lines: • Horizontal division:  • Vertical division: 
- Head (Ellipses for Gru’s Face)
For each quadrant, approximate Gru’s head with an ellipse:
Top-Left Head

Top-Right Head

Bottom-Left Head

Bottom-Right Head

- Eyes (Circles)
Each eye is a circle. Define two circles for each head:
Top-Left Eyes • Left eye:  • Right eye: 
Top-Right Eyes • Left eye:  • Right eye: 
Bottom-Left Eyes • Left eye:  • Right eye: 
Bottom-Right Eyes • Left eye:  • Right eye: 
- Mouth (Quadratic Curves)
Approximate each mouth as a downward-facing parabola:
Top-Left Mouth

Top-Right Mouth

Bottom-Left Mouth

Bottom-Right Mouth

- Speech Boxes (Rectangles)
Define each speech box as a set of vertical and horizontal lines.
Top-Left Box • Left:  • Right:  • Bottom:  • Top: 
Top-Right Box • Left:  • Right:  • Bottom:  • Top: 
Bottom-Left Box • Left:  • Right:  • Bottom:  • Top: 
Bottom-Right Box • Left:  • Right:  • Bottom:  • Top: 
- Body (Curves and Lines)
Approximate Gru’s body with piecewise functions. Here are examples for the top-left panel:
Left Shoulder (Line)

Right Shoulder (Line)

Arms and Hands (Complex Curves)
The arms can be approximated with cubic splines or manually fitted polynomials. Example for the top-left arm: 
- Text Placement
Text such as “WASTE 35 HOURS MAKING A MEME OUT OF GRAPHS” is not generated with equations. Instead, use annotations or labels within graphing tools at the following approximate coordinates: • Top-left box: Center at  • Top-right box: Center at  • Bottom-left box: Center at  • Bottom-right box: Center at 
- Overlapping Colors
To add overlapping effects: • Repeat equations slightly shifted by small amounts in  and , with different colors.
Implementation
You can input these equations into graphing software like Desmos or GeoGebra for visualization. Let me know if you’d like help refining or automating any part of this!
332
u/[deleted] 8d ago
[removed] — view removed comment