initial commit
This commit is contained in:
commit
51e3178414
7 changed files with 1386 additions and 0 deletions
91
planarFlop3D.ino
Normal file
91
planarFlop3D.ino
Normal file
|
|
@ -0,0 +1,91 @@
|
|||
/******************************* PLANAR FLOP 3D *******************************\
|
||||
| Version 2 of the planar flop, doing more complicated maths and 3D vectors |
|
||||
| 'n stuff. Making this function found the bug of reversed z axis line drawing |
|
||||
\******************************************************************************/
|
||||
|
||||
void planarFlop3D() {
|
||||
continuePattern = true;
|
||||
int animationSpeed = 50;
|
||||
while (continuePattern) {
|
||||
|
||||
for (int y = 3; y > 0; y--) {
|
||||
for (int z = 0; z < 4; z++) drawLine(color, 0, 3, z, 3, y, z);
|
||||
flushBuffer();
|
||||
clearBuffer();
|
||||
delay(animationSpeed);
|
||||
}
|
||||
for (int x = 3; x > 0; x--) {
|
||||
for (int z = 0; z < 4; z++) drawLine(color, 0, 3, z, x, 0, z);
|
||||
flushBuffer();
|
||||
clearBuffer();
|
||||
delay(animationSpeed);
|
||||
}
|
||||
|
||||
|
||||
for (int x = 0; x < 3; x++) {
|
||||
for (int y = 0; y < 4; y++) drawLine(color, 0, y, 0, x, y, 3);
|
||||
flushBuffer();
|
||||
clearBuffer();
|
||||
delay(animationSpeed);
|
||||
}
|
||||
for (int z = 3; z > 0; z--) {
|
||||
for (int y = 0; y < 4; y++) drawLine(color, 0, y, 0, 3, y, z);
|
||||
flushBuffer();
|
||||
clearBuffer();
|
||||
delay(animationSpeed);
|
||||
}
|
||||
|
||||
for (int z = 0; z < 3; z++) {
|
||||
for (int x = 0; x < 4; x++) drawLine(color, x, 0, 0, x, 3, z);
|
||||
flushBuffer();
|
||||
clearBuffer();
|
||||
delay(animationSpeed);
|
||||
}
|
||||
for (int y = 3; y > 0; y--) {
|
||||
for (int x = 0; x < 4; x++) drawLine(color, x, 0, 0, x, y, 3);
|
||||
flushBuffer();
|
||||
clearBuffer();
|
||||
delay(animationSpeed);
|
||||
}
|
||||
|
||||
for (int y = 0; y < 3; y++) {
|
||||
for (int z = 0; z < 4; z++) drawLine(color, 3, 0, z, 0, y, z);
|
||||
flushBuffer();
|
||||
clearBuffer();
|
||||
delay(animationSpeed);
|
||||
}
|
||||
for (int x = 0; x < 3; x++) {
|
||||
for (int z = 0; z < 4; z++) drawLine(color, 3, 0, z, x, 3, z);
|
||||
flushBuffer();
|
||||
clearBuffer();
|
||||
delay(animationSpeed);
|
||||
}
|
||||
|
||||
for (int x = 3; x > 0; x--) {
|
||||
for (int y = 0; y < 4; y++) drawLine(color, 3, y, 3, x, y, 0);
|
||||
flushBuffer();
|
||||
clearBuffer();
|
||||
delay(animationSpeed);
|
||||
}
|
||||
for (int z = 0; z < 3; z++) {
|
||||
for (int y = 0; y < 4; y++) drawLine(color, 3, y, 3, 0, y, z);
|
||||
flushBuffer();
|
||||
clearBuffer();
|
||||
delay(animationSpeed);
|
||||
}
|
||||
|
||||
for (int z = 3; z > 0; z--) {
|
||||
for (int x = 0; x < 4; x++) drawLine(color, x, 3, 3, x, 0, z);
|
||||
flushBuffer();
|
||||
clearBuffer();
|
||||
delay(animationSpeed);
|
||||
}
|
||||
for (int y = 0; y < 3; y++) {
|
||||
for (int x = 0; x < 4; x++) drawLine(color, x, 3, 3, x, y, 0);
|
||||
flushBuffer();
|
||||
clearBuffer();
|
||||
delay(animationSpeed);
|
||||
}
|
||||
color = nextColor(color);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue