Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View kunalpat25's full-sized avatar
👨‍💻
Open to work

Kunal Patrikar kunalpat25

👨‍💻
Open to work
View GitHub Profile
@kunalpat25
kunalpat25 / clipping.c
Created December 8, 2020 07:46
Polygon clipping algorithm
#include<stdio.h>
#include<graphics.h>
#include<conio.h>
#include<stdlib.h>
int main()
{
int gd,gm,n,*x,i,k=0;
//window coordinates int wx1=220,wy1=140,wx2=420,wy2=140,wx3=420,wy3=340,wx4=220,wy4=340;
int w[]={220,140,420,140,420,340,220,340,220,140};//array for drawing window
detectgraph(&gd,&gm);