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.
 
 
 

36 lines
824 B

  1. //
  2. // Lol Engine - Sandbox program
  3. //
  4. // Copyright: (c) 2005-2011 Sam Hocevar <sam@hocevar.net>
  5. // This program is free software; you can redistribute it and/or
  6. // modify it under the terms of the Do What The Fuck You Want To
  7. // Public License, Version 2, as published by Sam Hocevar. See
  8. // http://www.wtfpl.net/ for more details.
  9. //
  10. #if HAVE_CONFIG_H
  11. # include "config.h"
  12. #endif
  13. #include <lol/engine.h>
  14. using namespace lol;
  15. int main(int argc, char **argv)
  16. {
  17. ivec2 size(128, 128);
  18. if (argc > 1)
  19. size.x = size.y = atoi(argv[1]);
  20. if (argc > 2)
  21. size.y = atoi(argv[2]);
  22. array2d<float> vac = Image::BlueNoiseKernel(size);
  23. for (int y = 0; y < size.y; ++y)
  24. for (int x = 0; x < size.x; ++x)
  25. printf("%d %d %f\n", x, y, vac[x][y]);
  26. return EXIT_SUCCESS;
  27. }