Is there an equation for a triangle?

preview_player
Показать описание


No, Mattim is not open source. But Manim is. And Geogebra is also free.

CORRECTIONS
- Nothing yet. Let me know if you spot any mistakes!

Filming and editing by Alex Genn-Bash
Plot animations by Matt Parker's terrible python code.
Actual maths animations by Sam Hartburn who used Geogebra like a professional.
Music by Howard Carter
Design by Simon Wright and Adam Robinson

MATT PARKER: Stand-up Mathematician
Рекомендации по теме
Комментарии
Автор

I was indeed annoyed. A pleasure as always, Matt.

PrimerBlobs
Автор

Loved the fact that Matt cares for all of his viewers to be equally annoyed.
This alone is a universal equation already!

jkobain
Автор

The Sign Function is perfectly legitimate. The history of math is littered with mathematicians making up functions as needed to complete a task. I was in the "obviously not" camp, but it turns out a triangle does have an equation!

ericeaton
Автор

The sign() function seems perfectly legitimate to me. I absolutely love that you found a solution. Of course, this 'create a formula from pieces where everything else zeroes out' is also how the full formula of the standard model in physics works. They simply shoved everything together, and what doesn't apply 'simply' becomes zero.

sander_bouwhuis
Автор

"... I think I've got an equation for a triangle, *sort* *of* "
The Parker Triangle jokes really write themselves huh

nightish_one
Автор

love to see matt expanding his own category of shapes: first the parker square and now he reveals the parker triangle

spegee
Автор

I think this method with sign functions now holds for plotting any arbitrary polygon, since you can just use more rays for each vertex. And probably any enclosed curve as we go towards infinity

ibrahimmusaddequrrahman
Автор

3:35 The phantom lines in the gradient appear to be a side effect of directly linearly interpolating sRGB (or HSL) color values. But sRGB values on a computer screen are logarithmic - for a correct linear gradient you need to do gamma correction. Finally to get perceptually smooth gradients you also need to take into account the fact green is brighter to the human eye (Y = 0.2126R + 0.7152G + 0.0722B).

Captain__Obvious
Автор

It’s incredible how you post such high quality content so frequently. Truly one of the best educational YouTubers out there.

distantsalutations
Автор

The way modern GPUs rasterize triangles is similar, using what is edge equations (the evaluation of that equations tell you which side you are and it can be done in parallel).

Tigrou
Автор

Suggestion - barycentric coordinates.

You have three ordinates, let's say u, v and w, and the constraint that u+v+w=1 (reducing the effective number of dimensions back down to two). Using an equation P=uA+vB+wC (where A, B and C are vectors for the triangle vertices), if you have 0 <= u <= 1, 0 <= v <= 1 and 0 <= w <= 1 then your barycentric co-ordinates describe a point on or inside the triangle boundary. Those three constraints aren't required, though, and allowing ordinates outside the 0 to 1 range gives a co-ordinate system for the infinitely extended plane containing those three vertices.

With the additional constraint that uvw=0 (at least one ordinate is zero) the effective number of dimensions is down to one and each point must be on the triangle boundary. For example if u=0 then the first constraint simplifies to v+w=1, so P=uA+vB+wC simplifies to some point along the line between B and C. Unfortunately, without the 0 <= u <= 1 etc constraints that means the infinite extended line between B and C, not just the line segment that's strictly between those points.

stevehorne
Автор

"No one minds that I was using the absolute value function" 11:15
Oh, I definitely mind, Matt. I definitely mind.

yuvalne
Автор

To avoid confusion between Sin() and Sign(), I always used the word "Signum" for the sign function, and abbreviate it as Sgn().

antonnym
Автор

I remember posting this exact question on math stack overflow a while ago, but I didn't get a good answer. Awesome to see you covering this topic!

encryptedmaze
Автор

This is such an important sponsorship that I came back to it a few times just to help (albeit just a tiny bit) in your viewer retention there :) Great video as always!!

ariellima
Автор

What if you did the triangle equation in polar coordinates? Then the triangle function is defined piecewise in three parts (as you might expect), and your rays are just the angle coordinate at which the pieces change. As a bonus, you get to use the sin() function, letting you riff in that direction as well as sign().

drewdavis
Автор

I went into this expecting the "Parker Square" of triangle formulas, but instead, was completely sold on the idea of a sign(x) function in mathematics being no weirder than the absolute value function.

Congrats! IMO, this equation qualifies as non-Parker!

MegaNardman
Автор

"Mine's not as good, this is MATTIM"
I love when he embraces the joke

mlkweed
Автор

I feel like the big difference for me between absolute value and sign(x) is that absolute value when plotted is continuous everywhere (but not differentiable at 0) but sign(x) has a jump discontinuity at 0

GrapefruitGecko
Автор

In case you want to hide your if statements even deeper in other mathematical functions:
abs(x) = sqrt(x*x) for x element Real

sign(x) = x / abs(x) for x ≠ 0

but remember, even if you hide your if statements like this, your function is still not easily differentiable, because decisions aren't. This topic plays a huge role in the backpropagation (training) of neural networks.

stox