summaryrefslogtreecommitdiff
path: root/main.cpp
diff options
context:
space:
mode:
authordawidg81 <dawidgorski.m@gmail.com>2026-02-12 12:54:05 +0100
committerdawidg81 <dawidgorski.m@gmail.com>2026-02-12 12:54:05 +0100
commit7ed4b197db16f0df3ddfddb4cfe6078a96d7e9ec (patch)
tree772c7cd781afc746df50566798c3acaf194911f1 /main.cpp
parentd497196768cebb2f82151b0788ad69fa9d871fae (diff)
Updated README.md; Updated main.cpp;
Diffstat (limited to 'main.cpp')
-rw-r--r--main.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/main.cpp b/main.cpp
index f8fc053..68036c3 100644
--- a/main.cpp
+++ b/main.cpp
@@ -51,6 +51,18 @@ int main(int argc, char* argv[]) {
int bounceX = 600;
int bounceY = 300 + static_cast<int>(100 * sin(time * 2));
drawFilledCircle(window, bounceX, bounceY, 30, Color(100, 200, 255));
+
+ int prevX = bounceX + bounceX + time * 20;
+ int prevY = 300 + static_cast<int>(100 * sin(bounceX + time * 20 * 2));
+
+ for (int i = bounceX + time * 20; i > bounceX; i--) {
+ int x = bounceX + bounceX + time * 20 - i;
+ int y = 300 + static_cast<int>(100 * sin(i * 2));
+ // drawPixel(window, x, y, Color(255, 0, 0));
+ drawLine(window, prevX, prevY, x, y, Color(255, 0, 0));
+ prevX = x;
+ prevY = y;
+ }
// Draw multiple small circles in a pattern
for (int i = 0; i < 8; i++) {