#include "stars.h" #include using namespace std::chrono; using std::vector; using std::string; using std::cin; using std::cout; using std::cerr; using std::clog; using std::endl; template static constexpr inline T polar_r(const T x, const T y) { return sqrt(x*x*.1f+y*y*.1f); } template static constexpr inline T polar_t(const T x, const T y) { return atan2(x,y); } struct SkyDesc { struct colorYCbCr { double Y, Cb, Cr; constexpr png::rgb_pixel toRGB(); } starColor, nebulaColor; double starFreq, starElev; }; static SkyDesc lao_listao(double x, double y); static SkyDesc lao_salao(double x, double y); static SkyDesc lao_kuronao(double x, double y); static SkyDesc lao_kofao(double x, double y); static SkyDesc lao_sulao(double x, double y); static SkyDesc lao_vollilao(double x, double y); static SkyDesc lao_jafao(double x, double y); static SkyDesc lao_karlao(double x, double y); static SkyDesc lao_lalao(double x, double y); static SkyDesc lao_nalao(double x, double y); static SkyDesc lao_filao(double x, double y); static SkyDesc lao_islao(double x, double y); png::image genStarMap( float xmin, float ymin, float width, int tileSize) { const static int DAYS=864, DPL=DAYS/12; const static std::array table_offsets = { 0, DPL, DPL*2, DPL*3, DPL*4, DPL*5, DPL*6, DPL*7, DPL*8, DPL*9, DPL*10, DPL*11 }; static std::array contribution_func; png::image image(tileSize,tileSize); for (size_t x = 0; x < x_vals.size(); ++x) { for (size_t y = 0; y < y_vals.size(); ++y) { auto r = polar_r(x_vals[x],y_vals[y]), t = polar_t(x_vals[x],y_vals[y]); } } }