#include <TVout.h> // Include TVout library
// well this may be kinda lame plz dont judge this.
TVout TV;
int angle = 0; // Initial angle for rotation
int propellerLength = 40; // Length of the propeller blades
int propellerWidth = 10; // Width of the propeller blades
void setup() {
TV.begin(PAL, 120, 96); // Set TV resolution
TV.clear_screen(); // Clear the screen
}
void loop() {
TV.clear_screen(); // Clear the screen on each frame
// Calculate the start and end points of the first propeller blade (blade 1)
int x1_1 = 60 + cos(radians(angle - 90)) * propellerLength;
int y1_1 = 48 + sin(radians(angle - 90)) * propellerLength;
int x2_1 = 60 + cos(radians(angle - 90 + propellerWidth)) * (propellerLength / 2);
int y2_1 = 48 + sin(radians(angle - 90 + propellerWidth)) * (propellerLength / 2);
// Draw the first propeller blade
TV.draw_line(60, 48, x1_1, y1_1, WHITE);
TV.draw_line(60, 48, x2_1, y2_1, WHITE);
// Calculate the start and end points of the second propeller blade (blade 2)
int x1_2 = 60 + cos(radians(angle + 90)) * propellerLength;
int y1_2 = 48 + sin(radians(angle + 90)) * propellerLength;
int x2_2 = 60 + cos(radians(angle + 90 + propellerWidth)) * (propellerLength / 2); // Slight offset for blade width
int y2_2 = 48 + sin(radians(angle + 90 + propellerWidth)) * (propellerLength / 2);
// Draw the second propeller blade
TV.draw_line(60, 48, x1_2, y1_2, WHITE);
TV.draw_line(60, 48, x2_2, y2_2, WHITE);
// Increase the angle to simulate rotation
angle += 5; // Adjust this for speed
if (angle >= 360) angle = 0; // Reset the angle after one full rotation
delay(10); // Adjust the delay to control rotation speed
}