From 22cf98a790b1e6fe51f0eb5a47b379a0af18c6fa Mon Sep 17 00:00:00 2001 From: TanmaySpamzzz Date: Sat, 25 Nov 2023 13:27:50 +0530 Subject: [PATCH] readme updated --- ManWalkinInRain.cpp | 62 --------------------------------------------- README.md | 2 -- 2 files changed, 64 deletions(-) delete mode 100644 ManWalkinInRain.cpp diff --git a/ManWalkinInRain.cpp b/ManWalkinInRain.cpp deleted file mode 100644 index 785a2d2..0000000 --- a/ManWalkinInRain.cpp +++ /dev/null @@ -1,62 +0,0 @@ -#include -#include -#include -#include -#include - -#define ScreenWdith getmaxx() -#define ScreenHeight getmaxy() -#define GroundY ScreenHeight*0.75 - -int ldisp=0; - -void DrawManAndUmbrella(int x,int ldisp) -{ - circle(x,GroundY-90,10); - line(x,GroundY-80,x,GroundY-30); - - line(x,GroundY-70,x+10,GroundY-60); - line(x,GroundY-65,x+10,GroundY-55); - line(x+10,GroundY-60,x+20,GroundY-70); - line(x+10,GroundY-55,x+20,GroundY-70); - - line(x,GroundY-30,x+ldisp,GroundY); - line(x,GroundY-30,x-ldisp,GroundY); - - pieslice(x+20,GroundY-120,0,180,40); - line(x+20,GroundY-120,x+20,GroundY-70); - -} - -void Rain(int x) -{ - int i,rx,ry; - for(int i=0;i<400;i++) - { - rx = rand() % ScreenWdith; - ry = rand() % ScreenHeight; - - if(ry GroundY-120 && (rx < x-20 || rx > x+60))) - line(rx,ry,rx+0.5,ry+4); - } - } -} - -int main(){ - int gd=DETECT, gm; - int x=0; - initgraph(&gd, &gm,NULL); - while(!kbhit()) - { - line(0,GroundY,ScreenWdith,GroundY); - Rain(x); - ldisp = (ldisp+2)%20; - DrawManAndUmbrella(x,ldisp); - delay(25); - cleardevice(); - x=(x+2)%ScreenWdith; - } - getch(); -} \ No newline at end of file diff --git a/README.md b/README.md index 47c92f0..2f7254b 100644 --- a/README.md +++ b/README.md @@ -42,8 +42,6 @@ This repository contains notes and codes for **Computer Graphics.** 2. [Koch Curve](https://git.kska.io/sppu-se-comp-codes/CG/src/branch/main/Koch-Curve.cpp) 3. [Snowflake Curve](https://git.kska.io/sppu-se-comp-codes/CG/src/branch/main/Snowflake.cpp) -#### [Man Walking In Rain](https://git.kska.io/sppu-se-comp-codes/CG/src/branch/main/ManWalkinInRain.cpp) - ### Notes 1. [Unit 1 - Graphics Primitives and Scan Conversion Algorithms](https://git.kska.io/sppu-se-comp-codes/CG/src/branch/main/notes/Unit%201) 2. [Unit 2 - Polygon, Windowing and Clipping](https://git.kska.io/sppu-se-comp-codes/CG/src/branch/main/notes/Unit%202)