#include #include "tectonics.h" #define X_RES 512 #define Y_RES X_RES int main() { cairo_surface_t *surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, X_RES, Y_RES); cairo_t *cr = cairo_create(surface); struct world_t world; create_world(&world, 1000); if (world.points == NULL) return 1; render_world(cr, &world); free_world(&world); cairo_destroy(cr); cairo_surface_write_to_png(surface, "output.png"); cairo_surface_destroy(surface); return 0; }