removed redundant files

This commit is contained in:
K 2023-11-02 17:51:10 +05:30
parent 33c9f61d88
commit ecbc67b963
Signed by: notkshitij
GPG Key ID: C5B8BC7530F8F43F
2 changed files with 0 additions and 106 deletions

View File

@ -1,67 +0,0 @@
#include<iostream>
#include<graphics.h>
#include<math.h>
#include<cstdlib>
#include<stdlib.h>
using namespace std;
void move(int j, int h, int &x, int &y)
{
if(j == 1)
{
y = y - h;
}
else if(j == 2)
{
x = x + h;
}
else if(j == 3)
{
y = y + h;
}
else if(j == 4)
{
x = x - h;
}
setcolor(BROWN);
lineto(x,y);
}
void hilbert(int d, int r, int u, int l, int i, int h, int &x, int &y)
{
if(i > 0)
{
i--;
hilbert(r,d,l,u,i,h,x,y);
move(d,h,x,y);
hilbert(d,r,u,l,i,h,x,y);
move(r,h,x,y);
hilbert(d,r,u,l,i,h,x,y);
move(u,h,x,y);
hilbert(l,u,r,d,i,h,x,y);
}
}
int main()
{
int gd = DETECT,gm;
initgraph(&gd,&gm,NULL);
int x,y,h,n,u = 1,r = 2,d = 3,l = 4;
cout<<"Enter x-co-ordinate of initial point: ";
cin>>x;
cout<<"Enter y-co-ordinate of initial point: ";
cin>>y;
cout<<"Enter length of line segment: ";
cin>>h;
cout<<"Enter order of curve: ";
cin>>n;
moveto(x,y);
hilbert(d,r,u,l,n,h,x,y);
getch();
closegraph();
return 0;
}

View File

@ -1,39 +0,0 @@
# CG
This repository contains notes and codes for **Computer Graphics.**
---
## Index
### Codes
#### Digital Differential Analyzer (DDA)
> Digital Differential Analyzer (DDA) is a line-drawing algorithm for digital displays, using incremental calculations to plot points between endpoints.
1. [Line](https://git.kska.io/sppu-se-comp-codes/CG/src/branch/main/DDA-line.cpp)
2. [Triangle](https://git.kska.io/sppu-se-comp-codes/CG/src/branch/main/DDA-triangle.cpp)
3. [Circle](https://git.kska.io/sppu-se-comp-codes/CG/src/branch/main/DDA-circle.cpp)
#### Cohen-Sutherland
1. [Cohen-Sutherland (Using Inbuilt Functions)](https://git.kska.io/sppu-se-comp-codes/CG/src/branch/main/CohenSutherland.cpp)
2. [Cohen-Sutherland (Using DDA Line Drawing Algorithm)](https://git.kska.io/sppu-se-comp-codes/CG/src/branch/main/CohenSutherland%28UsingDDA%29.cpp)
#### Curves
1. [Hilbert's Curve](https://git.kska.io/sppu-se-comp-codes/CG/src/branch/main/HilbertCurve.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)
3. [Unit 3 - 2D, 3D Transformations and Projections](https://git.kska.io/sppu-se-comp-codes/CG/src/branch/main/notes/Unit%203)
### Question Papers
1. [IN-SEM](https://git.kska.io/sppu-se-comp-codes/CG/src/branch/main/question-papers/IN-SEM)
2. [END-SEM](https://git.kska.io/sppu-se-comp-codes/CG/src/branch/main/question-papers/END-SEM)
### [Lab Manual](https://git.kska.io/sppu-se-comp-codes/CG/src/branch/main/lab-manual/CGL%20Lab%20Manual.pdf)
---
Maintained by [notkshitij](https://git.kska.io/notkshitij) and [TanmaySpamzzz](https://git.kska.io/TanmaySpamzzz)
Contributor: [Kalaskar_admin03](https://git.kska.io/Kalaskar_admin03/)