#### duran can

##### Member

Like this video

GML:

```
gpu_set_ztestenable(true);
gpu_set_zwriteenable(true);
w=600;
h=600;
size=4;
vertex_format_begin();
vertex_format_add_position_3d();
vertex_format_add_normal();
vertex_format_add_texcoord();
vertex_format_add_color();
vertex_format = vertex_format_end();
vbuffer = vertex_create_buffer();
vertex_begin(vbuffer, vertex_format);
var iof=0;
for (var i = 0; i < w; i += size) {
var jof=0;
for (var j = 0; j < h; j += size) {
jof+=0.1;z[i,j]=noise(iof,jof,1);
}
iof+=0.1;
}
for (var i = 0; i < w; i += size) {
for (var j = 0; j < h-size; j += size) {
if ((i % (size*2) == 0 && j % (size*2) == 0) || (i % (size*2) > 0 && j % (size*2) > 0)) {
var color = c_blue;
} else {
var color = c_white;
}
vertex_add_point(vbuffer, i, j, z[i,j], 0, 0, 1, 0, 0, color, 1);
vertex_add_point(vbuffer, i + size, j, z[i,j], 0, 0, 1, 0, 0, color, 1);
vertex_add_point(vbuffer, i + size, j + size, z[i,j], 0, 0, 1, 0, 0, color, 1);
vertex_add_point(vbuffer, i + size, j + size, z[i,j+size], 0, 0, 1, 0, 0, color, 1);
vertex_add_point(vbuffer, i, j + size, z[i,j+size], 0, 0, 1, 0, 0, color, 1);
vertex_add_point(vbuffer, i, j, z[i,j+size], 0, 0, 1, 0, 0, color, 1);
}
}
vertex_end(vbuffer);
```