Mesh quads

from Red Blob Games
20 Jul 2019

Oskar Stalberg’s tweet[1] got me looking at quad subdivision from a Delaunay/Voronoi grid.

Quad mesh


Jitter: regions, cell shapes.

I did get quads but they’re not interesting. His quads are aligned because he starts with a triangle grid and subdivides it into quads, whereas I started with a non-grid and subdivided it. I should try it again with his approach.

Oskar’s code:

force = 0

for(i< 4){
 force += verts[i] - center
 force = (force .y,-force .x)
}

for(i < 4){
 forces[i]  += center + force - verts[i]
 force = (force.y,-force .x)
}

Also see this typescript implementation[2].

Email me , or tweet @redblobgames, or comment: