visualizations

Programmatic visualizations
git clone git://git.laack.co/visualizations.git
Log | Files | Refs | README

main.c (613B)


      1 #include "raylib.h"
      2 #include <stdlib.h>
      3 #include <time.h>
      4 #include "draw.h"
      5 
      6 #define VERTICES 100
      7 #define EDGES 1000
      8 
      9 int main(void)
     10 {
     11 
     12     srand(time(0));
     13     InitWindow(5120, 1440, "Raylib background animation window");
     14 
     15     while (!WindowShouldClose())
     16     {
     17         Vertex* vertices = gen_vertices(VERTICES);
     18         Edge* edges = gen_edges(vertices, VERTICES, EDGES);
     19         BeginDrawing();
     20         ClearBackground(BLACK);
     21         draw_edges(edges,EDGES);
     22         draw_vertices(vertices,VERTICES);
     23         EndDrawing();
     24         free(vertices);
     25         free(edges);
     26     }
     27 
     28     CloseWindow();
     29     return 0;
     30 }