Skip to content

Commit 49baad9

Browse files
committed
add(/wiki/quad-indices): stubbed article with diagram
1 parent 4a0bbbb commit 49baad9

File tree

2 files changed

+563
-3
lines changed

2 files changed

+563
-3
lines changed

content/wiki/quad-indices/index.md

Lines changed: 35 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,44 @@
11
+++
22
title = "Quad Indices"
33
description = "The basic pattern of indices for quads made of triangles."
4-
draft = true
54
[taxonomies]
65
categories = []
76
tags = ["meshing"]
87
+++
98

10-
> The basic pattern of indices for quads made of triangles.
9+
A **quadliteral** (also called **quad**, **tetragon** or **quadrangle**) is a four-sided polygon, with four corners/vertices and four edges/sides.
1110

12-
{{ stub_notice() }}
11+
Unfortunately, GPUs/rasterizers generally only deal with triangles,
12+
so we'll have to split each one of our quads into two triangles...
13+
resulting in two of the vertices being duplicated.
14+
15+
Since we don't like pointless duplication, we ought to use an **element/index-buffer**,
16+
which tells the GPU how to assemble two triangles from four vertices each.
17+
18+
But how do we assign/number/order the four vertices?
19+
20+
{% figure(caption="**Diagram of Winding Orders:** Clockwise, Counter-Clockwise, Z-Order, N-Order",author="Lars Longor K",license="CC0",class="full") %}/wiki/quad-indices/windings.svg{% end %}
21+
22+
## Clockwise Winding
23+
24+
{{stub_notice(kind="section")}}
25+
26+
## Counter-Clockwise Winding
27+
28+
> The opposite/inverse of clockwise order.
29+
30+
{{stub_notice(kind="section")}}
31+
32+
## Z-Order Winding
33+
34+
{{stub_notice(kind="section")}}
35+
36+
## N-Order Winding
37+
38+
> The opposite/inverse of Z-order.
39+
40+
{{stub_notice(kind="section")}}
41+
42+
## References
43+
44+
- <https://en.wikipedia.org/wiki/Quadrilateral>

0 commit comments

Comments
 (0)