#include "U8glib.h"
U8GLIB_SSD1306_128X64 u8g(U8G_I2C_OPT_DEV_0 | U8G_I2C_OPT_NO_ACK | U8G_I2C_OPT_FAST); // Fast I2C / TWI
int cameraX = 0;
int cameraY = 0;
int cameraZ = 0;
int cameraXRot = 0;
int cameraYRot = 0;
int cameraZRot = 0;
void setup() {
u8g.setFont(u8g_font_tpssb);
u8g.setColorIndex(1);
}
void loop() {
u8g.firstPage();
do {
u8g.drawLine(goTo(0, 0, 0)[0], goTo(0, 0, 0)[1], goTo(0, 0, 1)[0], goTo(0, 0, 1)[1]);
} while ( u8g.nextPage() );
}
int* goTo(int x, int y, int z)
{
return new int[2] { (x - cameraX) / (z - cameraZ), (y - cameraY) / (z - cameraZ) };
}