fix centered text, pre-generate stars and store in PROGMEM

pull/11/head
Dan Delany 2021-01-13 02:29:09 -08:00
parent b60bd6e66a
commit ce0fd4bbe7
2 changed files with 950 additions and 39 deletions

View File

@ -5,40 +5,36 @@
#include <Watchy.h> //include the Watchy library
#include <Fonts/FreeSansBold9pt7b.h> //include any fonts you want to use
#include "MadeSunflower39pt7b.h"
#include "stars.h"
#define STAR_COUNT 1300
#define STAR_COUNT 900
const int horizonY = 145;
const int starCount = 150;
const int horizonY = 150;
const int planetR = 650;
struct xyPoint {
int x;
int y;
};
struct Star {
int x;
int y;
int r;
};
Star stars[STAR_COUNT];
//Star myStars[STAR_COUNT];
void initStars() {
// printf("init stars\n");
// todo how to run this only once at startup? currently running every minute
// use srand because randomSeed() doesnt work on ESP32 (not stable)
srand(5287);
// The random star field is loaded from PROGMEM - see stars.h
// this is the function that was used to generate the stars in stars.h
// it does not run normally but can be used to re-generate stars with different parameters
// tweak as needed, call this function in init, open serial monitor, and paste the results into stars.h
srand(5287); // randomSeed() is not stable on ESP32, use srand
printf("const Star STARS[] PROGMEM = {\n");
for(int i = 0; i < STAR_COUNT; i++) {
int starX = (rand() % 260) - 30;
int starY = (rand() % 260) - 30;
int radius = rand() % 2;
if(i == 0) { printf("init %d %d\n", starX, starY); }
int radius = 0;
if (i > STAR_COUNT * 0.99) radius = 2;
else if (i > STAR_COUNT * 0.80) radius = 1;
else radius = 0;
stars[i] = { starX, starY, radius };
printf(" { %d, %d, %d },\n", starX, starY, radius);
// myStars[i] = { starX, starY, radius };
}
printf("};\n");
}
struct xyPoint rotatePointAround(int x, int y, int ox, int oy, double angle) {
@ -55,40 +51,42 @@ struct xyPoint rotatePointAround(int x, int y, int ox, int oy, double angle) {
class StarryHorizon : public Watchy {
public:
StarryHorizon() {
initStars();
// uncomment to re-generate stars
// initStars();
}
void drawWatchFace(){ //override this method to customize how the watch face looks
display.fillScreen(GxEPD_WHITE);
display.fillRect(0,0, 200, horizonY, GxEPD_BLACK);
drawTime();
void drawWatchFace(){
display.fillScreen(GxEPD_BLACK);
display.fillCircle(100, horizonY + planetR, planetR, GxEPD_WHITE);
drawGrid();
drawStars();
drawStars(STARS);
drawTime();
drawDate();
}
void drawGrid() {
int prevY = horizonY;
for(int i = 0; i < 40; i+= 1) {
int y = prevY + int(abs(sin(double(i) / 10) * 10));
if(y <= 200) {
display.drawLine(0, y, 200, y, GxEPD_BLACK);
display.drawFastHLine(0, y, 200, GxEPD_BLACK);
}
prevY = y;
}
int vanishY = horizonY - 25;
for (int x = -230; x < 430; x += 20) {
display.drawLine(x, 200, 100, vanishY, GxEPD_BLACK);
}
}
void drawStars() {
void drawStars(const Star stars[]) {
// draw field of stars
// rotate stars so that they make an entire revolution once per hour
int minute = (int)currentTime.Minute;
double minuteAngle = ((2.0 * M_PI) / 60.0) * (double)minute;
// printf("Minute %d\n", (int)currentTime.Minute);
// printf("minuteAngle %f\n", minuteAngle);
// printf("Minute %d, angle %f\n", (int)currentTime.Minute, minuteAngle);
for(int starI = 0; starI < STAR_COUNT; starI++) {
int starX = stars[starI].x;
int starY = stars[starI].y;
int starR = stars[starI].r;
// if(starR >= 2) { printf("%d %d, %d \n", starX, starY, starR); }
struct xyPoint rotated = rotatePointAround(starX, starY, 100, 100, minuteAngle);
if(rotated.x < 0 || rotated.y < 0 || rotated.x > 200 || rotated.y > horizonY) {
@ -104,8 +102,9 @@ class StarryHorizon : public Watchy {
void drawTime() {
display.setFont(&MADE_Sunflower_PERSONAL_USE39pt7b);
display.setTextColor(GxEPD_WHITE);
display.setTextWrap(false);
char* timeStr;
asprintf(&timeStr, "%d:%02d\n", currentTime.Hour, currentTime.Minute);
asprintf(&timeStr, "%d:%02d", currentTime.Hour, currentTime.Minute);
drawCenteredString(timeStr, 100, 115, false);
free(timeStr);
}
@ -114,27 +113,29 @@ class StarryHorizon : public Watchy {
String monthStr = monthShortStr(currentTime.Month);
String dayOfWeek = dayShortStr(currentTime.Wday);
display.setFont(&FreeSansBold9pt7b);
display.setTextColor(GxEPD_BLACK);
display.setTextColor(GxEPD_WHITE);
display.setTextWrap(false);
char* dateStr;
asprintf(&dateStr, "%s %s %d\n", dayOfWeek, monthStr, currentTime.Day);
drawCenteredString(dateStr, 100, 198, true);
asprintf(&dateStr, "%s %s %d", dayOfWeek, monthStr, currentTime.Day);
drawCenteredString(dateStr, 100, 140, true);
free(dateStr);
}
void drawCenteredString(const String &str, int x, int y, bool drawBg) {
int16_t x1, y1;
uint16_t w, h;
String myStr = str;
display.getTextBounds(myStr, x, y, &x1, &y1, &w, &h);
display.getTextBounds(str, x, y, &x1, &y1, &w, &h);
// printf("bounds: %d x %d y, %d x1 %d y1, %d w, %d h\n", 0, 100, x1, y1, w, h);
display.setCursor(x - w / 2, y);
if(drawBg) {
int padY = 3;
int padX = 10;
display.fillRect(x - (w / 2 + padX), y - (h + padY), w + padX*2, h + padY*2, GxEPD_WHITE);
display.fillRect(x - (w / 2 + padX), y - (h + padY), w + padX*2, h + padY*2, GxEPD_BLACK);
}
// uncomment to draw bounding box
// display.drawRect(x - w / 2, y - h, w, h, GxEPD_WHITE);
display.print(myStr);
display.print(str);
}
};

View File

@ -0,0 +1,910 @@
struct Star {
int16_t x;
int16_t y;
int16_t r;
};
// pre-generated random star field
// run initStars to re-generate with different params
const Star STARS[] PROGMEM = {
{ 158, 153, 0 },
{ 180, 217, 0 },
{ 229, 208, 0 },
{ 17, 153, 0 },
{ 115, 13, 0 },
{ 174, 78, 0 },
{ 27, 181, 0 },
{ 80, 15, 0 },
{ 105, 27, 0 },
{ 149, -5, 0 },
{ 12, 150, 0 },
{ 142, 88, 0 },
{ 79, 226, 0 },
{ 159, -19, 0 },
{ 219, 112, 0 },
{ 182, 97, 0 },
{ 167, 225, 0 },
{ 199, -2, 0 },
{ 191, 169, 0 },
{ 209, 24, 0 },
{ 28, 87, 0 },
{ 29, -18, 0 },
{ 66, 107, 0 },
{ 85, 182, 0 },
{ 29, -9, 0 },
{ 141, 108, 0 },
{ 185, -24, 0 },
{ 200, 193, 0 },
{ 135, 128, 0 },
{ 8, 66, 0 },
{ 19, 103, 0 },
{ 52, 74, 0 },
{ 203, -6, 0 },
{ 20, 42, 0 },
{ 59, 106, 0 },
{ -5, 213, 0 },
{ 29, 118, 0 },
{ 215, 85, 0 },
{ 67, 169, 0 },
{ 213, 212, 0 },
{ 15, 37, 0 },
{ 5, 79, 0 },
{ 78, 172, 0 },
{ 4, 138, 0 },
{ 35, 5, 0 },
{ 180, 170, 0 },
{ 61, -3, 0 },
{ 29, 53, 0 },
{ 156, 58, 0 },
{ 162, 38, 0 },
{ -26, 153, 0 },
{ 11, 183, 0 },
{ 76, 181, 0 },
{ -27, 14, 0 },
{ 195, 112, 0 },
{ -26, 185, 0 },
{ 76, 123, 0 },
{ 208, 106, 0 },
{ 123, 55, 0 },
{ 227, 115, 0 },
{ 105, 186, 0 },
{ 29, 14, 0 },
{ -10, 65, 0 },
{ 52, 112, 0 },
{ 56, -5, 0 },
{ 40, 176, 0 },
{ 42, 103, 0 },
{ 94, 33, 0 },
{ 194, 91, 0 },
{ 19, 174, 0 },
{ 121, -20, 0 },
{ 7, 141, 0 },
{ 50, 192, 0 },
{ 96, 113, 0 },
{ 40, -2, 0 },
{ 205, 31, 0 },
{ 64, 201, 0 },
{ 205, 99, 0 },
{ 181, 8, 0 },
{ 178, 138, 0 },
{ 196, 195, 0 },
{ -23, -8, 0 },
{ 89, 37, 0 },
{ 1, 96, 0 },
{ 59, 37, 0 },
{ 113, 85, 0 },
{ -8, 224, 0 },
{ 125, 30, 0 },
{ 131, 67, 0 },
{ -27, 85, 0 },
{ 6, -17, 0 },
{ 215, 175, 0 },
{ 193, -16, 0 },
{ 55, 156, 0 },
{ 119, 24, 0 },
{ 94, 165, 0 },
{ 207, 75, 0 },
{ 195, 137, 0 },
{ 33, 197, 0 },
{ 204, 134, 0 },
{ 59, 98, 0 },
{ 217, 142, 0 },
{ 36, 5, 0 },
{ 104, 218, 0 },
{ 176, 26, 0 },
{ 163, 33, 0 },
{ 91, 48, 0 },
{ 206, 219, 0 },
{ 114, -22, 0 },
{ 27, 98, 0 },
{ 61, 28, 0 },
{ 108, -21, 0 },
{ -8, 173, 0 },
{ 225, 3, 0 },
{ 68, 133, 0 },
{ 116, 188, 0 },
{ 38, 193, 0 },
{ -22, 126, 0 },
{ -8, 179, 0 },
{ 140, 157, 0 },
{ 205, 165, 0 },
{ 143, 98, 0 },
{ 148, 196, 0 },
{ 2, 81, 0 },
{ 49, 71, 0 },
{ 6, 117, 0 },
{ 74, -13, 0 },
{ 161, 208, 0 },
{ 183, 159, 0 },
{ 48, 107, 0 },
{ 72, -19, 0 },
{ 166, 19, 0 },
{ 172, 175, 0 },
{ 3, 55, 0 },
{ 18, 83, 0 },
{ -26, 107, 0 },
{ 58, 164, 0 },
{ 202, 162, 0 },
{ 13, 60, 0 },
{ 85, 86, 0 },
{ 211, 41, 0 },
{ 29, 155, 0 },
{ 144, 22, 0 },
{ -24, 90, 0 },
{ 161, 0, 0 },
{ 5, 153, 0 },
{ 115, 207, 0 },
{ 105, 104, 0 },
{ 124, 158, 0 },
{ 226, 138, 0 },
{ 65, 226, 0 },
{ 181, 191, 0 },
{ 151, -20, 0 },
{ 78, 142, 0 },
{ 149, 35, 0 },
{ 56, 74, 0 },
{ 50, 193, 0 },
{ -13, 121, 0 },
{ 16, 229, 0 },
{ 162, 128, 0 },
{ 36, 202, 0 },
{ 171, 132, 0 },
{ 144, 10, 0 },
{ 197, 114, 0 },
{ 83, 7, 0 },
{ 217, -17, 0 },
{ 218, 191, 0 },
{ 106, 81, 0 },
{ 0, -29, 0 },
{ 181, -25, 0 },
{ 2, 131, 0 },
{ 106, 172, 0 },
{ 39, 191, 0 },
{ 167, 133, 0 },
{ 13, 204, 0 },
{ 15, 214, 0 },
{ 129, 212, 0 },
{ -19, 187, 0 },
{ -23, 119, 0 },
{ 207, 69, 0 },
{ 134, 135, 0 },
{ 15, 137, 0 },
{ 19, 7, 0 },
{ -13, 96, 0 },
{ 105, 160, 0 },
{ 16, -11, 0 },
{ -2, 136, 0 },
{ 39, 160, 0 },
{ 45, 150, 0 },
{ -11, 5, 0 },
{ 76, 61, 0 },
{ -16, 223, 0 },
{ 109, 143, 0 },
{ 144, 94, 0 },
{ 69, 170, 0 },
{ -13, 163, 0 },
{ 141, -21, 0 },
{ 152, -24, 0 },
{ 44, 97, 0 },
{ 98, 57, 0 },
{ 201, -25, 0 },
{ 222, 120, 0 },
{ 132, 221, 0 },
{ 199, 47, 0 },
{ 64, 66, 0 },
{ 105, 201, 0 },
{ -12, -15, 0 },
{ -22, 77, 0 },
{ 59, 222, 0 },
{ 52, 159, 0 },
{ 28, 153, 0 },
{ 20, 83, 0 },
{ 90, 157, 0 },
{ 159, 81, 0 },
{ 99, -27, 0 },
{ -11, 161, 0 },
{ 194, -7, 0 },
{ 52, 196, 0 },
{ 156, 61, 0 },
{ 187, -10, 0 },
{ -22, 225, 0 },
{ 139, 10, 0 },
{ 95, 192, 0 },
{ 172, 86, 0 },
{ 220, 171, 0 },
{ 182, -11, 0 },
{ 8, 155, 0 },
{ -18, -9, 0 },
{ 67, 132, 0 },
{ 11, -30, 0 },
{ 146, 55, 0 },
{ 201, 77, 0 },
{ 117, 223, 0 },
{ 227, 228, 0 },
{ -7, 107, 0 },
{ 102, 206, 0 },
{ 81, 15, 0 },
{ 135, 106, 0 },
{ -29, -2, 0 },
{ -7, 105, 0 },
{ 62, 159, 0 },
{ 59, 21, 0 },
{ 154, 131, 0 },
{ -11, 104, 0 },
{ 24, -24, 0 },
{ 23, 70, 0 },
{ 10, 220, 0 },
{ 192, 195, 0 },
{ 123, 79, 0 },
{ 178, 138, 0 },
{ -12, -1, 0 },
{ 48, 220, 0 },
{ 25, 45, 0 },
{ 67, 199, 0 },
{ 6, 162, 0 },
{ 2, 136, 0 },
{ 171, 47, 0 },
{ 173, 88, 0 },
{ 93, 222, 0 },
{ 139, 180, 0 },
{ 130, 33, 0 },
{ 53, 71, 0 },
{ 39, 108, 0 },
{ 175, 210, 0 },
{ 112, 180, 0 },
{ 155, 200, 0 },
{ 69, -12, 0 },
{ 30, 166, 0 },
{ 197, -6, 0 },
{ 214, 178, 0 },
{ 71, 8, 0 },
{ 126, 14, 0 },
{ 54, 181, 0 },
{ 41, 212, 0 },
{ 145, 182, 0 },
{ 187, 125, 0 },
{ 53, 131, 0 },
{ 83, 63, 0 },
{ 81, 15, 0 },
{ 85, 41, 0 },
{ 54, -9, 0 },
{ 30, -23, 0 },
{ 35, 126, 0 },
{ 40, 36, 0 },
{ 2, 108, 0 },
{ 112, 120, 0 },
{ 64, 82, 0 },
{ 218, 162, 0 },
{ -8, 110, 0 },
{ 87, 78, 0 },
{ 182, 89, 0 },
{ 44, 102, 0 },
{ 227, -10, 0 },
{ 186, 220, 0 },
{ 209, 181, 0 },
{ 180, -6, 0 },
{ 126, 65, 0 },
{ 166, 13, 0 },
{ 191, 29, 0 },
{ 210, 219, 0 },
{ 80, 122, 0 },
{ 109, 74, 0 },
{ 75, 58, 0 },
{ 155, 223, 0 },
{ 153, 48, 0 },
{ 164, 66, 0 },
{ 78, 135, 0 },
{ 159, 217, 0 },
{ 70, 86, 0 },
{ 136, 174, 0 },
{ 56, 57, 0 },
{ 125, 155, 0 },
{ 40, -17, 0 },
{ 193, 109, 0 },
{ -28, 228, 0 },
{ 90, 32, 0 },
{ 18, 228, 0 },
{ 107, 113, 0 },
{ 14, 127, 0 },
{ -26, 221, 0 },
{ 159, 211, 0 },
{ 69, 204, 0 },
{ 78, 109, 0 },
{ 91, 73, 0 },
{ 16, 223, 0 },
{ 134, 225, 0 },
{ 23, 138, 0 },
{ 38, 55, 0 },
{ -20, 104, 0 },
{ 4, 99, 0 },
{ 221, 177, 0 },
{ 108, 68, 0 },
{ 216, 206, 0 },
{ 97, -3, 0 },
{ -23, 215, 0 },
{ 127, -19, 0 },
{ 39, 48, 0 },
{ 66, 170, 0 },
{ 211, 19, 0 },
{ 18, 189, 0 },
{ 11, 129, 0 },
{ 93, 18, 0 },
{ 157, 168, 0 },
{ 71, 118, 0 },
{ 88, -16, 0 },
{ 188, 142, 0 },
{ 97, 165, 0 },
{ 184, 39, 0 },
{ 27, 211, 0 },
{ 172, 126, 0 },
{ 46, 101, 0 },
{ 61, 42, 0 },
{ 75, -4, 0 },
{ 18, 195, 0 },
{ 164, 111, 0 },
{ -27, 158, 0 },
{ 63, -24, 0 },
{ 159, 83, 0 },
{ 225, 1, 0 },
{ 146, 208, 0 },
{ 38, 54, 0 },
{ -10, 200, 0 },
{ 22, 79, 0 },
{ 208, -16, 0 },
{ 229, 21, 0 },
{ -2, 7, 0 },
{ 171, 32, 0 },
{ 57, 156, 0 },
{ 160, 203, 0 },
{ 219, 2, 0 },
{ 202, 91, 0 },
{ 26, -18, 0 },
{ 192, 181, 0 },
{ -20, 125, 0 },
{ 47, 91, 0 },
{ -10, 200, 0 },
{ 38, -20, 0 },
{ 68, 63, 0 },
{ 103, 169, 0 },
{ 68, 78, 0 },
{ 112, -13, 0 },
{ -16, 92, 0 },
{ 2, 63, 0 },
{ 72, 85, 0 },
{ 209, 54, 0 },
{ 218, 70, 0 },
{ 27, 36, 0 },
{ 145, 167, 0 },
{ -25, -30, 0 },
{ 131, -8, 0 },
{ 135, 167, 0 },
{ 119, 163, 0 },
{ 18, 73, 0 },
{ -18, 220, 0 },
{ 127, 227, 0 },
{ 45, 31, 0 },
{ 198, 116, 0 },
{ 133, 197, 0 },
{ 12, 144, 0 },
{ 114, 33, 0 },
{ 218, 217, 0 },
{ 106, 101, 0 },
{ 117, 132, 0 },
{ 127, 206, 0 },
{ 184, 141, 0 },
{ 228, -11, 0 },
{ 87, 112, 0 },
{ 122, 145, 0 },
{ 43, 6, 0 },
{ 90, 205, 0 },
{ 26, 120, 0 },
{ 198, 107, 0 },
{ -20, 225, 0 },
{ -26, 32, 0 },
{ -27, 179, 0 },
{ -3, 151, 0 },
{ 111, 28, 0 },
{ 223, 53, 0 },
{ 45, -5, 0 },
{ 154, -3, 0 },
{ 50, 34, 0 },
{ 193, 134, 0 },
{ 31, 126, 0 },
{ 132, 11, 0 },
{ 128, 65, 0 },
{ -24, 157, 0 },
{ 100, 87, 0 },
{ 21, 31, 0 },
{ 156, 144, 0 },
{ 191, 208, 0 },
{ 134, 51, 0 },
{ 75, 176, 0 },
{ 18, 119, 0 },
{ 101, 122, 0 },
{ 99, 217, 0 },
{ 221, 157, 0 },
{ 172, 229, 0 },
{ 186, 166, 0 },
{ 2, 178, 0 },
{ 149, 105, 0 },
{ 66, 49, 0 },
{ 200, 62, 0 },
{ 107, 150, 0 },
{ 29, 124, 0 },
{ 223, 15, 0 },
{ 80, 51, 0 },
{ 41, 155, 0 },
{ 59, 89, 0 },
{ 164, 126, 0 },
{ 159, 141, 0 },
{ 198, 93, 0 },
{ 35, 181, 0 },
{ 129, 226, 0 },
{ 4, 124, 0 },
{ 23, 198, 0 },
{ 138, -26, 0 },
{ 22, -8, 0 },
{ 134, 70, 0 },
{ 56, 61, 0 },
{ 157, 216, 0 },
{ 217, 40, 0 },
{ 222, 220, 0 },
{ 52, -4, 0 },
{ 13, 125, 0 },
{ 220, 105, 0 },
{ 49, 177, 0 },
{ 92, 194, 0 },
{ 26, 127, 0 },
{ 107, 110, 0 },
{ -25, 172, 0 },
{ 207, 138, 0 },
{ 228, 83, 0 },
{ 80, 152, 0 },
{ 36, 213, 0 },
{ 136, 62, 0 },
{ 135, 93, 0 },
{ 223, 32, 0 },
{ 199, 213, 0 },
{ 203, 35, 0 },
{ 200, 114, 0 },
{ 165, 179, 0 },
{ 212, 87, 0 },
{ 158, 82, 0 },
{ 113, 122, 0 },
{ 132, 48, 0 },
{ 221, 32, 0 },
{ 121, -4, 0 },
{ 93, -26, 0 },
{ -18, -15, 0 },
{ 158, -6, 0 },
{ 172, 205, 0 },
{ -14, 46, 0 },
{ 144, 205, 0 },
{ 22, 74, 0 },
{ 212, 174, 0 },
{ 228, 225, 0 },
{ -23, 155, 0 },
{ -17, 70, 0 },
{ 144, 109, 0 },
{ 91, 153, 0 },
{ 98, 72, 0 },
{ 201, 91, 0 },
{ 66, -7, 0 },
{ 72, 181, 0 },
{ 32, 23, 0 },
{ 135, 155, 0 },
{ 13, 155, 0 },
{ 98, 31, 0 },
{ 186, -5, 0 },
{ 170, 186, 0 },
{ 103, 103, 0 },
{ 105, 26, 0 },
{ 192, 57, 0 },
{ 144, 208, 0 },
{ 39, 165, 0 },
{ 47, 101, 0 },
{ 34, 146, 0 },
{ 198, 174, 0 },
{ 158, 180, 0 },
{ 156, 89, 0 },
{ 83, 23, 0 },
{ 202, 109, 0 },
{ 67, 196, 0 },
{ -15, -27, 0 },
{ 135, 90, 0 },
{ 207, 73, 0 },
{ 38, 180, 0 },
{ 186, 210, 0 },
{ 92, 129, 0 },
{ 4, 102, 0 },
{ 209, 108, 0 },
{ 88, 59, 0 },
{ 102, 54, 0 },
{ 133, 91, 0 },
{ 110, 60, 0 },
{ 22, -12, 0 },
{ 96, 82, 0 },
{ -11, 63, 0 },
{ 92, 17, 0 },
{ 102, 149, 0 },
{ 224, 107, 0 },
{ 24, 229, 0 },
{ 69, 31, 0 },
{ 46, 192, 0 },
{ 24, 176, 0 },
{ 161, 25, 0 },
{ 113, 103, 0 },
{ 132, 130, 0 },
{ 163, 194, 0 },
{ -14, -27, 0 },
{ 200, 203, 0 },
{ 88, 199, 0 },
{ 72, 83, 0 },
{ -17, 222, 0 },
{ 82, 87, 0 },
{ 157, 83, 0 },
{ -28, 86, 0 },
{ 181, 2, 0 },
{ 63, 169, 0 },
{ 188, 148, 0 },
{ 195, 150, 0 },
{ 107, 202, 0 },
{ 229, 101, 0 },
{ 226, -27, 0 },
{ 105, 43, 0 },
{ 36, 94, 0 },
{ 171, 82, 0 },
{ 224, 205, 0 },
{ 152, 170, 0 },
{ 11, 161, 0 },
{ 209, 134, 0 },
{ -15, 79, 0 },
{ 95, -12, 0 },
{ 61, 156, 0 },
{ 139, 185, 0 },
{ 105, 108, 0 },
{ 163, 166, 0 },
{ 68, 191, 0 },
{ 172, 157, 0 },
{ 5, 148, 0 },
{ 178, 214, 0 },
{ -9, 115, 0 },
{ 87, 28, 0 },
{ 57, 198, 0 },
{ 119, 147, 0 },
{ 129, 78, 0 },
{ 94, -2, 0 },
{ 98, 128, 0 },
{ 140, 24, 0 },
{ -15, 39, 0 },
{ 116, 53, 0 },
{ 71, 226, 0 },
{ 143, 174, 0 },
{ 199, 162, 0 },
{ 208, 44, 0 },
{ 101, 42, 0 },
{ 181, 5, 0 },
{ 58, 120, 0 },
{ 57, 33, 0 },
{ 184, -17, 0 },
{ 27, 32, 0 },
{ 174, 60, 0 },
{ 139, 224, 0 },
{ 141, 80, 0 },
{ 21, 103, 0 },
{ 29, 159, 0 },
{ 97, 141, 0 },
{ 24, 192, 0 },
{ 174, 8, 0 },
{ -27, 41, 0 },
{ 217, 11, 0 },
{ 85, 128, 0 },
{ 186, 199, 0 },
{ 202, 158, 0 },
{ 210, 207, 0 },
{ 135, 68, 0 },
{ 115, 170, 0 },
{ 64, 6, 0 },
{ 79, 208, 0 },
{ 174, 154, 0 },
{ 78, 55, 0 },
{ 153, 120, 0 },
{ 210, 38, 0 },
{ 216, 162, 0 },
{ 15, 220, 0 },
{ 196, 2, 0 },
{ 6, 100, 0 },
{ 166, 225, 0 },
{ 72, 95, 0 },
{ 206, 60, 0 },
{ 179, -29, 0 },
{ 19, -1, 0 },
{ 121, 148, 0 },
{ 86, 8, 0 },
{ 50, 214, 0 },
{ 28, 225, 0 },
{ 120, 111, 0 },
{ -18, 28, 0 },
{ 83, 86, 0 },
{ 38, 207, 0 },
{ -14, 206, 0 },
{ -3, 0, 0 },
{ 187, -29, 0 },
{ 100, 159, 0 },
{ 107, 94, 0 },
{ 73, 173, 0 },
{ 206, -25, 0 },
{ 174, 47, 0 },
{ 137, 71, 0 },
{ -16, 180, 0 },
{ 52, 91, 0 },
{ 66, 51, 0 },
{ 51, -21, 0 },
{ 185, 79, 0 },
{ -6, 210, 0 },
{ 110, 84, 0 },
{ 138, 150, 0 },
{ 191, 43, 0 },
{ 4, 109, 0 },
{ 173, 82, 0 },
{ 95, 1, 0 },
{ 183, 36, 0 },
{ 186, -4, 0 },
{ 194, 194, 0 },
{ 170, 166, 0 },
{ 97, 71, 0 },
{ 21, 114, 0 },
{ 206, 127, 0 },
{ 156, 24, 0 },
{ 110, 0, 0 },
{ -2, 151, 0 },
{ 199, -21, 0 },
{ 20, 24, 0 },
{ 27, 8, 0 },
{ 0, 173, 0 },
{ 67, 101, 0 },
{ 21, 68, 0 },
{ 39, 45, 0 },
{ 109, 123, 0 },
{ 72, 70, 0 },
{ 149, 93, 0 },
{ 179, 152, 0 },
{ 175, 51, 0 },
{ 66, -25, 0 },
{ 127, 51, 0 },
{ 71, 36, 0 },
{ 49, 56, 0 },
{ 207, 138, 0 },
{ 15, 123, 0 },
{ 40, 3, 0 },
{ 135, 219, 0 },
{ 96, 39, 0 },
{ 109, -16, 0 },
{ 222, -3, 0 },
{ 45, -16, 0 },
{ 73, 212, 0 },
{ 174, 72, 0 },
{ 52, 229, 0 },
{ 132, -4, 0 },
{ 27, 102, 0 },
{ -3, 60, 0 },
{ 196, 14, 0 },
{ -28, 74, 0 },
{ 59, 27, 0 },
{ 58, 160, 0 },
{ 109, 204, 0 },
{ 91, 41, 0 },
{ 137, 61, 0 },
{ 54, 14, 0 },
{ 23, 63, 0 },
{ 35, 22, 0 },
{ 159, -21, 0 },
{ 136, 43, 0 },
{ 193, -13, 0 },
{ -19, 110, 0 },
{ 164, 122, 0 },
{ 225, 116, 0 },
{ -8, 85, 0 },
{ 97, 6, 0 },
{ 44, 133, 0 },
{ -4, 205, 0 },
{ 207, -17, 1 },
{ 48, 15, 1 },
{ 7, 183, 1 },
{ 227, 218, 1 },
{ 152, 217, 1 },
{ 45, 59, 1 },
{ 66, 96, 1 },
{ 98, 103, 1 },
{ 96, -18, 1 },
{ 54, 140, 1 },
{ 0, 107, 1 },
{ 164, 151, 1 },
{ 152, 97, 1 },
{ 129, 132, 1 },
{ 8, 165, 1 },
{ 13, 50, 1 },
{ 43, 92, 1 },
{ 218, 110, 1 },
{ -8, -23, 1 },
{ 176, 164, 1 },
{ -29, 202, 1 },
{ 208, 203, 1 },
{ 177, 100, 1 },
{ 149, 224, 1 },
{ 184, 197, 1 },
{ 110, 207, 1 },
{ 7, -10, 1 },
{ 127, 219, 1 },
{ 22, 168, 1 },
{ 158, 180, 1 },
{ -7, 8, 1 },
{ 34, 98, 1 },
{ 62, -3, 1 },
{ 39, 105, 1 },
{ 16, 20, 1 },
{ 25, 127, 1 },
{ 147, 18, 1 },
{ -3, 36, 1 },
{ 208, 12, 1 },
{ 9, 132, 1 },
{ -14, -26, 1 },
{ 69, 181, 1 },
{ 206, 98, 1 },
{ 118, 120, 1 },
{ 175, 79, 1 },
{ 214, 109, 1 },
{ 24, 54, 1 },
{ 1, 25, 1 },
{ 73, 121, 1 },
{ 216, -26, 1 },
{ 54, 90, 1 },
{ 193, 190, 1 },
{ 197, 25, 1 },
{ 84, 196, 1 },
{ 76, 158, 1 },
{ 47, -30, 1 },
{ 64, 125, 1 },
{ 31, 36, 1 },
{ 229, -27, 1 },
{ -24, 205, 1 },
{ 46, 11, 1 },
{ 198, 131, 1 },
{ 183, 108, 1 },
{ 38, 116, 1 },
{ 40, 37, 1 },
{ 102, 120, 1 },
{ 198, 160, 1 },
{ 88, 170, 1 },
{ 45, 198, 1 },
{ 3, 202, 1 },
{ 201, 208, 1 },
{ 142, 69, 1 },
{ 56, 6, 1 },
{ 213, 61, 1 },
{ 16, 159, 1 },
{ 160, 8, 1 },
{ 68, 80, 1 },
{ 225, 125, 1 },
{ 124, 4, 1 },
{ 195, 128, 1 },
{ 68, 37, 1 },
{ 228, 193, 1 },
{ 129, 68, 1 },
{ 167, 100, 1 },
{ 115, -6, 1 },
{ -9, 3, 1 },
{ 50, 43, 1 },
{ 229, 111, 1 },
{ 228, 192, 1 },
{ 101, 222, 1 },
{ 9, 165, 1 },
{ 171, 159, 1 },
{ 25, 220, 1 },
{ 59, 68, 1 },
{ 37, 190, 1 },
{ 161, 61, 1 },
{ 111, 189, 1 },
{ -18, 26, 1 },
{ 107, 169, 1 },
{ 29, 193, 1 },
{ -23, 97, 1 },
{ 146, 129, 1 },
{ -10, 116, 1 },
{ 189, 207, 1 },
{ -18, 43, 1 },
{ 9, 212, 1 },
{ 184, -10, 1 },
{ 53, 110, 1 },
{ 155, 96, 1 },
{ 77, 87, 1 },
{ 94, 144, 1 },
{ 189, 180, 1 },
{ -18, 55, 1 },
{ 175, 142, 1 },
{ 225, -28, 1 },
{ 80, 74, 1 },
{ 156, 14, 1 },
{ 138, 222, 1 },
{ 78, -16, 1 },
{ 148, 61, 1 },
{ 221, 197, 1 },
{ 132, 175, 1 },
{ -26, 204, 1 },
{ 25, -24, 1 },
{ 50, 139, 1 },
{ 22, 214, 1 },
{ 15, 204, 1 },
{ 93, 101, 1 },
{ -2, 167, 1 },
{ 151, 80, 1 },
{ 122, 153, 1 },
{ 185, 84, 1 },
{ 23, 221, 1 },
{ 79, 222, 1 },
{ 194, 138, 1 },
{ 198, 222, 1 },
{ 92, -8, 1 },
{ 25, -20, 1 },
{ 32, 174, 1 },
{ -3, 31, 1 },
{ 190, 79, 1 },
{ -18, 23, 1 },
{ 24, 210, 1 },
{ 7, 213, 1 },
{ 184, 109, 1 },
{ 46, 116, 1 },
{ 44, 198, 1 },
{ 202, 31, 1 },
{ 90, 15, 1 },
{ 119, 7, 1 },
{ 4, 149, 1 },
{ 202, 185, 1 },
{ 76, 159, 1 },
{ 187, 36, 1 },
{ 207, 126, 1 },
{ 61, 14, 1 },
{ 149, 108, 1 },
{ 93, 95, 1 },
{ 57, 89, 1 },
{ -13, 91, 1 },
{ 14, 18, 1 },
{ 132, 164, 1 },
{ 186, 188, 1 },
{ 102, 104, 1 },
{ 205, 223, 1 },
{ 38, 110, 1 },
{ 11, 205, 1 },
{ 145, 155, 1 },
{ 197, -3, 1 },
{ 43, 140, 1 },
{ 107, 35, 1 },
{ 142, 155, 2 },
{ 13, 79, 2 },
{ 148, 18, 2 },
{ 204, 104, 2 },
{ 198, 143, 2 },
{ 152, 221, 2 },
{ 96, 184, 2 },
{ -25, 225, 2 },
};