Let No One Ignorant of Geometry Enter
From Plato’s Academy to the Printed Page
Dmitry Baranovskiy traces the word “academy” to Plato’s school and interprets its legendary geometric entrance requirement as an invitation to mathematical understanding. He then uses the Van de Graaf canon to show why geometric construction once produced more accurate page margins than numerical measurement.
Paper Proportions and Ancient Precision
Baranovskiy constructs the square-root-of-two rectangle that underpins A-series paper sizes and preserves its proportions when halved. Babylonian calculations, irrational numbers, the Pythagorean theorem, and continued fractions reveal the sophistication and enduring influence of ancient mathematics.
From Root Rectangles to the Golden Ratio
Baranovskiy extends geometric construction to square-root-of-three rectangles and connects classical proportions to familiar screen formats. He derives the golden ratio, relates it to Fibonacci numbers, and demonstrates how JavaScript and modern CSS can calculate and visualize these patterns, including the golden angle.
Golden Myths and Infinite Spirals
Baranovskiy challenges exaggerated claims that the golden ratio governs famous buildings, artworks, and nature. He distinguishes quarter-circle approximations from true logarithmic spirals, explores their infinite form and finite length, and contrasts Jacob Bernoulli’s beloved curve with the Archimedean spiral mistakenly carved on his tomb.
Building Bézier Curves from Interpolation
Baranovskiy recounts how Paul de Casteljau and Pierre Bézier independently developed the curves now central to digital graphics. He builds quadratic and cubic Bézier curves from repeated linear interpolation, then applies them to SVG, CSS transitions, circle approximations, sinusoidal paths, and evenly parameterized animation.
Why CSS Matrices Have Six Values
Baranovskiy explains scaling, rotation, and translation as matrix multiplication and identifies why a two-by-two matrix cannot represent translation. Homogeneous coordinates add the missing coordinate, while DOMPoint and DOMMatrix expose the same mathematics directly through browser APIs and CSS-compatible matrices.
Lines, Intersections, and Points at Infinity
Baranovskiy moves from symmetry and reflection to representing lines in homogeneous coordinates. Cross products turn pairs of points into lines and pairs of lines into intersections, while points at infinity provide a practical representation of vectors and parallel-line intersections.
Brunelleschi, Perspective, and Geometry on the Web
Baranovskiy credits Filippo Brunelleschi with formalizing artistic perspective and shows how projection maps three-dimensional points onto a plane. He demonstrates vanishing points and depth using only matrices, straight lines, and SVG, then encourages developers to rediscover mathematics as a practical and enjoyable creative tool.
Good evening, everybody. It's nice to be a closing speaker for the day. It was quite a busy day with lots of great talks. Let's hope this one wouldn't be the worst one of all.
My history teacher used to tell me that If you want to start your conversation in a very good manner and sound smarter than you are, you have two ways, two starters: in ancient Greece and in ancient Rome. So, in ancient Greece, there was a tradition to, you know, celebrate heroes alongside with the gods.
So they have like parks and gardens in names of some gods and some prominent figures, but also about the heroes. And heroes in Greece were like just citizens who did like an awful lot for their city. And one of those heroes was AcademiUs. I don't think we know what he did, but there was a garden named in his name, AcademiUs gardens.
And that's where Plato made his school. For teaching geometry, among other things, which eventually was called Academia by the name of the region where it was placed. And the word Academia survived to our days, so we all use it every now and then. So Academia lives forever, even though nobody knows what he did.
That's just a small historical lesson. And on the gates of this school, supposedly, was written This, at least the myth goes like that, this was written. I tried to recreate roughly what it was, how it was written back there, because that's how Greeks were writing there. Any Greek here, any Greek speaking person?
No? Oh, good, so nobody can catch. Nobody could catch me online. So it says, I wouldn't say what it says, but it says if you translate it in English, Let no one ignorant of geometry enter. Basically means if you suck, get out. No, I don't think it means that.
I think it means that you should actually understand what geometry is. And obviously for Plato, geometry means more than what we understand under this word now. It's not about circles and squares and connecting them around. I think geometry was what we understand under the word mathematics in general. So it's an important piece.
To talk about geometry and why it's important for us as developers nowadays and how we even connect to ancient Greeks, that's probably what I'm trying to do today. Once I was trying to make margins for the printing page and since I'm not a very good designer, I decided that, well, I don't need to think what margins should be, I better find the formula. So I looked around, found this is a very known Wanda Graf Canon of media well Canon for the margins and how they should be calculated to make the book look really nice.
So I decided, okay, well, I just employ whatever people smarter than me did before. So I decided, okay, let me calculate it. Unfortunately, because I'm lazy developer like most developers, I didn't read to the end of the article and start calculating all these margins because yeah, this is nice way of drawing it, but when I have to put it into my InDesign or whatever software you use, I need to put actual numbers and this is not very handy with the numbers. So I started writing how to calculate all this, how to find the actual margins in numerical way rather than geometrical way.
And it's just one-ninth of the page, actually. And that's actually a good example of when you think, why they didn't just write one-ninth? Well, they wrote in the article, I just haven't finished reading, but why they use it? Well, the reason is because if you give two people, one people, you give one person, you give One nymph and another person you give the actual scheme and give them ruler and compass to draw.
The guy with the ruler who was using this scheme will actually do much better and precise job and faster. Because when you start measuring, you actually lose a lot in precision. And when you're drawing the lines and cross them, you get much more precise things. So for the guys who are using rulers, the original way was much better than using one nymph.
And for us, digital people, this is much, much better way than using things. So geometry is important and understanding geometry is important. That's it. Thank you very much. Okay, so let's talk about proportions. So I'll start with the pages. Let's talk about pages a bit more.
So obviously, proportion square is a great proportion, one to one. Nothing beats that. Then you draw a diagonal of the square, which length will be square root of two. Then you drop it down and you have another rectangle, which proportion is square root of two. And it's very famous rectangle because if you could divide it in half, you get the rectangle of the same proportion.
And you keep dividing, you will keep getting the same rectangles. And that's where our paper formats are coming from. So the Pages A4, A3 and so on are built using this proportion because it's convenient because you can divide them in half. Not any proportion can be like that, but some can be, well, one, the only one proportion can be, and this is the one.
It's very interesting standard because area of A0 is exactly one square meter. And then you divide it in half, in half, in half, in half, and you arrive to A4. I have troubles when I was trying to explain to my American friends and explain them the dead paper. And they asked, so what's our paper format based on?
And I'm like, nothing. Okay? They're just based on nothing. They were upset. Okay. Our paper format is based on geometry. Okay? Square root of 2 going down all the way to whatever, about 1700 BC. So this is a little clay fragment actually shows how to calculate the square root of 2.
So 1700 BC, it's like, it's very long time ago, right? It's like almost 4,000 years ago. And the funny thing that they use, it's from Babylonian area, so they used to have hexadecimal, sexagesimal system for calculations, so base 60.
And if you think, what a crazy idea is where they use base 60, well, you use base 60 when you're counting time and degrees of the angles. That's actually legacy of the Babylonian math. Surprise, surprise. And they use this formula, it's written there, trust me, or don't trust me, but that's what it is.
It's written there that the square root of 2 or diagonal of a square is roughly equal to this number. For comparison, actual square root of 2 equals roughly this number. So the difference between those is roughly this. Meaning, if you decide to build a fence of one kilometer wide, kilometer per kilometer, and you decide to use this ancient formula to calculate the amount of fence you need for diagonal, then you will make a mistake about one centimeter.
So that's how precise these calculations go. Isn't it amazing? Well, square root of two is had a lot of other interesting stories like the Pythagoreans tend to believe that everything is rational in the world and everything could be expressed as a rational number.
And one guy named Hypatius, he proved that square root of 2 is irrational. So they put him on board, sent him to sea and drowned him there. So he wouldn't tell anybody. And that's why this Proof that square root of 2 is irrational is probably the most famous proof in the math history right now.
So it's irrational means it goes on forever, this never ending, like when people say, oh, pi goes on forever, any irrational numbers goes on forever, square root of 2 goes on forever, and it's just diagonal of a square. How cool is that? There are other interesting clay pieces, like this one, for example, which is about the same age.
It shows Pythagorean theorem. Pythagoras lived 500 BC. So it's like about 1000 years before Pythagoras, there was a Pythagorean theorem. Just so you know, that's how life goes. Somebody invented Pythagorean theorem, somebody give it a name.
But I don't blame Pythagoras. He was a cool guy. He probably invented a lot of other things. So how to calculate square root of 2? Well, one way is to use this infinite fraction, continuous fraction, sorry. And you can see the pattern here, like at the left there is always 2 going down, except for the first number.
And you can stop at any point and it will give you estimation of square root of 2. Estimation because nobody knows what square root of 2 actually is. So if somebody asks, what is square root of 2? Nobody knows. Because you can only get an estimation. I could give you an estimation square root of 2, but I can't give you exact answer.
That's a bit of mathematical thing, but anyway. So this is how you can calculate square root of 2. Nobody does it this way, but ancients probably did. We are lucky. We have JavaScript. So we could just get square root of 2. From here, this is as much precision as we get actually. So it's also not exactly equal to square root of 2, but it's good approximation, good enough for our needs.
That's as much code we have in my slides, so enjoy by the class. What next? Square root of 2 is a great proportion, it's a great format, but obviously there is more. And one of them is obviously to draw another diagonal over here. And let it drop.
And that we have square root of 3, rectangle. And it's very useful. You can also divide it in 3 equal parts, so with the same proportion. And it's actually quite useful if you do anything with the equilateral triangles, because you can see how they will fit into this proportion very nicely. Maybe not a coincidence that our screen format 16:9 is actually very close to this proportion.
Proportions are important for, especially very important for ancient people, but they're important for us as well. So when you choose, I don't know, any rectangular elements on the page, that probably makes sense to make sure that they are somehow aligned with the classical proportions because then they look nicer. Not because they have magical feature, but because they just look nicer for us since we've grown up on looking at rectangles like that.
And that's why those rectangles look good for us, other way. Square root of 3 has its own continuous fraction, and you can see how we have now 1 and 2 kind of flipping. So that gives us another way to finding the square root of 3 more precisely. What will happen if we keep looking at this infinite fraction and we decide what will happen if I just replace all digits with 1?
Will it be some interesting number, huh? Something like this. Let's call it phi. And we just put all the ones. Will it be an interesting number? Yes, it will be a very interesting number. Otherwise known as the golden proportion. So what is golden proportion?
If you have a segment and you divide it in proportion a and b, Then the relation of A plus B to A is the same as relation to A to B. So relation of the whole to the biggest part is the same as relation of biggest part to the smallest part. And we call it phi because we like Greek letters because Greeks were awesome about 1,000 years ago.
I mean, they feel good, I guess. So how to find the actual phi? We can just solve this equation, write it A equals Bphi using the second equation, then substitute it in the first equation, we got this, then we can get B out, then we get remove the B, we have this fraction, now we multiply both sides by phi and we have this square equation which has these roots.
So we only care about positive roots, so this is the value of the Golden section. That's what people use all the time everywhere. You will see it over and over and over again. It's a magical number. It's divine proportion. It's have a lot of bullshit to its name, but it's just a nice number to be honest. It's roughly equal to this 1.618.
It's used, you can see it in Fibonacci numbers. So everybody knows Fibonacci numbers because it's famous. Interview question, write a function to compute the Fibonacci number. And Fibonacci number, yeah, for those who for some reason doesn't know, the next number is equal to sum of the two previous numbers. And how it's connected to golden ratio at all?
Well, actually, there is a trick. I used it in the interview once, which upsets my interviewer to the death. When he asked me to calculate the nth number, I knew the formula and the formula is this. So nth Fibonacci number equal round of phi in power of n divided by square root of 5.
So you could just calculate any number instantly without calculating all the preceding numbers. So it really ruined the interview because we can't talk about recursion, we can't talk about memorization, we can't talk It's just like, ah, anyways. So just for fun, here's the CSS version of finding the Fibonacci number.
Because we can now, right? Because CSS is so powerful nowadays. We can calculate things. It works. You can test it out. I mean, I'm not sure how it will perform, but it works for small numbers. It works pretty well. Another interesting code for Fibonacci number we can use to find the golden angle. So the golden angle here in the comments it's roughly 137.5 degrees and help us to package items in a nice compact way. It's something you can see when you look at the sunflower seeds. They are in this particular pattern which you can calculate using this interesting algorithm. So if you run this code, you will get something like this. It's used in visualizations.
I use it. I use this visualization. I saw some other people use it in many other places. So this where the golden section suddenly pops up as well and could give you some nice visual visuals for whatever reason you need. Maybe just want to draw flowers. That's also works. It's very serious thing like it's used in Art very seriously. There are books written on these proportions and how you divide the page in different lines, different lines and different proportions.
And some people take it very seriously. I do not, but you're free to take it seriously. You can read these books. I'm not saying they're bad, but some people go crazy and say, oh, everything is golden section everywhere, golden proportion everywhere. Look at this. Buildings, they use golden proportion.
Look at pyramids. See, golden proportion. If you look at this spiral, you actually will notice that it's actually squeezed just to match the photo. Not to mention that position of the Sphinx is actually depends on the way the photographer is standing. But it's golden proportion, no problem. It's divine. Everything is divine proportion.
Look, divine proportion everywhere. All the nature is pierced through divine proportion. Seriously, stop it. And golden spiral. See, golden spiral. There is no golden spiral. Well, there is golden spiral. And we can draw a golden spiral with something like this.
Like this. Yeah, so you cut the square of the page, cut and cut and cut and cut and cut. And then you draw like this quarter circles. But quarter circles don't make a spiral because in this particular point, the curvature changes rapidly and spiral should be smooth. And this is not a spiral. Well, this is a spiral.
And this is not a golden spiral. This is just logarithmic spiral. It's just one of many logarithmic spirals. It's a family of spirals. Talking about spirals. I just love spirals because they're cool. So the logarithmic spiral is the most famous spiral of all because we see it all the time.
And the cool thing about logarithmic spiral, it's infinite. So if we try to zoom in, then we can go forever and really enjoy this talk. This is the best talk you ever see. Sorry, I should try it. It goes like this forever. We are not spinning it.
I'm actually zooming it to make this animation. And you can see it goes on and on and on. So it's also called a equiangular spiral because it's very much dependent on the angle of the tangent. And if we cut the spiral up to this level and unroll it, then it actually has a finite length.
So that's for any calculus student, it doesn't cause any questions, but when I give it to designers, they will like blown away. So it's infinite, but it's finite length. Meaning if I ask you to draw, it will take you forever, but I know exactly how much ink you need. Yeah, don't come close, then it wouldn't be puzzling you.
But I thought it's a nice, it's a nice touch. So the angle of the tangent to the spiral, which you draw from the radius, always the same, no matter where you put it. That's why it's called equiangular. And this angle also defines the spiral. So if we change the angle, we can see all the families of spirals all around the place.
So, angle is actually the only thing that defines this type of spirals. So it's fascinating. One of the biggest fans of the spirals was Jacopo Bernoulli, who called it the wonderful spiral. And he was so fascinated that he asked to engrave on his GravThump, the spiral and this Latin saying, Idem mutata resurgo, which means I will rise again the same but changed.
Because the spiral, no matter what transformation you apply to them, they still stay spirals. And that's what makes you happy. Unfortunately, and that's where design collides with math. The graver didn't do the good job because this is not a logarithmic spiral. This is actually Archimedean spiral.
In this spiral, the steps between each loop is the same, and it's not infinite at all. When you zoom in, you just zoom in. It's used a lot, like in compact disks, for example, and in this grammar, I don't know, Venn diagram kind of things, whatever they called. There are lots of spirals.
I love spirals. I can talk about, I can give a special talk just about spirals, but I don't have time. So if you want to talk about spirals, talk to me. I love to talk about spirals. This is a order spiral, Fermat spiral, I love the spirals, whatever. Move on. Talking about curves, I can't not talk about Bezier curves, right? Who doesn't like nice Bezier curve in the morning?
And to talk about Bezier curve, I cannot just give a credit where it takes and talk about who actually invented Bezier curves. And surprisingly, it's not just one person, kind of. So, Sergei Bernstein is a Soviet mathematician. I'm really happy to mention him because he was teaching in the uni in my city way before I was born, but nevertheless, I have some connection at least because two other guys, just French guys, I don't know them.
So Paul, the Castel Jew, is the guy who actually invented Bezier curves, but because he was working for Citroen, and Citroen was very, you know, secret, they didn't want to tell about this, so he didn't patented the his invention. He even didn't talk about his invention. And then Pierre Bezzi just about a year later invented the same curves, but he was working for Renault, so he patented them, published them, and they gave their name, his name.
That's how it works, guys. So share your knowledge, otherwise you will be like poor CastorJewel. We get CastorJewel algorithm to calculate Bezicurve, so at least some credit was given. But nevertheless. So, bezier curves, easy as that. We do the linear interpolation between two points. I just quickly try to fill the gap.
So I have four points, alpha beta gamma delta, because I started from Greeks, so Greek names. And if I do linear interpolation between alpha and beta, I will move along this line like this. Yes, so I have some value t and it's somewhere between. Then I could get the same for beta gamma and then I connect these points of interpolation themselves in and interpolate along them as well. So it's like second level of interpolation.
And if I draw all the points when I interpolate through, then I will get quadratic bezier curve. And if I continue this and put another level on top of it, so I draw gamma delta line. And now I connect this point and then I connect that point. So I get, like, next level of interpolation and go through all of them. Then if I draw again these points, then I will get a cubic Bezier curve.
And I don't really need to stop here. I can go more and more and more and more, deeply and deeply and deeply. But usually cubics are just fine for our needs. Well, quadratics. Actually also fine, but cubics are fine too. Most of the curves you see on the screen, all of the curves you see on the screen are Bezier curves, including all the fonts you see. So it's kind of important think of the geometry.
So quickly going through. So we have a function a, which is linear interpolation between alpha and beta, which I could calculate like 1 minus t times alpha plus t times beta. Then I have function b between beta and gamma. Then I have, I will go faster, sorry, I don't have time to go through this.
I have c for gamma delta. And then I could have function d, which is the same, but now I put the functions a and b and interpolate between their values. If I open the, substitute them and open the brackets, I got this formula, which is actually formula of quadratic Bezier curves. And if I go one level deeper and open these brackets, then I will get this formula, which is called cubic Bezier curve.
And now you see why it's called cubic, because it has cubes. It's okay if you don't understand this, you don't have to. But you understand this. So I can have linear interpolation function which interpolates between A and B with some parameter t, and I can use this simple function to calculate any point on Bezier curve by just nesting it three times in. This is not the best performance-wise way to calculate Bezier points, but it works.
And it explains how simple it is. It's actually just a bunch of linear interpolations. We use bezier curves everywhere in SVGs and in CSS for transitions and for just clip paths. Clip paths are basically the same as SVGs. For transitions, for some reason, use only four numbers there. Well, that's because it's going from 0, 0 and 1, 1.
So we just have two handles to move. Mentioned, otherwise other two are just fixed in the thing. We use Bezier curve to draw other shapes, like for example circles. The problem is that Bezier curve cannot draw a circle. You can only approximate a circle with Bezier curve. So that looks pretty good, but it doesn't match.
If I zoom in, you will eventually see that it's not actually matching the circle, especially in the middle. But it's All the circles you see on the screen drawn with four Bezier curves usually. So how to calculate this length of the handles? So if I know the radius of a circle, how can I find the handles length so I can draw a circular arc?
Well, if you just multiply radius by this and you get the circle arc. If you need not 90 degrees, but some varied arc theta, then this convenient formula, which is easy to remember and you can use to calculate it anytime. I needed recently to calculate the Bézier curve to find the sinusoid.
So I have a sinusoidal wave and I need to express it through Bézier curve. And surprisingly, I was Googling it and can't find anything about it. So I have to invent. Here's my invention. If you want sinusoidal to represent as a sinusoidal curve, then your points should be this.
And this will give you a sinusoidal curve. If you want a more precise, then you could calculate for the water of the sinusoidal and but the points looks much much more uglier and harder to remember but nevertheless. Nevertheless. And one thing to remember if you animate a long bezier curve especially if it's a straight line you should understand that straight line when your anchors are actually matching the starting and ending points would give you a busy curve where the points are not spread equally and it's important to put them on one third from each side to give a extra spread, like normal spread of the points.
If you want to learn more about busy curves, I really recommend you to watch this video by Freya Holmer. If you haven't watched it, you're up for the treat. If you have watched it, you should rewatch it because it's just great. Let's move to transformations. Transformations. Is what we do most of the time with the things we have CSS transformations, we have other transformations.
But in the nutshell, it's matrix multiplication. So we have X and Y points and we multiply it by matrix, ACBD, and we have new point and tada, we have transformed point. Unfortunately, they have the problem. If you can scale with this two by two matrix, you can rotate with this two by two matrix.
But you cannot translate this two by two matrix because it sucks. But we use it all the time, right? We have span, transform, translate, rotate, scale. Or we just use one matrix to do all the things above. But hey, look at this matrix. It doesn't have four numbers, it actually have six, which is a completely weird number of parameters.
So why six? Let's talk about homogeneous coordinates. So homogeneous coordinates, it's just coordinates where we add extra value. So we have x, y, we add w. w for WTF. Why the hell is there? So let's try to figure out.
So it's not the z, it's not extra dimension, it's just extra value here. Well, X, Y, W. Okay. But then we have three numbers, and now we can have this three by three matrix. And now we can have enough numbers to perform this. So, if you look at this, I just translated this into mathematical language.
It looks like this. We just multiply the three matrices together, and we got new matrix. Back, it's all working now. If you notice the right column on all four matrices is 0, 0, 1. That's why usually we don't really bother about this right column and we only work with first two columns. That's why matrices in CSS has only six values.
Actually, there are nine values, but we just kind of ignore the last three because it's always kind of the same. It's not always the same. But we assume it's always the same, right? Because it creates our problems for the future, that otherwise life would be hard and boring. We actually have an API in JavaScript in your browser, right, for this. So we have a DOM point.
The DOM point actually have x, y, and w as parameters. And you can create DOM points, you can create DOM metrics, and you can multiply metrics by a point to get the new point. So this API is over there, right there. You don't need to include any libraries, just in the browser, which is pretty cool. I don't know who ever used this API.
Oh, somebody uses API. Look, it's not useless at all, apparently. So you can create a matrix and you can apply the same, it's the same transformation. So I translate, rotate, and then I scale. And then if I log and to string, it actually give me the CSS notation for this matrix. So it's pretty useful.
So what is a homogeneous coordinate again? So homogeneous basically say that we grab any x, y coordinate from Cartesian plane and we just add 1. And that's the same coordinate. And when we have x, y, w, we just divide by w and we return back to Cartesian space. Just as easy as that. Most of the time w is 1.
And then it's very easy, but sometimes it's not. So it means that the points 2-1 and 10-5 are not the same, but points 2-1-1 and 10-5-5 in homogeneous space are actually the same point. So if you divide by 5 the right bracket, then you will get the same point on the left.
And that helps us to create these matrices now, which actually And now we can translate, and that actually works. And as you can see again, the right column is always 0, 0, 1. That's why in CSS we sort of put it down. A bit on symmetry, I need to say. So symmetrical transformation is any transformation where the difference between two points stays the same. So not just the butterfly effect, it's symmetrical transformation.
Translation is symmetrical transformation. Rotation is symmetrical transformation. So let's be technical here. And all these are symmetrical transformations. The only thing that for scale, it should be SX and SY should be 1 or -1. Then everything is symmetrical. If you want to reflect something, if you have line ABC and you want to reflect in line ABC, this easy formula helps you to reflect.
Nobody is writing down. Okay. The interesting thing that I said line ABC because in homogeneous space you can define line also as three numbers A, B and C like this. This is the equation of the line in homogeneous space and we can define it just as vector of two or three numbers. So if we could define line as lambda ABC then we have points P1 and P2, like XYW, then if I do cross product of these two points, I will get the line, which is very convenient.
So if you have two points in homogeneous coordinates, you just cross product them and you get line which goes through two points. Cool. So basically, lambda is this. If you forgot what is cross product, which you should probably, you should, if you remember, you're scary. Okay? This is what it looks like. And opposite also works.
If I have two lines and I cross product them, I get the coordinates of the points at which they are crossing. Pretty cool. What will happen if they are parallel? No. If the lines are parallel and I find the point of the intersection, I get something, right? What is it? How does it even make sense? Well, I get something like this.
Where w is equal to 0. And that's a very interesting concept in homogeneous coordinates because this is a point at infinity, which doesn't make sense. It helps us to figure out, but if we add two points in homogeneous space, we got third point, which makes sense. And this point will be in the middle, like a midpoint. Between those two.
If we subtract two points, then we get a vector or point at infinity. If you multiply point by the number, we get still a point, nothing changes. If we add two vectors to points at infinity, we get the third vector. And if we subtract vectors, we got the vector which is subtracted.
And we multiply vector, we scale the vector. So basically, You can trade points at infinity as vectors, and all vector math is working. So you can add them, you can subtract them, you can multiply by scalar. It all works the same way, which makes it very convenient for any math if you need to work with vectors, unless you don't need to work with vectors.
Then your life is boring. So let's talk about perspective. And let's move all the way to Florence. This is the biggest brick dome in the world, which was built in 15th century by Filippo Brunelleschi, the famous architect and artist.
So it's an engineering miracle and if you ever I have nothing to do in the evening, just Google about how it was built and why it's a miracle. But we don't talk about Dom. We talk about Filippo Brunelleschi and his other invention. As a real Renaissance man, he wasn't just an architect and builder, he was an artist and he invented perspective, surprisingly.
If you look at paintings before Brunelleschi, there is something missing in these paintings. And they already say perspective three times, so it's easy to guess what is missing. You would think the right picture is actually older than the left one, which is not true. Actually, there are two centuries between these pictures, and the left one is actually older than the right one, surprisingly.
But you can see that perspective is missing equally. In all the pictures. And if you look at images after Brunelleschi, they look something like this, where clearly the artist knew what he was doing. It's surprising how it's just 15th century, not so long ago. So before people didn't know how to draw perspective. So what is perspective?
Basically we have a point V and the plane, which we define as a normal N. And we just project from this point race and see where they land on the plane. The point, however, could be at infinity. That's where homogeneous coordinates are very helpful because we can actually work with these points and define them and perform operations like there is nothing extraordinary about them.
And basically the formula to calculate the matrix which will transform your 3D coordinates into coordinates on the plane is like this. Yeah, if you open it up, it's like this. Make a screenshot, you will need it. Oh, maybe not. But it's useful, so you can look at the, you can grab something simple as a square and put it in a 3D space and then apply some perspective to it.
Oops, sorry. Sometimes click sometimes doesn't. Apply perspective to it and have like pointed and finite, you have parallel perspective. Then you put point closer and apply the same transformation. You have the full illusion of 3D, 3D moving around. And it works for parallel lines.
So parallel lines actually, when they applied through this matrix transformation, get to the point which is actually quite visible and real. So the point where they connect is actually particular point on the screen, but when you go here, it actually goes to infinity, and you still can operate with these points without losing your sanity in homogeneous coordinates. So I really like them.
And obviously, you can have all these different points of vanishing points where the lines go back and forth, and so on and so on and so on. So it's very useful. For some who play this perspective. But I don't know, I feel like it's quite fun that I just draw this. Well, for the record, it's all drawn in the web page and it's not using any 3D library, just plain matrices transformations and straight lines.
It's all in SVG. So I hope I opened a bit of the door into the mathematical things and maybe inspire some of you to refresh some of the mathematical knowledge you obviously get in high school and forgot because you don't need it. It's actually, take it from me, it's actually way more fun to come back to math now than it was back in high school.
And there are lots of interesting stories and interesting ideas which you can discover now again and actually enjoy. So Thank you very much.
People
- Plato
- Pythagoreans
- Hippasus
- Jacob Bernoulli
- Sergei Bernstein
- Paul de Casteljau
- Pierre Bézier
- Freya Holmér
- Filippo Brunelleschi
Technologies & Tools
- Adobe InDesign
- JavaScript
Standards & Specs
- A-series paper
- CSS
- SVG
- CSS transforms
- DOMPoint
- DOMMatrix
Concepts & Methods
- Van de Graaf canon
- sexagesimal system
- irrational numbers
- Pythagorean theorem
- continued fraction
- golden ratio
- Fibonacci numbers
- golden angle
- golden spiral
- logarithmic spiral
- Archimedean spiral
- Fermat spiral
- Bézier curves
- de Casteljau algorithm
- linear interpolation
- matrix multiplication
- homogeneous coordinates
- Cartesian coordinates
- cross product
- perspective projection
Organisations & Products
- Academy
- Citroën
- Renault
Geometry has always been the silent architect of art, design, and technology —
from ancient Greek thinkers to the work of Newton.
In this talk, we’ll trace a surprising lineage of ideas, from proportions and
perspective to spirals and symmetry, and see how they still shape the way we
design and code for the web today.
You’ll leave with a new appreciation for the invisible mathematics behind
creativity — and maybe even the urge to explore it yourself.















