```
library(tidyverse)
library(interp)
x = c(runif(500), 0,0,1,1)
y = c(runif(500), 0,1,0,1)
triangles(tri.mesh(x = x,y = y)) |>
as_tibble() |>
mutate(i=1:n()) |>
rowwise() |>
mutate(tri = list(
tibble(x=x[c(node1,node2,node3,node1)],
y=y[c(node1,node2,node3,node1)]))) |>
unnest('tri') |>
ggplot() +
geom_polygon(aes(x=x,y=y,group=i,fill=i), show.legend=FALSE) +
scale_fill_viridis_c(option='F') +
theme_void()
```