This commit is contained in:
Miloslav Ciz 2022-08-26 15:56:35 +02:00
parent 1ee777f79d
commit 0498a337bb
4 changed files with 15 additions and 13 deletions

View file

@ -51,3 +51,4 @@ Triangles also play a big role e.g. in [realtime](realtime.md) [3D rendering](3d
**Winding** of the triangle says whether the ordered vertices of the triangle go clockwise or counterclockwise. I.e. winding says whether if we were to go in the direction *A -> B -> C* we'd be going clockwise or counterclockwise around the triangle center. This is important e.g. for [backface culling](backface_culling.md) in computer graphics (determining which side of a triangle in 3D we are looking at). Determining of the winding of triangle can be derived from the sign of the z-component of the [cross product](cross_product.md) of the triangle's sides. For the lazy: compute *w = (y1 - y0) * (x2 - x1) - (x1 - x0) * (y2 - y1)*, if *w > 0* the points go clockwise, if *w < 0* the points go counterclockwise, otherwise (*w = 0*) the points lie on a line.
[Sierpinski triangle](sierpinski_triangle.md) is a [fractal](fractal.md) related to triangles.