Generate mandelbrot images using many clustered computers
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 lines
678 B

  1. #ifndef TYPES_H
  2. #define TYPES_H
  3. #define MIN(X, Y) (((X) < (Y)) ? (X) : (Y))
  4. #define MAX(X, Y) (((X) > (Y)) ? (X) : (Y))
  5. typedef struct
  6. {
  7. char red;
  8. char green;
  9. char blue;
  10. } Pixel;
  11. typedef struct
  12. {
  13. int w, h;
  14. //double center[2];
  15. char cX_str[32000];
  16. char cY_str[32000];
  17. double zoomBase;
  18. long zoomExp;
  19. long maxIter;
  20. int batch;
  21. } Config;
  22. typedef struct
  23. {
  24. int w;
  25. int h;
  26. Pixel *buf;
  27. } FBuffer;
  28. #define ANSI_COLOR_RED "\x1b[31m"
  29. #define ANSI_COLOR_GREEN "\x1b[32m"
  30. #define ANSI_COLOR_YELLOW "\x1b[33m"
  31. #define ANSI_COLOR_BLUE "\x1b[34m"
  32. #define ANSI_COLOR_MAGENTA "\x1b[35m"
  33. #define ANSI_COLOR_CYAN "\x1b[36m"
  34. #define ANSI_COLOR_RESET "\x1b[0m"
  35. #endif