|
|
|
@ -24,27 +24,23 @@ void chapter1() {
|
|
|
|
|
struct Vertex *v16 = new_vertex(16, -2, 9); |
|
|
|
|
struct Vertex *v17 = new_vertex(17, 5, 5); |
|
|
|
|
|
|
|
|
|
// TODO: You may be able to change this back to normal as long as you're
|
|
|
|
|
// using -> to set the value on the struct. This is interpreted
|
|
|
|
|
// as (*thing).xyz so you are doing too much work on pointers
|
|
|
|
|
// in this.
|
|
|
|
|
add_vertex(&v0, &v0, &v1); |
|
|
|
|
add_vertex(&v0, &v1, &v2); |
|
|
|
|
add_vertex(&v0, &v2, &v3); |
|
|
|
|
add_vertex(&v0, &v3, &v4); |
|
|
|
|
add_vertex(&v0, &v4, &v5); |
|
|
|
|
add_vertex(&v0, &v5, &v6); |
|
|
|
|
add_vertex(&v0, &v6, &v7); |
|
|
|
|
add_vertex(&v0, &v7, &v8); |
|
|
|
|
add_vertex(&v0, &v8, &v9); |
|
|
|
|
add_vertex(&v0, &v9, &v10); |
|
|
|
|
add_vertex(&v0, &v10, &v11); |
|
|
|
|
add_vertex(&v0, &v11, &v12); |
|
|
|
|
add_vertex(&v0, &v12, &v13); |
|
|
|
|
add_vertex(&v0, &v13, &v14); |
|
|
|
|
add_vertex(&v0, &v14, &v15); |
|
|
|
|
add_vertex(&v0, &v15, &v16); |
|
|
|
|
add_vertex(&v0, &v16, &v17); |
|
|
|
|
add_vertex(v0, v0, v1); |
|
|
|
|
add_vertex(v0, v1, v2); |
|
|
|
|
add_vertex(v0, v2, v3); |
|
|
|
|
add_vertex(v0, v3, v4); |
|
|
|
|
add_vertex(v0, v4, v5); |
|
|
|
|
add_vertex(v0, v5, v6); |
|
|
|
|
add_vertex(v0, v6, v7); |
|
|
|
|
add_vertex(v0, v7, v8); |
|
|
|
|
add_vertex(v0, v8, v9); |
|
|
|
|
add_vertex(v0, v9, v10); |
|
|
|
|
add_vertex(v0, v10, v11); |
|
|
|
|
add_vertex(v0, v11, v12); |
|
|
|
|
add_vertex(v0, v12, v13); |
|
|
|
|
add_vertex(v0, v13, v14); |
|
|
|
|
add_vertex(v0, v14, v15); |
|
|
|
|
add_vertex(v0, v15, v16); |
|
|
|
|
add_vertex(v0, v16, v17); |
|
|
|
|
|
|
|
|
|
init_ear(v0); |
|
|
|
|
|
|
|
|
@ -52,8 +48,6 @@ void chapter1() {
|
|
|
|
|
|
|
|
|
|
triangulate(v0); |
|
|
|
|
|
|
|
|
|
//print_polygon(v0);
|
|
|
|
|
|
|
|
|
|
free_polygon(&v0); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|