├── Graphics 2D Project
├── Graphics 2D Project.cbp
├── Graphics 2D Project.depend
├── Graphics 2D Project.layout
├── Read Me File
├── SaveFile.txt
├── bin
│ └── Debug
│ │ └── Graphics 2D Project.exe
├── main.cpp
└── obj
│ └── Debug
│ └── main.o
├── Graphics Bezier Curves
├── Graphics Bezier Curves.cbp
├── Graphics Bezier Curves.depend
├── Graphics Bezier Curves.layout
├── bin
│ └── Debug
│ │ └── Graphics Bezier Curves.exe
├── main.cpp
└── obj
│ └── Debug
│ └── main.o
├── Graphics Circle Clipping Face Drawing
├── Graphics Circle Clipping Face Drawing.cbp
├── Graphics Circle Clipping Face Drawing.depend
├── Graphics Circle Clipping Face Drawing.layout
├── Graphics PDF for Clipping Lines in a Circle Window.pdf
├── Output Shapes.PNG
├── Read Me File
├── bin
│ └── Debug
│ │ └── Graphics Circle Clipping Face Drawing.exe
├── main.cpp
└── obj
│ └── Debug
│ └── main.o
├── Graphics Circle Draw Bresenham's Way
├── Graphics Circle Draw Bresenham's Way.cbp
├── Graphics Circle Draw Bresenham's Way.layout
├── bin
│ └── Debug
│ │ └── Graphics Circle Draw Bresenham's Way.exe
├── main.cpp
└── obj
│ └── Debug
│ └── main.o
├── Graphics Circle Draw Direct Way
├── Graphics Circle Draw Direct Way.cbp
├── Graphics Circle Draw Direct Way.depend
├── Graphics Circle Draw Direct Way.layout
├── bin
│ └── Debug
│ │ └── Graphics Circle Draw Direct Way.exe
├── main.cpp
└── obj
│ └── Debug
│ └── main.o
├── Graphics Circle Draw Polar Direct
├── Graphics Circle Draw Polar Direct.cbp
├── Graphics Circle Draw Polar Direct.depend
├── Graphics Circle Draw Polar Direct.layout
├── bin
│ └── Debug
│ │ └── Graphics Circle Draw Polar Direct.exe
├── main.cpp
└── obj
│ └── Debug
│ └── main.o
├── Graphics Circle Drawing Iterative Polar Method
├── Graphics Circle Drawing Iterative Polar Method.cbp
├── Graphics Circle Drawing Iterative Polar Method.layout
├── bin
│ └── Debug
│ │ └── Graphics Circle Drawing Iterative Polar Method.exe
├── main.cpp
└── obj
│ └── Debug
│ └── main.o
├── Graphics Circle Lines
├── Graphics Circle Lines.cbp
├── Graphics Circle Lines.depend
├── Graphics Circle Lines.layout
├── bin
│ └── Debug
│ │ └── Graphics Circle Lines.exe
├── main.cpp
└── obj
│ └── Debug
│ └── main.o
├── Graphics Convert Non Convex To Convex
├── Graphics Convert Non Convex To Convex.cbp
├── Graphics Convert Non Convex To Convex.depend
├── Graphics Convert Non Convex To Convex.layout
├── bin
│ └── Debug
│ │ └── Graphics Convert Non Convex To Convex.exe
├── main.cpp
└── obj
│ └── Debug
│ └── main.o
├── Graphics Convex Polygon Draw From PDF
├── Graphics Convex Polygon Draw From PDF.cbp
├── Graphics Convex Polygon Draw From PDF.cscope_file_list
├── Graphics Convex Polygon Draw From PDF.depend
├── Graphics Convex Polygon Draw From PDF.layout
├── bin
│ └── Debug
│ │ └── Graphics Convex Polygon Draw From PDF.exe
├── main.cpp
└── obj
│ └── Debug
│ └── main.o
├── Graphics Cradinal Splines
├── Graphics Cradinal Splines.cbp
├── Graphics Cradinal Splines.depend
├── Graphics Cradinal Splines.layout
├── bin
│ └── Debug
│ │ └── Graphics Cradinal Splines.exe
├── main.cpp
└── obj
│ └── Debug
│ └── main.o
├── Graphics Determine Whether Convex Polygon or not
├── Graphics Determine Whether Convex Polygon or not.cbp
├── Graphics Determine Whether Convex Polygon or not.depend
├── Graphics Determine Whether Convex Polygon or not.layout
├── bin
│ └── Debug
│ │ └── Graphics Determine Whether Convex Polygon or not.exe
├── main.cpp
└── obj
│ └── Debug
│ └── main.o
├── Graphics Diamond Draw
├── Graphics Diamond Draw.cbp
├── Graphics Diamond Draw.layout
├── bin
│ └── Debug
│ │ └── Graphics Diamond Draw.exe
├── main.cpp
└── obj
│ └── Debug
│ └── main.o
├── Graphics Draw 2 Circles without 1st Quad inside each other
├── Graphics Draw 2 Circles without 1st Quad inside each other.cbp
├── Graphics Draw 2 Circles without 1st Quad inside each other.depend
├── Graphics Draw 2 Circles without 1st Quad inside each other.layout
├── bin
│ └── Debug
│ │ └── Graphics Draw 2 Circles without 1st Quad inside each other.exe
├── main.cpp
└── obj
│ └── Debug
│ └── main.o
├── Graphics Draw Circle Lines With Filling
├── Graphics Draw Circle Lines With Filling.cbp
├── Graphics Draw Circle Lines With Filling.depend
├── Graphics Draw Circle Lines With Filling.layout
├── bin
│ └── Debug
│ │ └── Graphics Draw Circle Lines With Filling.exe
├── main.cpp
└── obj
│ └── Debug
│ └── main.o
├── Graphics Draw Curve Direct parameters
├── Graphics Draw Curve Direct parameters.cbp
├── Graphics Draw Curve Direct parameters.depend
├── Graphics Draw Curve Direct parameters.layout
├── bin
│ └── Debug
│ │ └── Graphics Draw Curve Direct parameters.exe
├── main.cpp
└── obj
│ └── Debug
│ └── main.o
├── Graphics Draw a Flower
├── Graphics Draw a Flower.cbp
├── Graphics Draw a Flower.layout
├── bin
│ └── Debug
│ │ └── Graphics Draw a Flower.exe
├── main.cpp
└── obj
│ └── Debug
│ └── main.o
├── Graphics Draw a Rhombus
├── Graphics Draw a Rhombus.cbp
├── Graphics Draw a Rhombus.layout
├── bin
│ └── Debug
│ │ └── Graphics Draw a Rhombus.exe
├── main.cpp
└── obj
│ └── Debug
│ └── main.o
├── Graphics Ellipse Direct Polar Method
├── Graphics Ellipse Direct Polar Method.cbp
├── Graphics Ellipse Direct Polar Method.layout
├── bin
│ └── Debug
│ │ └── Graphics Ellipse Direct Polar Method.exe
├── main.cpp
└── obj
│ └── Debug
│ └── main.o
├── Graphics Ellipse Draw Bresenham's Method
├── Graphics Ellipse Draw Bresenham's Method.cbp
├── Graphics Ellipse Draw Bresenham's Method.depend
├── Graphics Ellipse Draw Bresenham's Method.layout
├── bin
│ └── Debug
│ │ └── Graphics Ellipse Draw Bresenham's Method.exe
├── main.cpp
└── obj
│ └── Debug
│ └── main.o
├── Graphics Ellipse Draw Bresenham's
├── Graphics Ellipse Draw Bresenham's.cbp
├── Graphics Ellipse Draw Bresenham's.depend
├── Graphics Ellipse Draw Bresenham's.layout
├── bin
│ ├── Debug
│ │ └── Graphics Ellipse Draw Bresenham's.exe
│ └── Release
│ │ └── Graphics Ellipse Draw Bresenham's.exe
├── main.cpp
└── obj
│ ├── Debug
│ └── main.o
│ └── Release
│ └── main.o
├── Graphics Ellipse Draw Cartesian Equation
├── Graphics Ellipse Draw Cartesian Equation.cbp
├── Graphics Ellipse Draw Cartesian Equation.depend
├── Graphics Ellipse Draw Cartesian Equation.layout
├── bin
│ └── Debug
│ │ └── Graphics Ellipse Draw Cartesian Equation.exe
├── main.cpp
└── obj
│ └── Debug
│ └── main.o
├── Graphics Ellipse Draw Polar Equation
├── Graphics Ellipse Draw Polar Equation.cbp
├── Graphics Ellipse Draw Polar Equation.depend
├── Graphics Ellipse Draw Polar Equation.layout
├── bin
│ └── Debug
│ │ └── Graphics Ellipse Draw Polar Equation.exe
├── main.cpp
└── obj
│ └── Debug
│ └── main.o
├── Graphics Ellipse Draw Polar Iterative Method
├── Graphics Ellipse Draw Polar Iterative Method.cbp
├── Graphics Ellipse Draw Polar Iterative Method.depend
├── Graphics Ellipse Draw Polar Iterative Method.layout
├── bin
│ └── Debug
│ │ └── Graphics Ellipse Draw Polar Iterative Method.exe
├── main.cpp
└── obj
│ └── Debug
│ └── main.o
├── Graphics Ellipse Filling
├── Graphics Ellipse Filling.cbp
├── Graphics Ellipse Filling.layout
├── bin
│ └── Debug
│ │ └── Graphics Ellipse Filling.exe
├── main.cpp
└── obj
│ └── Debug
│ └── main.o
├── Graphics First Lec_Creation
├── Graphics First Lec..cbp
├── Graphics First Lec..depend
├── Graphics First Lec..layout
├── bin
│ └── Debug
│ │ ├── Graphics First Lec..exe
│ │ └── Graphics First Lec.exe
├── main.cpp
└── obj
│ └── Debug
│ └── main.o
├── Graphics General Polygon Filling
├── Graphics General Polygon Filling.cbp
├── Graphics General Polygon Filling.depend
├── Graphics General Polygon Filling.layout
├── bin
│ └── Debug
│ │ └── Graphics General Polygon Filling.exe
├── main.cpp
└── obj
│ └── Debug
│ └── main.o
├── Graphics Hermite Curves
├── Graphics Hermite Curves.cbp
├── Graphics Hermite Curves.depend
├── Graphics Hermite Curves.layout
├── bin
│ └── Debug
│ │ └── Graphics Hermite Curves.exe
├── main.cpp
└── obj
│ └── Debug
│ └── main.o
├── Graphics Lab 2 Midpoint
├── Graphics Lab 2 Midpoint.cbp
├── Graphics Lab 2 Midpoint.depend
├── Graphics Lab 2 Midpoint.layout
├── bin
│ └── Debug
│ │ └── Graphics Lab 2 Midpoint.exe
├── main.cpp
└── obj
│ └── Debug
│ └── main.o
├── Graphics Lab One Simple Line
├── Graphics Lab One Simple Line.cbp
├── Graphics Lab One Simple Line.layout
├── bin
│ └── Debug
│ │ └── Graphics Lab One Simple Line.exe
├── main.cpp
└── obj
│ └── Debug
│ └── main.o
├── Graphics Lab One Square Draw
├── Graphics Lab One Line Draw.cbp
├── Graphics Lab One Line Draw.depend
├── Graphics Lab One Line Draw.layout
├── bin
│ └── Debug
│ │ └── Graphics Lab One Line Draw.exe
├── main.cpp
└── obj
│ └── Debug
│ └── main.o
├── Graphics Line Clipping
├── Graphics Line Clipping.cbp
├── Graphics Line Clipping.depend
├── Graphics Line Clipping.layout
├── bin
│ └── Debug
│ │ └── Graphics Line Clipping.exe
├── main.cpp
└── obj
│ └── Debug
│ └── main.o
├── Graphics Line Draw_Bresenhams
├── Graphics Line Draw_Bresenhams.cbp
├── Graphics Line Draw_Bresenhams.depend
├── Graphics Line Draw_Bresenhams.layout
├── bin
│ └── Debug
│ │ └── Graphics Line Draw_Bresenhams.exe
├── main.cpp
└── obj
│ └── Debug
│ └── main.o
├── Graphics Line Draw_Simple DDA 2
├── Graphics Line Draw_Simple DDA 2.cbp
├── Graphics Line Draw_Simple DDA 2.depend
├── Graphics Line Draw_Simple DDA 2.layout
├── bin
│ └── Debug
│ │ └── Graphics Line Draw_Simple DDA 2.exe
├── main.cpp
└── obj
│ └── Debug
│ └── main.o
├── Graphics Line Draw_Simple DDA
├── Graphics Line Draw_Simple DDA.cbp
├── Graphics Line Draw_Simple DDA.depend
├── Graphics Line Draw_Simple DDA.layout
├── bin
│ └── Debug
│ │ └── Graphics Line Draw_Simple DDA.exe
├── main.cpp
└── obj
│ └── Debug
│ └── main.o
├── Graphics NRFloodFill Algorithm
├── Graphics NRFloodFill Algorithm.cbp
├── Graphics NRFloodFill Algorithm.depend
├── Graphics NRFloodFill Algorithm.layout
├── bin
│ └── Debug
│ │ └── Graphics NRFloodFill Algorithm.exe
├── main.cpp
└── obj
│ └── Debug
│ └── main.o
├── Graphics NRFloodFill Queue Algoritm
├── Graphics NRFloodFill Queue Algoritm.cbp
├── Graphics NRFloodFill Queue Algoritm.depend
├── Graphics NRFloodFill Queue Algoritm.layout
├── bin
│ └── Debug
│ │ └── Graphics NRFloodFill Queue Algoritm.exe
├── main.cpp
└── obj
│ └── Debug
│ └── main.o
├── Graphics Point Clipping
├── Graphics Point Clipping.cbp
├── Graphics Point Clipping.depend
├── Graphics Point Clipping.layout
├── bin
│ └── Debug
│ │ └── Graphics Point Clipping.exe
├── main.cpp
└── obj
│ └── Debug
│ └── main.o
├── Graphics Polygon Clipping
├── Graphics Polygon Clipping.cbp
├── Graphics Polygon Clipping.depend
├── Graphics Polygon Clipping.layout
├── bin
│ └── Debug
│ │ └── Graphics Polygon Clipping.exe
├── main.cpp
└── obj
│ └── Debug
│ └── main.o
├── Graphics RFloodFill Algorithm
├── Graphics RFloodFill Algorithm.cbp
├── Graphics RFloodFill Algorithm.depend
├── Graphics RFloodFill Algorithm.layout
├── bin
│ └── Debug
│ │ └── Graphics RFloodFill Algorithm.exe
├── main.cpp
└── obj
│ └── Debug
│ └── main.o
├── Graphics Second Lec_Naiive Line Draw Algorithm
├── Graphics Second Lec.cbp
├── Graphics Second Lec.depend
├── Graphics Second Lec.layout
├── bin
│ └── Debug
│ │ └── Graphics Second Lec.exe
├── lib_finder.script
├── main.cpp
└── obj
│ └── Debug
│ └── main.o
├── Graphics Two Circles Touching and a line
├── Graphics Two Circles Touching and a line.cbp
├── Graphics Two Circles Touching and a line.depend
├── Graphics Two Circles Touching and a line.layout
├── bin
│ └── Debug
│ │ └── Graphics Two Circles Touching and a line.exe
├── main.cpp
└── obj
│ └── Debug
│ └── main.o
└── README.md
/Graphics 2D Project/Graphics 2D Project.cbp:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
--------------------------------------------------------------------------------
/Graphics 2D Project/Graphics 2D Project.depend:
--------------------------------------------------------------------------------
1 | # depslib dependency file v1.0
2 | 1641072869 source:c:\users\sarah hesham\onedrive\documents\c++\graphics 2d project\main.cpp
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/Graphics 2D Project/Graphics 2D Project.layout:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/Graphics 2D Project/Read Me File:
--------------------------------------------------------------------------------
1 | [Link to separate repo:](https://github.com/Sarah-Hesham-2022/ComputerGraphics2D_Win32_Desktop_Project)
2 |
--------------------------------------------------------------------------------
/Graphics 2D Project/SaveFile.txt:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/Graphics 2D Project/bin/Debug/Graphics 2D Project.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sarah-Hesham-2022/ComputerGraphics-Algorithms-With-CPP/bc6119223c770a5c4688a67c5f4a43eba9f26ef1/Graphics 2D Project/bin/Debug/Graphics 2D Project.exe
--------------------------------------------------------------------------------
/Graphics 2D Project/obj/Debug/main.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sarah-Hesham-2022/ComputerGraphics-Algorithms-With-CPP/bc6119223c770a5c4688a67c5f4a43eba9f26ef1/Graphics 2D Project/obj/Debug/main.o
--------------------------------------------------------------------------------
/Graphics Bezier Curves/Graphics Bezier Curves.cbp:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/Graphics Bezier Curves/Graphics Bezier Curves.depend:
--------------------------------------------------------------------------------
1 | # depslib dependency file v1.0
2 | 1637170689 source:c:\users\sarah hesham\onedrive\documents\c++\graphics bezier curves\main.cpp
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/Graphics Bezier Curves/Graphics Bezier Curves.layout:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/Graphics Bezier Curves/bin/Debug/Graphics Bezier Curves.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sarah-Hesham-2022/ComputerGraphics-Algorithms-With-CPP/bc6119223c770a5c4688a67c5f4a43eba9f26ef1/Graphics Bezier Curves/bin/Debug/Graphics Bezier Curves.exe
--------------------------------------------------------------------------------
/Graphics Bezier Curves/obj/Debug/main.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sarah-Hesham-2022/ComputerGraphics-Algorithms-With-CPP/bc6119223c770a5c4688a67c5f4a43eba9f26ef1/Graphics Bezier Curves/obj/Debug/main.o
--------------------------------------------------------------------------------
/Graphics Circle Clipping Face Drawing/Graphics Circle Clipping Face Drawing.cbp:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/Graphics Circle Clipping Face Drawing/Graphics Circle Clipping Face Drawing.depend:
--------------------------------------------------------------------------------
1 | # depslib dependency file v1.0
2 | 1640701274 source:c:\users\sarah hesham\onedrive\documents\c++\graphics circle clipping face drawing\main.cpp
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Graphics Circle Clipping Face Drawing/Graphics Circle Clipping Face Drawing.layout:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/Graphics Circle Clipping Face Drawing/Graphics PDF for Clipping Lines in a Circle Window.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sarah-Hesham-2022/ComputerGraphics-Algorithms-With-CPP/bc6119223c770a5c4688a67c5f4a43eba9f26ef1/Graphics Circle Clipping Face Drawing/Graphics PDF for Clipping Lines in a Circle Window.pdf
--------------------------------------------------------------------------------
/Graphics Circle Clipping Face Drawing/Output Shapes.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sarah-Hesham-2022/ComputerGraphics-Algorithms-With-CPP/bc6119223c770a5c4688a67c5f4a43eba9f26ef1/Graphics Circle Clipping Face Drawing/Output Shapes.PNG
--------------------------------------------------------------------------------
/Graphics Circle Clipping Face Drawing/Read Me File:
--------------------------------------------------------------------------------
1 | [Link to a separate repo : ](https://github.com/Sarah-Hesham-2022/ComputerGraphics-Face-Drawing-Clipping)
2 |
--------------------------------------------------------------------------------
/Graphics Circle Clipping Face Drawing/bin/Debug/Graphics Circle Clipping Face Drawing.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sarah-Hesham-2022/ComputerGraphics-Algorithms-With-CPP/bc6119223c770a5c4688a67c5f4a43eba9f26ef1/Graphics Circle Clipping Face Drawing/bin/Debug/Graphics Circle Clipping Face Drawing.exe
--------------------------------------------------------------------------------
/Graphics Circle Clipping Face Drawing/obj/Debug/main.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sarah-Hesham-2022/ComputerGraphics-Algorithms-With-CPP/bc6119223c770a5c4688a67c5f4a43eba9f26ef1/Graphics Circle Clipping Face Drawing/obj/Debug/main.o
--------------------------------------------------------------------------------
/Graphics Circle Draw Bresenham's Way/Graphics Circle Draw Bresenham's Way.cbp:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/Graphics Circle Draw Bresenham's Way/Graphics Circle Draw Bresenham's Way.layout:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/Graphics Circle Draw Bresenham's Way/bin/Debug/Graphics Circle Draw Bresenham's Way.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sarah-Hesham-2022/ComputerGraphics-Algorithms-With-CPP/bc6119223c770a5c4688a67c5f4a43eba9f26ef1/Graphics Circle Draw Bresenham's Way/bin/Debug/Graphics Circle Draw Bresenham's Way.exe
--------------------------------------------------------------------------------
/Graphics Circle Draw Bresenham's Way/main.cpp:
--------------------------------------------------------------------------------
1 | #if defined(UNICODE) && !defined(_UNICODE)
2 | #define _UNICODE
3 | #elif defined(_UNICODE) && !defined(UNICODE)
4 | #define UNICODE
5 | #endif
6 |
7 | #include
8 | #include
9 | #include
10 |
11 | /* Declare Windows procedure */
12 | LRESULT CALLBACK WindowProcedure (HWND, UINT, WPARAM, LPARAM);
13 | void Draw8Points(HDC hdc,int xc,int yc,int a,int b,COLORREF c)
14 | {
15 | SetPixel(hdc,xc+a,yc+b,c);
16 | SetPixel(hdc,xc+a,yc-b,c);
17 | SetPixel(hdc,xc-a,yc+b,c);
18 | SetPixel(hdc,xc-a,yc-b,c);
19 | SetPixel(hdc,xc+b,yc+a,c);
20 | SetPixel(hdc,xc-b,yc+a,c);
21 | SetPixel(hdc,xc+b,yc-a,c);
22 | SetPixel(hdc,xc-b,yc-a,c);
23 | }
24 | void DrawCircle(HDC hdc,int xc,int yc,int radius,COLORREF c)
25 | {
26 | int x=0;
27 | int y=radius;
28 | int d1=1-radius;
29 | int c1=3;
30 | int c2=5-2*radius;
31 | Draw8Points(hdc,xc,yc,x,y,c);
32 | while(x
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/Graphics Circle Draw Direct Way/Graphics Circle Draw Direct Way.depend:
--------------------------------------------------------------------------------
1 | # depslib dependency file v1.0
2 | 1636150935 source:c:\users\sarah hesham\onedrive\documents\c++\graphics circle draw direct way\main.cpp
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/Graphics Circle Draw Direct Way/Graphics Circle Draw Direct Way.layout:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/Graphics Circle Draw Direct Way/bin/Debug/Graphics Circle Draw Direct Way.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sarah-Hesham-2022/ComputerGraphics-Algorithms-With-CPP/bc6119223c770a5c4688a67c5f4a43eba9f26ef1/Graphics Circle Draw Direct Way/bin/Debug/Graphics Circle Draw Direct Way.exe
--------------------------------------------------------------------------------
/Graphics Circle Draw Direct Way/main.cpp:
--------------------------------------------------------------------------------
1 | #if defined(UNICODE) && !defined(_UNICODE)
2 | #define _UNICODE
3 | #elif defined(_UNICODE) && !defined(UNICODE)
4 | #define UNICODE
5 | #endif
6 |
7 | #include
8 | #include
9 | #include
10 |
11 | /* Declare Windows procedure */
12 | LRESULT CALLBACK WindowProcedure (HWND, UINT, WPARAM, LPARAM);
13 |
14 | /* Make the class name into a global variable */
15 | TCHAR szClassName[ ] = _T("CodeBlocksWindowsApp");
16 |
17 | int Round(double x)
18 | {
19 | return int(x+0.5);
20 | }
21 |
22 | void Draw8Points(HDC hdc,int xc,int yc,int a,int b,COLORREF color)
23 | {
24 | SetPixel(hdc,xc+a,yc+b,color);
25 | SetPixel(hdc,xc+a,yc-b,color);
26 | SetPixel(hdc,xc-a,yc+b,color);
27 | SetPixel(hdc,xc-a,yc-b,color);
28 | SetPixel(hdc,xc+b,yc+a,color);
29 | SetPixel(hdc,xc+b,yc-a,color);
30 | SetPixel(hdc,xc-b,yc+a,color);
31 | SetPixel(hdc,xc-b,yc-a,color);
32 | }
33 |
34 | void DrawCircleDirect(HDC hdc,int xc,int yc,double R,COLORREF color)
35 | {
36 | double y=R;//y=0
37 | for(int x=0; x0; x-- you choose your own octant
38 | {
39 | Draw8Points(hdc,xc,yc,x,y,color);
40 | y=Round(sqrt(R*R-x*x));
41 | }
42 | }
43 | static double x1,y3,x2,y2;
44 | int WINAPI WinMain (HINSTANCE hThisInstance,
45 | HINSTANCE hPrevInstance,
46 | LPSTR lpszArgument,
47 | int nCmdShow)
48 | {
49 | HWND hwnd; /* This is the handle for our window */
50 | MSG messages; /* Here messages to the application are saved */
51 | WNDCLASSEX wincl; /* Data structure for the windowclass */
52 |
53 | /* The Window structure */
54 | wincl.hInstance = hThisInstance;
55 | wincl.lpszClassName = szClassName;
56 | wincl.lpfnWndProc = WindowProcedure; /* This function is called by windows */
57 | wincl.style = CS_DBLCLKS; /* Catch double-clicks */
58 | wincl.cbSize = sizeof (WNDCLASSEX);
59 |
60 | /* Use default icon and mouse-pointer */
61 | wincl.hIcon = LoadIcon (NULL, IDI_APPLICATION);
62 | wincl.hIconSm = LoadIcon (NULL, IDI_APPLICATION);
63 | wincl.hCursor = LoadCursor (NULL, IDC_ARROW);
64 | wincl.lpszMenuName = NULL; /* No menu */
65 | wincl.cbClsExtra = 0; /* No extra bytes after the window class */
66 | wincl.cbWndExtra = 0; /* structure or the window instance */
67 | /* Use Windows's default colour as the background of the window */
68 | wincl.hbrBackground = (HBRUSH) COLOR_BACKGROUND;
69 |
70 | /* Register the window class, and if it fails quit the program */
71 | if (!RegisterClassEx (&wincl))
72 | return 0;
73 |
74 | /* The class is registered, let's create the program*/
75 | hwnd = CreateWindowEx (
76 | 0, /* Extended possibilites for variation */
77 | szClassName, /* Classname */
78 | _T("Code::Blocks Template Windows App"), /* Title Text */
79 | WS_OVERLAPPEDWINDOW, /* default window */
80 | CW_USEDEFAULT, /* Windows decides the position */
81 | CW_USEDEFAULT, /* where the window ends up on the screen */
82 | 544, /* The programs width */
83 | 375, /* and height in pixels */
84 | HWND_DESKTOP, /* The window is a child-window to desktop */
85 | NULL, /* No menu */
86 | hThisInstance, /* Program Instance handler */
87 | NULL /* No Window Creation data */
88 | );
89 |
90 | /* Make the window visible on the screen */
91 | ShowWindow (hwnd, nCmdShow);
92 |
93 | /* Run the message loop. It will run until GetMessage() returns 0 */
94 | while (GetMessage (&messages, NULL, 0, 0))
95 | {
96 | /* Translate virtual-key messages into character messages */
97 | TranslateMessage(&messages);
98 | /* Send message to WindowProcedure */
99 | DispatchMessage(&messages);
100 | }
101 |
102 | /* The program return-value is 0 - The value that PostQuitMessage() gave */
103 | return messages.wParam;
104 | }
105 |
106 |
107 | /* This function is called by the Windows function DispatchMessage() */
108 | LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
109 | {
110 | switch (message) /* handle the messages */
111 | {
112 | case WM_LBUTTONDOWN:
113 | {
114 | x1=LOWORD(lParam);
115 | y3=HIWORD(lParam);
116 | break;
117 | }
118 | case WM_LBUTTONUP:
119 | {
120 | HDC hdc=GetDC(hwnd);
121 | x2=LOWORD(lParam);
122 | y2=HIWORD(lParam);
123 | double radius;
124 | radius=sqrt((x2-x1)*(x2-x1)+(y2-y3)*(y2-y3));
125 | DrawCircleDirect(hdc,x1,y3,radius,RGB(0,0,255));
126 | ReleaseDC(hwnd,hdc);
127 | break;
128 |
129 | }
130 | case WM_DESTROY:
131 | PostQuitMessage (0); /* send a WM_QUIT to the message queue */
132 | break;
133 | default: /* for messages that we don't deal with */
134 | return DefWindowProc (hwnd, message, wParam, lParam);
135 | }
136 |
137 | return 0;
138 | }
139 |
--------------------------------------------------------------------------------
/Graphics Circle Draw Direct Way/obj/Debug/main.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sarah-Hesham-2022/ComputerGraphics-Algorithms-With-CPP/bc6119223c770a5c4688a67c5f4a43eba9f26ef1/Graphics Circle Draw Direct Way/obj/Debug/main.o
--------------------------------------------------------------------------------
/Graphics Circle Draw Polar Direct/Graphics Circle Draw Polar Direct.cbp:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/Graphics Circle Draw Polar Direct/Graphics Circle Draw Polar Direct.depend:
--------------------------------------------------------------------------------
1 | # depslib dependency file v1.0
2 | 1636153468 source:c:\users\sarah hesham\onedrive\documents\c++\graphics circle draw polar direct\main.cpp
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/Graphics Circle Draw Polar Direct/Graphics Circle Draw Polar Direct.layout:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/Graphics Circle Draw Polar Direct/bin/Debug/Graphics Circle Draw Polar Direct.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sarah-Hesham-2022/ComputerGraphics-Algorithms-With-CPP/bc6119223c770a5c4688a67c5f4a43eba9f26ef1/Graphics Circle Draw Polar Direct/bin/Debug/Graphics Circle Draw Polar Direct.exe
--------------------------------------------------------------------------------
/Graphics Circle Draw Polar Direct/main.cpp:
--------------------------------------------------------------------------------
1 | #if defined(UNICODE) && !defined(_UNICODE)
2 | #define _UNICODE
3 | #elif defined(_UNICODE) && !defined(UNICODE)
4 | #define UNICODE
5 | #endif
6 |
7 | #include
8 | #include
9 | #include
10 |
11 | /* Declare Windows procedure */
12 | LRESULT CALLBACK WindowProcedure (HWND, UINT, WPARAM, LPARAM);
13 |
14 | int Round(double x)
15 | {
16 | return int(x+0.5);
17 | }
18 |
19 | void Draw8Points(HDC hdc,int xc,int yc,int a,int b,COLORREF color)
20 | {
21 | SetPixel(hdc,xc+a,yc+b,color);
22 | SetPixel(hdc,xc+a,yc-b,color);
23 | SetPixel(hdc,xc-a,yc+b,color);
24 | SetPixel(hdc,xc-a,yc-b,color);
25 | SetPixel(hdc,xc+b,yc+a,color);
26 | SetPixel(hdc,xc+b,yc-a,color);
27 | SetPixel(hdc,xc-b,yc+a,color);
28 | SetPixel(hdc,xc-b,yc-a,color);
29 | }
30 |
31 | void DrawCircleDirect(HDC hdc,int xc,int yc,double R,COLORREF color)
32 | {
33 | double y=0;
34 | double theta=0;
35 | double dtheta=1.0/R;
36 | for(int x=R; x>y ; theta+=dtheta)
37 | {
38 | Draw8Points(hdc,xc,yc,Round(x),Round(y),color);
39 | x=R*cos(theta);
40 | y=R*sin(theta);
41 | }
42 | }
43 |
44 | /* Make the class name into a global variable */
45 | TCHAR szClassName[ ] = _T("CodeBlocksWindowsApp");
46 | int x1,x2,y3,y2;
47 | int WINAPI WinMain (HINSTANCE hThisInstance,
48 | HINSTANCE hPrevInstance,
49 | LPSTR lpszArgument,
50 | int nCmdShow)
51 | {
52 | HWND hwnd; /* This is the handle for our window */
53 | MSG messages; /* Here messages to the application are saved */
54 | WNDCLASSEX wincl; /* Data structure for the windowclass */
55 |
56 | /* The Window structure */
57 | wincl.hInstance = hThisInstance;
58 | wincl.lpszClassName = szClassName;
59 | wincl.lpfnWndProc = WindowProcedure; /* This function is called by windows */
60 | wincl.style = CS_DBLCLKS; /* Catch double-clicks */
61 | wincl.cbSize = sizeof (WNDCLASSEX);
62 |
63 | /* Use default icon and mouse-pointer */
64 | wincl.hIcon = LoadIcon (NULL, IDI_APPLICATION);
65 | wincl.hIconSm = LoadIcon (NULL, IDI_APPLICATION);
66 | wincl.hCursor = LoadCursor (NULL, IDC_ARROW);
67 | wincl.lpszMenuName = NULL; /* No menu */
68 | wincl.cbClsExtra = 0; /* No extra bytes after the window class */
69 | wincl.cbWndExtra = 0; /* structure or the window instance */
70 | /* Use Windows's default colour as the background of the window */
71 | wincl.hbrBackground = (HBRUSH) COLOR_BACKGROUND;
72 |
73 | /* Register the window class, and if it fails quit the program */
74 | if (!RegisterClassEx (&wincl))
75 | return 0;
76 |
77 | /* The class is registered, let's create the program*/
78 | hwnd = CreateWindowEx (
79 | 0, /* Extended possibilites for variation */
80 | szClassName, /* Classname */
81 | _T("Code::Blocks Template Windows App"), /* Title Text */
82 | WS_OVERLAPPEDWINDOW, /* default window */
83 | CW_USEDEFAULT, /* Windows decides the position */
84 | CW_USEDEFAULT, /* where the window ends up on the screen */
85 | 544, /* The programs width */
86 | 375, /* and height in pixels */
87 | HWND_DESKTOP, /* The window is a child-window to desktop */
88 | NULL, /* No menu */
89 | hThisInstance, /* Program Instance handler */
90 | NULL /* No Window Creation data */
91 | );
92 |
93 | /* Make the window visible on the screen */
94 | ShowWindow (hwnd, nCmdShow);
95 |
96 | /* Run the message loop. It will run until GetMessage() returns 0 */
97 | while (GetMessage (&messages, NULL, 0, 0))
98 | {
99 | /* Translate virtual-key messages into character messages */
100 | TranslateMessage(&messages);
101 | /* Send message to WindowProcedure */
102 | DispatchMessage(&messages);
103 | }
104 |
105 | /* The program return-value is 0 - The value that PostQuitMessage() gave */
106 | return messages.wParam;
107 | }
108 |
109 |
110 | /* This function is called by the Windows function DispatchMessage() */
111 |
112 | LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
113 | {
114 | switch (message) /* handle the messages */
115 | {
116 | case WM_LBUTTONDOWN:
117 | {
118 | x1=LOWORD(lParam);
119 | y3=HIWORD(lParam);
120 | break;
121 | }
122 | case WM_LBUTTONUP:
123 | {
124 | HDC hdc=GetDC(hwnd);
125 | x2=LOWORD(lParam);
126 | y2=HIWORD(lParam);
127 | double radius=sqrt((x2-x1)*(x2-x1)+(y2-y3)*(y2-y3));
128 | DrawCircleDirect(hdc,x1,y3,radius,RGB(0,0,255));
129 | ReleaseDC(hwnd,hdc);
130 | break;
131 | }
132 | case WM_DESTROY:
133 | PostQuitMessage (0); /* send a WM_QUIT to the message queue */
134 | break;
135 | default: /* for messages that we don't deal with */
136 | return DefWindowProc (hwnd, message, wParam, lParam);
137 | }
138 |
139 | return 0;
140 | }
141 |
--------------------------------------------------------------------------------
/Graphics Circle Draw Polar Direct/obj/Debug/main.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sarah-Hesham-2022/ComputerGraphics-Algorithms-With-CPP/bc6119223c770a5c4688a67c5f4a43eba9f26ef1/Graphics Circle Draw Polar Direct/obj/Debug/main.o
--------------------------------------------------------------------------------
/Graphics Circle Drawing Iterative Polar Method/Graphics Circle Drawing Iterative Polar Method.cbp:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/Graphics Circle Drawing Iterative Polar Method/Graphics Circle Drawing Iterative Polar Method.layout:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/Graphics Circle Drawing Iterative Polar Method/bin/Debug/Graphics Circle Drawing Iterative Polar Method.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sarah-Hesham-2022/ComputerGraphics-Algorithms-With-CPP/bc6119223c770a5c4688a67c5f4a43eba9f26ef1/Graphics Circle Drawing Iterative Polar Method/bin/Debug/Graphics Circle Drawing Iterative Polar Method.exe
--------------------------------------------------------------------------------
/Graphics Circle Drawing Iterative Polar Method/main.cpp:
--------------------------------------------------------------------------------
1 | #if defined(UNICODE) && !defined(_UNICODE)
2 | #define _UNICODE
3 | #elif defined(_UNICODE) && !defined(UNICODE)
4 | #define UNICODE
5 | #endif
6 |
7 | #include
8 | #include
9 | #include
10 |
11 | /* Declare Windows procedure */
12 | LRESULT CALLBACK WindowProcedure (HWND, UINT, WPARAM, LPARAM);
13 |
14 | int Round(double x)
15 | {
16 | return int(x+0.5);
17 | }
18 | void Draw8Points(HDC hdc,int xc,int yc,int a,int b,COLORREF c )
19 | {
20 | SetPixel(hdc,xc+a,yc+b,c);
21 | SetPixel(hdc,xc+a,yc-b,c);
22 | SetPixel(hdc,xc-a,yc+b,c);
23 | SetPixel(hdc,xc-a,yc-b,c);
24 | SetPixel(hdc,xc+b,yc+a,c);
25 | SetPixel(hdc,xc+b,yc-a,c);
26 | SetPixel(hdc,xc-b,yc+a,c);
27 | SetPixel(hdc,xc-b,yc-a,c);
28 | }
29 | void DrawCircle(HDC hdc,double xc,double yc,double radius,COLORREF c)
30 | {
31 | double dtheta=1.0/radius;
32 | double cdtheta=cos(dtheta);
33 | double sdtheta=sin(dtheta);
34 | double x=0;
35 | double y=radius;
36 | Draw8Points(hdc,xc,yc,x,y,c);
37 | while(x
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/Graphics Circle Lines/Graphics Circle Lines.depend:
--------------------------------------------------------------------------------
1 | # depslib dependency file v1.0
2 | 1637526179 source:c:\users\sarah hesham\onedrive\documents\c++\graphics circle lines\main.cpp
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/Graphics Circle Lines/Graphics Circle Lines.layout:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/Graphics Circle Lines/bin/Debug/Graphics Circle Lines.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sarah-Hesham-2022/ComputerGraphics-Algorithms-With-CPP/bc6119223c770a5c4688a67c5f4a43eba9f26ef1/Graphics Circle Lines/bin/Debug/Graphics Circle Lines.exe
--------------------------------------------------------------------------------
/Graphics Circle Lines/obj/Debug/main.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sarah-Hesham-2022/ComputerGraphics-Algorithms-With-CPP/bc6119223c770a5c4688a67c5f4a43eba9f26ef1/Graphics Circle Lines/obj/Debug/main.o
--------------------------------------------------------------------------------
/Graphics Convert Non Convex To Convex/Graphics Convert Non Convex To Convex.cbp:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/Graphics Convert Non Convex To Convex/Graphics Convert Non Convex To Convex.depend:
--------------------------------------------------------------------------------
1 | # depslib dependency file v1.0
2 | 1639242653 source:c:\users\sarah hesham\onedrive\documents\c++\graphics convert non convex to convex\main.cpp
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/Graphics Convert Non Convex To Convex/Graphics Convert Non Convex To Convex.layout:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/Graphics Convert Non Convex To Convex/bin/Debug/Graphics Convert Non Convex To Convex.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sarah-Hesham-2022/ComputerGraphics-Algorithms-With-CPP/bc6119223c770a5c4688a67c5f4a43eba9f26ef1/Graphics Convert Non Convex To Convex/bin/Debug/Graphics Convert Non Convex To Convex.exe
--------------------------------------------------------------------------------
/Graphics Convert Non Convex To Convex/obj/Debug/main.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sarah-Hesham-2022/ComputerGraphics-Algorithms-With-CPP/bc6119223c770a5c4688a67c5f4a43eba9f26ef1/Graphics Convert Non Convex To Convex/obj/Debug/main.o
--------------------------------------------------------------------------------
/Graphics Convex Polygon Draw From PDF/Graphics Convex Polygon Draw From PDF.cbp:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/Graphics Convex Polygon Draw From PDF/Graphics Convex Polygon Draw From PDF.cscope_file_list:
--------------------------------------------------------------------------------
1 | "C:\Users\Sarah Hesham\OneDrive\Documents\C++\Graphics Convex Polygon Draw From PDF\main.cpp"
2 |
--------------------------------------------------------------------------------
/Graphics Convex Polygon Draw From PDF/Graphics Convex Polygon Draw From PDF.depend:
--------------------------------------------------------------------------------
1 | # depslib dependency file v1.0
2 | 1640166707 source:c:\users\sarah hesham\onedrive\documents\c++\graphics convex polygon draw from pdf\main.cpp
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/Graphics Convex Polygon Draw From PDF/Graphics Convex Polygon Draw From PDF.layout:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/Graphics Convex Polygon Draw From PDF/bin/Debug/Graphics Convex Polygon Draw From PDF.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sarah-Hesham-2022/ComputerGraphics-Algorithms-With-CPP/bc6119223c770a5c4688a67c5f4a43eba9f26ef1/Graphics Convex Polygon Draw From PDF/bin/Debug/Graphics Convex Polygon Draw From PDF.exe
--------------------------------------------------------------------------------
/Graphics Convex Polygon Draw From PDF/obj/Debug/main.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sarah-Hesham-2022/ComputerGraphics-Algorithms-With-CPP/bc6119223c770a5c4688a67c5f4a43eba9f26ef1/Graphics Convex Polygon Draw From PDF/obj/Debug/main.o
--------------------------------------------------------------------------------
/Graphics Cradinal Splines/Graphics Cradinal Splines.cbp:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/Graphics Cradinal Splines/Graphics Cradinal Splines.depend:
--------------------------------------------------------------------------------
1 | # depslib dependency file v1.0
2 | 1637849798 source:c:\users\sarah hesham\onedrive\documents\c++\graphics cradinal splines\main.cpp
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/Graphics Cradinal Splines/Graphics Cradinal Splines.layout:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/Graphics Cradinal Splines/bin/Debug/Graphics Cradinal Splines.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sarah-Hesham-2022/ComputerGraphics-Algorithms-With-CPP/bc6119223c770a5c4688a67c5f4a43eba9f26ef1/Graphics Cradinal Splines/bin/Debug/Graphics Cradinal Splines.exe
--------------------------------------------------------------------------------
/Graphics Cradinal Splines/obj/Debug/main.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sarah-Hesham-2022/ComputerGraphics-Algorithms-With-CPP/bc6119223c770a5c4688a67c5f4a43eba9f26ef1/Graphics Cradinal Splines/obj/Debug/main.o
--------------------------------------------------------------------------------
/Graphics Determine Whether Convex Polygon or not/Graphics Determine Whether Convex Polygon or not.cbp:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/Graphics Determine Whether Convex Polygon or not/Graphics Determine Whether Convex Polygon or not.depend:
--------------------------------------------------------------------------------
1 | # depslib dependency file v1.0
2 | 1639132411 source:c:\users\sarah hesham\onedrive\documents\c++\graphics determine whether convex polygon or not\main.cpp
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/Graphics Determine Whether Convex Polygon or not/Graphics Determine Whether Convex Polygon or not.layout:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/Graphics Determine Whether Convex Polygon or not/bin/Debug/Graphics Determine Whether Convex Polygon or not.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sarah-Hesham-2022/ComputerGraphics-Algorithms-With-CPP/bc6119223c770a5c4688a67c5f4a43eba9f26ef1/Graphics Determine Whether Convex Polygon or not/bin/Debug/Graphics Determine Whether Convex Polygon or not.exe
--------------------------------------------------------------------------------
/Graphics Determine Whether Convex Polygon or not/obj/Debug/main.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sarah-Hesham-2022/ComputerGraphics-Algorithms-With-CPP/bc6119223c770a5c4688a67c5f4a43eba9f26ef1/Graphics Determine Whether Convex Polygon or not/obj/Debug/main.o
--------------------------------------------------------------------------------
/Graphics Diamond Draw/Graphics Diamond Draw.cbp:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/Graphics Diamond Draw/Graphics Diamond Draw.layout:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/Graphics Diamond Draw/bin/Debug/Graphics Diamond Draw.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sarah-Hesham-2022/ComputerGraphics-Algorithms-With-CPP/bc6119223c770a5c4688a67c5f4a43eba9f26ef1/Graphics Diamond Draw/bin/Debug/Graphics Diamond Draw.exe
--------------------------------------------------------------------------------
/Graphics Diamond Draw/main.cpp:
--------------------------------------------------------------------------------
1 | #if defined(UNICODE) && !defined(_UNICODE)
2 | #define _UNICODE
3 | #elif defined(_UNICODE) && !defined(UNICODE)
4 | #define UNICODE
5 | #endif
6 |
7 | #include
8 | #include
9 |
10 | /* Declare Windows procedure */
11 | LRESULT CALLBACK WindowProcedure (HWND, UINT, WPARAM, LPARAM);
12 |
13 | /* Make the class name into a global variable */
14 | TCHAR szClassName[ ] = _T("CodeBlocksWindowsApp");
15 | void Draw4Points(HDC hdc,int xc,int yc,int x,int y)
16 | {
17 | SetPixel(hdc,xc+x,yc+y,RGB(0,0,255));
18 | SetPixel(hdc,xc-x,yc+y,RGB(0,0,255));
19 | SetPixel(hdc,xc+x,yc-y,RGB(0,0,255));
20 | SetPixel(hdc,xc-x,yc-y,RGB(0,0,255));
21 | }
22 | void DrawDiamond(HDC hdc,int xc,int yc,int a,int b)
23 | {
24 | int dx =a;
25 | int dy = b;
26 |
27 | int twodx = 2 * dx;
28 | int twody = 2 * dy;
29 |
30 | int p;
31 | int x = a;
32 | int y = 0;
33 |
34 | Draw4Points(hdc,xc,yc,x,y);
35 |
36 | p = twodx - dy;
37 | for(y = 1; y <= b ; y++)
38 | {
39 | if ( p >= 0 )
40 | {
41 | p +=(twodx - twody);
42 | x--;
43 | }
44 | else
45 | {
46 | p += twodx;
47 | }
48 |
49 | Draw4Points(hdc,xc,yc,x,y);
50 | }
51 | }
52 |
53 |
54 | int WINAPI WinMain (HINSTANCE hThisInstance,
55 | HINSTANCE hPrevInstance,
56 | LPSTR lpszArgument,
57 | int nCmdShow)
58 | {
59 | HWND hwnd; /* This is the handle for our window */
60 | MSG messages; /* Here messages to the application are saved */
61 | WNDCLASSEX wincl; /* Data structure for the windowclass */
62 |
63 | /* The Window structure */
64 | wincl.hInstance = hThisInstance;
65 | wincl.lpszClassName = szClassName;
66 | wincl.lpfnWndProc = WindowProcedure; /* This function is called by windows */
67 | wincl.style = CS_DBLCLKS; /* Catch double-clicks */
68 | wincl.cbSize = sizeof (WNDCLASSEX);
69 |
70 | /* Use default icon and mouse-pointer */
71 | wincl.hIcon = LoadIcon (NULL, IDI_APPLICATION);
72 | wincl.hIconSm = LoadIcon (NULL, IDI_APPLICATION);
73 | wincl.hCursor = LoadCursor (NULL, IDC_ARROW);
74 | wincl.lpszMenuName = NULL; /* No menu */
75 | wincl.cbClsExtra = 0; /* No extra bytes after the window class */
76 | wincl.cbWndExtra = 0; /* structure or the window instance */
77 | /* Use Windows's default colour as the background of the window */
78 | wincl.hbrBackground = (HBRUSH) COLOR_BACKGROUND;
79 |
80 | /* Register the window class, and if it fails quit the program */
81 | if (!RegisterClassEx (&wincl))
82 | return 0;
83 |
84 | /* The class is registered, let's create the program*/
85 | hwnd = CreateWindowEx (
86 | 0, /* Extended possibilites for variation */
87 | szClassName, /* Classname */
88 | _T("Code::Blocks Template Windows App"), /* Title Text */
89 | WS_OVERLAPPEDWINDOW, /* default window */
90 | CW_USEDEFAULT, /* Windows decides the position */
91 | CW_USEDEFAULT, /* where the window ends up on the screen */
92 | 544, /* The programs width */
93 | 375, /* and height in pixels */
94 | HWND_DESKTOP, /* The window is a child-window to desktop */
95 | NULL, /* No menu */
96 | hThisInstance, /* Program Instance handler */
97 | NULL /* No Window Creation data */
98 | );
99 |
100 | /* Make the window visible on the screen */
101 | ShowWindow (hwnd, nCmdShow);
102 |
103 | /* Run the message loop. It will run until GetMessage() returns 0 */
104 | while (GetMessage (&messages, NULL, 0, 0))
105 | {
106 | /* Translate virtual-key messages into character messages */
107 | TranslateMessage(&messages);
108 | /* Send message to WindowProcedure */
109 | DispatchMessage(&messages);
110 | }
111 |
112 | /* The program return-value is 0 - The value that PostQuitMessage() gave */
113 | return messages.wParam;
114 | }
115 |
116 |
117 | /* This function is called by the Windows function DispatchMessage() */
118 | LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
119 | {
120 | switch (message) /* handle the messages */
121 | {
122 | case WM_LBUTTONDBLCLK:
123 | {
124 | HDC hdc=GetDC(hwnd);
125 | DrawDiamond(hdc,880,660,50,80);
126 | ReleaseDC(hwnd,hdc);
127 | break;
128 | }
129 | case WM_DESTROY:
130 | PostQuitMessage (0); /* send a WM_QUIT to the message queue */
131 | break;
132 | default: /* for messages that we don't deal with */
133 | return DefWindowProc (hwnd, message, wParam, lParam);
134 | }
135 |
136 | return 0;
137 | }
138 |
--------------------------------------------------------------------------------
/Graphics Diamond Draw/obj/Debug/main.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sarah-Hesham-2022/ComputerGraphics-Algorithms-With-CPP/bc6119223c770a5c4688a67c5f4a43eba9f26ef1/Graphics Diamond Draw/obj/Debug/main.o
--------------------------------------------------------------------------------
/Graphics Draw 2 Circles without 1st Quad inside each other/Graphics Draw 2 Circles without 1st Quad inside each other.cbp:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/Graphics Draw 2 Circles without 1st Quad inside each other/Graphics Draw 2 Circles without 1st Quad inside each other.depend:
--------------------------------------------------------------------------------
1 | # depslib dependency file v1.0
2 | 1637530344 source:c:\users\sarah hesham\onedrive\documents\c++\graphics draw 2 circles without 1st quad inside each other\main.cpp
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/Graphics Draw 2 Circles without 1st Quad inside each other/Graphics Draw 2 Circles without 1st Quad inside each other.layout:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/Graphics Draw 2 Circles without 1st Quad inside each other/bin/Debug/Graphics Draw 2 Circles without 1st Quad inside each other.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sarah-Hesham-2022/ComputerGraphics-Algorithms-With-CPP/bc6119223c770a5c4688a67c5f4a43eba9f26ef1/Graphics Draw 2 Circles without 1st Quad inside each other/bin/Debug/Graphics Draw 2 Circles without 1st Quad inside each other.exe
--------------------------------------------------------------------------------
/Graphics Draw 2 Circles without 1st Quad inside each other/obj/Debug/main.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sarah-Hesham-2022/ComputerGraphics-Algorithms-With-CPP/bc6119223c770a5c4688a67c5f4a43eba9f26ef1/Graphics Draw 2 Circles without 1st Quad inside each other/obj/Debug/main.o
--------------------------------------------------------------------------------
/Graphics Draw Circle Lines With Filling/Graphics Draw Circle Lines With Filling.cbp:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/Graphics Draw Circle Lines With Filling/Graphics Draw Circle Lines With Filling.depend:
--------------------------------------------------------------------------------
1 | # depslib dependency file v1.0
2 | 1637593327 source:c:\users\sarah hesham\onedrive\documents\c++\graphics draw circle lines with filling\main.cpp
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/Graphics Draw Circle Lines With Filling/Graphics Draw Circle Lines With Filling.layout:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/Graphics Draw Circle Lines With Filling/bin/Debug/Graphics Draw Circle Lines With Filling.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sarah-Hesham-2022/ComputerGraphics-Algorithms-With-CPP/bc6119223c770a5c4688a67c5f4a43eba9f26ef1/Graphics Draw Circle Lines With Filling/bin/Debug/Graphics Draw Circle Lines With Filling.exe
--------------------------------------------------------------------------------
/Graphics Draw Circle Lines With Filling/obj/Debug/main.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sarah-Hesham-2022/ComputerGraphics-Algorithms-With-CPP/bc6119223c770a5c4688a67c5f4a43eba9f26ef1/Graphics Draw Circle Lines With Filling/obj/Debug/main.o
--------------------------------------------------------------------------------
/Graphics Draw Curve Direct parameters/Graphics Draw Curve Direct parameters.cbp:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/Graphics Draw Curve Direct parameters/Graphics Draw Curve Direct parameters.depend:
--------------------------------------------------------------------------------
1 | # depslib dependency file v1.0
2 | 1638046294 source:c:\users\sarah hesham\onedrive\documents\c++\graphics draw curve direct parameters\main.cpp
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/Graphics Draw Curve Direct parameters/Graphics Draw Curve Direct parameters.layout:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/Graphics Draw Curve Direct parameters/bin/Debug/Graphics Draw Curve Direct parameters.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sarah-Hesham-2022/ComputerGraphics-Algorithms-With-CPP/bc6119223c770a5c4688a67c5f4a43eba9f26ef1/Graphics Draw Curve Direct parameters/bin/Debug/Graphics Draw Curve Direct parameters.exe
--------------------------------------------------------------------------------
/Graphics Draw Curve Direct parameters/main.cpp:
--------------------------------------------------------------------------------
1 | #if defined(UNICODE) && !defined(_UNICODE)
2 | #define _UNICODE
3 | #elif defined(_UNICODE) && !defined(UNICODE)
4 | #define UNICODE
5 | #endif
6 |
7 | #include
8 | #include
9 |
10 | /* Declare Windows procedure */
11 | LRESULT CALLBACK WindowProcedure (HWND, UINT, WPARAM, LPARAM);
12 | class Vector4
13 | {
14 | public:
15 | double x1;
16 | double u1;
17 | double x2;
18 | double v[3];
19 | Vector4(double a=0,double b=0,double c=0)
20 | {
21 | v[0]=x1=a;
22 | v[1]=u1=b;
23 | v[2]=x2=c;
24 | }
25 | Vector4(const Vector4& v2)
26 | {
27 | memcpy(v,v2.v,3*sizeof(double));
28 | }
29 | double&operator[](int index)
30 | {
31 | return v[index];
32 | }
33 | };
34 | double operator*(Vector4 &v1,Vector4& v2)
35 | {
36 | return v1[0]*v2[0]+v1[1]*v2[1]+v1[2]*v2[2];
37 | }
38 | int Round(double x)
39 | {
40 | return int(x+0.5);
41 | }
42 | void DrawHermiteCurve(HDC hdc,double x1,double x2,double x3,double y1,double y2,double y3,int n,COLORREF c)
43 | {
44 | double dt=1.0/n;
45 | Vector4 x(x1,x2,x3);
46 | Vector4 y(y1,y2,y3);
47 | double a=x1;
48 | double b=y1;
49 | double d1x=dt*x2*dt+x1*dt;
50 | double d2x=dt*dt*2*x2;
51 | double d1y=dt*y2*dt+y1*dt;
52 | double d2y=dt*dt*y2*2;
53 | for(double t=dt; t<1; t+=dt)
54 | {
55 | SetPixel(hdc,Round(a),Round(b),c);
56 | a+=(d1x);
57 | b+=(d1y);
58 | d1x+=d2x;
59 | d1y+=d2y;
60 |
61 | }
62 | }
63 | /* Make the class name into a global variable */
64 | TCHAR szClassName[ ] = _T("CodeBlocksWindowsApp");
65 |
66 | int WINAPI WinMain (HINSTANCE hThisInstance,
67 | HINSTANCE hPrevInstance,
68 | LPSTR lpszArgument,
69 | int nCmdShow)
70 | {
71 | HWND hwnd; /* This is the handle for our window */
72 | MSG messages; /* Here messages to the application are saved */
73 | WNDCLASSEX wincl; /* Data structure for the windowclass */
74 |
75 | /* The Window structure */
76 | wincl.hInstance = hThisInstance;
77 | wincl.lpszClassName = szClassName;
78 | wincl.lpfnWndProc = WindowProcedure; /* This function is called by windows */
79 | wincl.style = CS_DBLCLKS; /* Catch double-clicks */
80 | wincl.cbSize = sizeof (WNDCLASSEX);
81 |
82 | /* Use default icon and mouse-pointer */
83 | wincl.hIcon = LoadIcon (NULL, IDI_APPLICATION);
84 | wincl.hIconSm = LoadIcon (NULL, IDI_APPLICATION);
85 | wincl.hCursor = LoadCursor (NULL, IDC_ARROW);
86 | wincl.lpszMenuName = NULL; /* No menu */
87 | wincl.cbClsExtra = 0; /* No extra bytes after the window class */
88 | wincl.cbWndExtra = 0; /* structure or the window instance */
89 | /* Use Windows's default colour as the background of the window */
90 | wincl.hbrBackground = (HBRUSH) COLOR_BACKGROUND;
91 |
92 | /* Register the window class, and if it fails quit the program */
93 | if (!RegisterClassEx (&wincl))
94 | return 0;
95 |
96 | /* The class is registered, let's create the program*/
97 | hwnd = CreateWindowEx (
98 | 0, /* Extended possibilites for variation */
99 | szClassName, /* Classname */
100 | _T("Code::Blocks Template Windows App"), /* Title Text */
101 | WS_OVERLAPPEDWINDOW, /* default window */
102 | CW_USEDEFAULT, /* Windows decides the position */
103 | CW_USEDEFAULT, /* where the window ends up on the screen */
104 | 544, /* The programs width */
105 | 375, /* and height in pixels */
106 | HWND_DESKTOP, /* The window is a child-window to desktop */
107 | NULL, /* No menu */
108 | hThisInstance, /* Program Instance handler */
109 | NULL /* No Window Creation data */
110 | );
111 |
112 | /* Make the window visible on the screen */
113 | ShowWindow (hwnd, nCmdShow);
114 |
115 | /* Run the message loop. It will run until GetMessage() returns 0 */
116 | while (GetMessage (&messages, NULL, 0, 0))
117 | {
118 | /* Translate virtual-key messages into character messages */
119 | TranslateMessage(&messages);
120 | /* Send message to WindowProcedure */
121 | DispatchMessage(&messages);
122 | }
123 |
124 | /* The program return-value is 0 - The value that PostQuitMessage() gave */
125 | return messages.wParam;
126 | }
127 |
128 |
129 | /* This function is called by the Windows function DispatchMessage() */
130 | LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
131 | {
132 | switch (message) /* handle the messages */
133 | {
134 | case WM_DESTROY:
135 | {
136 | PostQuitMessage (0); /* send a WM_QUIT to the message queue */
137 | break;
138 | }
139 | case WM_LBUTTONDBLCLK:
140 | {
141 | HDC hdc=GetDC(hwnd);
142 | DrawHermiteCurve(hdc,10,205,100,50,100,100,120000,RGB(0,0,255));
143 | ReleaseDC(hwnd,hdc);
144 | break;
145 | }
146 | default: /* for messages that we don't deal with */
147 | return DefWindowProc (hwnd, message, wParam, lParam);
148 | }
149 |
150 | return 0;
151 | }
152 |
--------------------------------------------------------------------------------
/Graphics Draw Curve Direct parameters/obj/Debug/main.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sarah-Hesham-2022/ComputerGraphics-Algorithms-With-CPP/bc6119223c770a5c4688a67c5f4a43eba9f26ef1/Graphics Draw Curve Direct parameters/obj/Debug/main.o
--------------------------------------------------------------------------------
/Graphics Draw a Flower/Graphics Draw a Flower.cbp:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/Graphics Draw a Flower/Graphics Draw a Flower.layout:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/Graphics Draw a Flower/bin/Debug/Graphics Draw a Flower.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sarah-Hesham-2022/ComputerGraphics-Algorithms-With-CPP/bc6119223c770a5c4688a67c5f4a43eba9f26ef1/Graphics Draw a Flower/bin/Debug/Graphics Draw a Flower.exe
--------------------------------------------------------------------------------
/Graphics Draw a Flower/main.cpp:
--------------------------------------------------------------------------------
1 | #if defined(UNICODE) && !defined(_UNICODE)
2 | #define _UNICODE
3 | #elif defined(_UNICODE) && !defined(UNICODE)
4 | #define UNICODE
5 | #endif
6 |
7 | #include
8 | #include
9 | #include
10 |
11 | /* Declare Windows procedure */
12 | LRESULT CALLBACK WindowProcedure (HWND, UINT, WPARAM, LPARAM);
13 |
14 | void Draw8Points(HDC hdc,int xc,int yc,int a,int b,COLORREF c)
15 | {
16 | SetPixel(hdc,xc+a,yc+b,c);
17 | SetPixel(hdc,xc+a,yc-b,c);
18 | SetPixel(hdc,xc-a,yc+b,c);
19 | SetPixel(hdc,xc-a,yc-b,c);
20 | SetPixel(hdc,xc+b,yc+a,c);
21 | SetPixel(hdc,xc-b,yc+a,c);
22 | SetPixel(hdc,xc+b,yc-a,c);
23 | SetPixel(hdc,xc-b,yc-a,c);
24 | }
25 | void DrawFlower(HDC hdc,int xc,int yc,int radius,COLORREF c)
26 | {
27 | int x=0;
28 | int y=radius;
29 | Draw8Points(hdc,xc,yc,x,y,c);
30 | int d=1-radius;
31 | int d1=3;
32 | int d2=5-2*radius;
33 | while(x
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/Graphics Draw a Rhombus/Graphics Draw a Rhombus.layout:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/Graphics Draw a Rhombus/bin/Debug/Graphics Draw a Rhombus.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sarah-Hesham-2022/ComputerGraphics-Algorithms-With-CPP/bc6119223c770a5c4688a67c5f4a43eba9f26ef1/Graphics Draw a Rhombus/bin/Debug/Graphics Draw a Rhombus.exe
--------------------------------------------------------------------------------
/Graphics Draw a Rhombus/main.cpp:
--------------------------------------------------------------------------------
1 | #if defined(UNICODE) && !defined(_UNICODE)
2 | #define _UNICODE
3 | #elif defined(_UNICODE) && !defined(UNICODE)
4 | #define UNICODE
5 | #endif
6 |
7 | #include
8 | #include
9 | #include
10 |
11 | /* Declare Windows procedure */
12 | LRESULT CALLBACK WindowProcedure (HWND, UINT, WPARAM, LPARAM);
13 |
14 | void Draw8Points(HDC hdc,int xc,int yc,int a,int b,COLORREF c)
15 | {
16 | SetPixel(hdc,xc+a,yc+b,c);
17 | SetPixel(hdc,xc+a,yc-b,c);
18 | SetPixel(hdc,xc-a,yc+b,c);
19 | SetPixel(hdc,xc-a,yc-b,c);
20 | SetPixel(hdc,xc+b,yc+a,c);
21 | SetPixel(hdc,xc-b,yc+a,c);
22 | SetPixel(hdc,xc+b,yc-a,c);
23 | SetPixel(hdc,xc-b,yc-a,c);
24 | }
25 | void DrawRhombus(HDC hdc,int xc,int yc,int radius,COLORREF c)
26 | {
27 | int x=0;
28 | int y=radius;
29 | Draw8Points(hdc,xc,yc,x,y,c);
30 | int d=1-radius;
31 | int d1=3;
32 | int d2=5-2*radius;
33 | while(x
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/Graphics Ellipse Direct Polar Method/Graphics Ellipse Direct Polar Method.layout:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/Graphics Ellipse Direct Polar Method/bin/Debug/Graphics Ellipse Direct Polar Method.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sarah-Hesham-2022/ComputerGraphics-Algorithms-With-CPP/bc6119223c770a5c4688a67c5f4a43eba9f26ef1/Graphics Ellipse Direct Polar Method/bin/Debug/Graphics Ellipse Direct Polar Method.exe
--------------------------------------------------------------------------------
/Graphics Ellipse Direct Polar Method/main.cpp:
--------------------------------------------------------------------------------
1 | #if defined(UNICODE) && !defined(_UNICODE)
2 | #define _UNICODE
3 | #elif defined(_UNICODE) && !defined(UNICODE)
4 | #define UNICODE
5 | #endif
6 |
7 | #include
8 | #include
9 | #include
10 | int Max(int x,int y)
11 | {
12 | if(x>y)
13 | return x;
14 | return y;
15 | }
16 | int Round(double x)
17 | {
18 | return int(x+0.5);
19 | }
20 | void DrawEllipseDirectPolar(HDC hdc,int xc,int yc,int A,int B,COLORREF c)
21 | {
22 | double dtheta=1.0/Max(A,B);
23 | for(double theta=0; theta<6.28; theta+=dtheta)
24 | {
25 | double x=xc+A*cos(theta);
26 | double y=yc+B*sin(theta);
27 | SetPixel(hdc,Round(x),Round(y),c);
28 | }
29 | }
30 | /* Declare Windows procedure */
31 | LRESULT CALLBACK WindowProcedure (HWND, UINT, WPARAM, LPARAM);
32 |
33 | /* Make the class name into a global variable */
34 | TCHAR szClassName[ ] = _T("CodeBlocksWindowsApp");
35 |
36 | int WINAPI WinMain (HINSTANCE hThisInstance,
37 | HINSTANCE hPrevInstance,
38 | LPSTR lpszArgument,
39 | int nCmdShow)
40 | {
41 | HWND hwnd; /* This is the handle for our window */
42 | MSG messages; /* Here messages to the application are saved */
43 | WNDCLASSEX wincl; /* Data structure for the windowclass */
44 |
45 | /* The Window structure */
46 | wincl.hInstance = hThisInstance;
47 | wincl.lpszClassName = szClassName;
48 | wincl.lpfnWndProc = WindowProcedure; /* This function is called by windows */
49 | wincl.style = CS_DBLCLKS; /* Catch double-clicks */
50 | wincl.cbSize = sizeof (WNDCLASSEX);
51 |
52 | /* Use default icon and mouse-pointer */
53 | wincl.hIcon = LoadIcon (NULL, IDI_APPLICATION);
54 | wincl.hIconSm = LoadIcon (NULL, IDI_APPLICATION);
55 | wincl.hCursor = LoadCursor (NULL, IDC_ARROW);
56 | wincl.lpszMenuName = NULL; /* No menu */
57 | wincl.cbClsExtra = 0; /* No extra bytes after the window class */
58 | wincl.cbWndExtra = 0; /* structure or the window instance */
59 | /* Use Windows's default colour as the background of the window */
60 | wincl.hbrBackground = (HBRUSH) COLOR_BACKGROUND;
61 |
62 | /* Register the window class, and if it fails quit the program */
63 | if (!RegisterClassEx (&wincl))
64 | return 0;
65 |
66 | /* The class is registered, let's create the program*/
67 | hwnd = CreateWindowEx (
68 | 0, /* Extended possibilites for variation */
69 | szClassName, /* Classname */
70 | _T("Code::Blocks Template Windows App"), /* Title Text */
71 | WS_OVERLAPPEDWINDOW, /* default window */
72 | CW_USEDEFAULT, /* Windows decides the position */
73 | CW_USEDEFAULT, /* where the window ends up on the screen */
74 | 544, /* The programs width */
75 | 375, /* and height in pixels */
76 | HWND_DESKTOP, /* The window is a child-window to desktop */
77 | NULL, /* No menu */
78 | hThisInstance, /* Program Instance handler */
79 | NULL /* No Window Creation data */
80 | );
81 |
82 | /* Make the window visible on the screen */
83 | ShowWindow (hwnd, nCmdShow);
84 |
85 | /* Run the message loop. It will run until GetMessage() returns 0 */
86 | while (GetMessage (&messages, NULL, 0, 0))
87 | {
88 | /* Translate virtual-key messages into character messages */
89 | TranslateMessage(&messages);
90 | /* Send message to WindowProcedure */
91 | DispatchMessage(&messages);
92 | }
93 |
94 | /* The program return-value is 0 - The value that PostQuitMessage() gave */
95 | return messages.wParam;
96 | }
97 |
98 |
99 | /* This function is called by the Windows function DispatchMessage() */
100 | int xs,ys,xe,ye,x3,y3;
101 | double A, B;
102 | LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
103 | {
104 | switch (message) /* handle the messages */
105 | {
106 | case WM_DESTROY:
107 | PostQuitMessage (0); /* send a WM_QUIT to the message queue */
108 | break;
109 | case WM_LBUTTONDOWN:
110 | {
111 | xs=LOWORD(lParam);
112 | ys=HIWORD(lParam);
113 | break;
114 | }
115 | case WM_LBUTTONUP:
116 | {
117 | xe=LOWORD(lParam);
118 | ye=HIWORD(lParam);
119 | A=sqrt((xe-xs)*(xe-xs)+(ye-ys)*(ye-ys));
120 | break;
121 |
122 | }
123 | case WM_RBUTTONDOWN:
124 | {
125 | HDC hdc=GetDC(hwnd);
126 | x3=LOWORD(lParam);
127 | y3=HIWORD(lParam);
128 | B=sqrt((x3-xs)*(x3-xs)+(y3-ys)*(y3-ys));
129 | DrawEllipseDirectPolar(hdc,xs,ys,A,B,RGB(0,200,255));
130 | ReleaseDC(hwnd,hdc);
131 | break;
132 | }
133 | default: /* for messages that we don't deal with */
134 | return DefWindowProc (hwnd, message, wParam, lParam);
135 | }
136 |
137 | return 0;
138 | }
139 |
--------------------------------------------------------------------------------
/Graphics Ellipse Direct Polar Method/obj/Debug/main.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sarah-Hesham-2022/ComputerGraphics-Algorithms-With-CPP/bc6119223c770a5c4688a67c5f4a43eba9f26ef1/Graphics Ellipse Direct Polar Method/obj/Debug/main.o
--------------------------------------------------------------------------------
/Graphics Ellipse Draw Bresenham's Method/Graphics Ellipse Draw Bresenham's Method.cbp:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/Graphics Ellipse Draw Bresenham's Method/Graphics Ellipse Draw Bresenham's Method.depend:
--------------------------------------------------------------------------------
1 | # depslib dependency file v1.0
2 | 1637186095 source:c:\users\sarah hesham\onedrive\documents\c++\graphics ellipse draw bresenham's method\main.cpp
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/Graphics Ellipse Draw Bresenham's Method/Graphics Ellipse Draw Bresenham's Method.layout:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/Graphics Ellipse Draw Bresenham's Method/bin/Debug/Graphics Ellipse Draw Bresenham's Method.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sarah-Hesham-2022/ComputerGraphics-Algorithms-With-CPP/bc6119223c770a5c4688a67c5f4a43eba9f26ef1/Graphics Ellipse Draw Bresenham's Method/bin/Debug/Graphics Ellipse Draw Bresenham's Method.exe
--------------------------------------------------------------------------------
/Graphics Ellipse Draw Bresenham's Method/obj/Debug/main.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sarah-Hesham-2022/ComputerGraphics-Algorithms-With-CPP/bc6119223c770a5c4688a67c5f4a43eba9f26ef1/Graphics Ellipse Draw Bresenham's Method/obj/Debug/main.o
--------------------------------------------------------------------------------
/Graphics Ellipse Draw Bresenham's/Graphics Ellipse Draw Bresenham's.cbp:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/Graphics Ellipse Draw Bresenham's/Graphics Ellipse Draw Bresenham's.depend:
--------------------------------------------------------------------------------
1 | # depslib dependency file v1.0
2 | 1637865063 source:c:\users\sarah hesham\onedrive\documents\c++\graphics ellipse draw bresenham's\main.cpp
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/Graphics Ellipse Draw Bresenham's/Graphics Ellipse Draw Bresenham's.layout:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/Graphics Ellipse Draw Bresenham's/bin/Debug/Graphics Ellipse Draw Bresenham's.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sarah-Hesham-2022/ComputerGraphics-Algorithms-With-CPP/bc6119223c770a5c4688a67c5f4a43eba9f26ef1/Graphics Ellipse Draw Bresenham's/bin/Debug/Graphics Ellipse Draw Bresenham's.exe
--------------------------------------------------------------------------------
/Graphics Ellipse Draw Bresenham's/bin/Release/Graphics Ellipse Draw Bresenham's.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sarah-Hesham-2022/ComputerGraphics-Algorithms-With-CPP/bc6119223c770a5c4688a67c5f4a43eba9f26ef1/Graphics Ellipse Draw Bresenham's/bin/Release/Graphics Ellipse Draw Bresenham's.exe
--------------------------------------------------------------------------------
/Graphics Ellipse Draw Bresenham's/obj/Debug/main.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sarah-Hesham-2022/ComputerGraphics-Algorithms-With-CPP/bc6119223c770a5c4688a67c5f4a43eba9f26ef1/Graphics Ellipse Draw Bresenham's/obj/Debug/main.o
--------------------------------------------------------------------------------
/Graphics Ellipse Draw Bresenham's/obj/Release/main.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sarah-Hesham-2022/ComputerGraphics-Algorithms-With-CPP/bc6119223c770a5c4688a67c5f4a43eba9f26ef1/Graphics Ellipse Draw Bresenham's/obj/Release/main.o
--------------------------------------------------------------------------------
/Graphics Ellipse Draw Cartesian Equation/Graphics Ellipse Draw Cartesian Equation.cbp:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/Graphics Ellipse Draw Cartesian Equation/Graphics Ellipse Draw Cartesian Equation.depend:
--------------------------------------------------------------------------------
1 | # depslib dependency file v1.0
2 | 1636557572 source:c:\users\sarah hesham\onedrive\documents\c++\graphics ellipse draw cartesian equation\main.cpp
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/Graphics Ellipse Draw Cartesian Equation/Graphics Ellipse Draw Cartesian Equation.layout:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/Graphics Ellipse Draw Cartesian Equation/bin/Debug/Graphics Ellipse Draw Cartesian Equation.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sarah-Hesham-2022/ComputerGraphics-Algorithms-With-CPP/bc6119223c770a5c4688a67c5f4a43eba9f26ef1/Graphics Ellipse Draw Cartesian Equation/bin/Debug/Graphics Ellipse Draw Cartesian Equation.exe
--------------------------------------------------------------------------------
/Graphics Ellipse Draw Cartesian Equation/main.cpp:
--------------------------------------------------------------------------------
1 | #if defined(UNICODE) && !defined(_UNICODE)
2 | #define _UNICODE
3 | #elif defined(_UNICODE) && !defined(UNICODE)
4 | #define UNICODE
5 | #endif
6 |
7 | #include
8 | #include
9 | #include
10 |
11 | /* Declare Windows procedure */
12 | LRESULT CALLBACK WindowProcedure (HWND, UINT, WPARAM, LPARAM);
13 | int Round(double x)
14 | {
15 | return int(x+0.5);
16 | }
17 | void Draw4Points(HDC hdc,int xc,int yc,int a,int b,COLORREF c )
18 | {
19 | SetPixel(hdc,xc+a,yc+b,c);
20 | SetPixel(hdc,xc+a,yc-b,c);
21 | SetPixel(hdc,xc-a,yc+b,c);
22 | SetPixel(hdc,xc-a,yc-b,c);
23 | }
24 | void DrawEllipse(HDC hdc,int xc,int yc,int r1,int r2,COLORREF c)
25 | {
26 | double x=0;
27 | double y=r2;
28 | Draw4Points(hdc,xc,yc,x,y,c);
29 | while(x*r2*r2
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/Graphics Ellipse Draw Polar Equation/Graphics Ellipse Draw Polar Equation.depend:
--------------------------------------------------------------------------------
1 | # depslib dependency file v1.0
2 | 1636560673 source:c:\users\sarah hesham\onedrive\documents\c++\graphics ellipse draw polar equation\main.cpp
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/Graphics Ellipse Draw Polar Equation/Graphics Ellipse Draw Polar Equation.layout:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/Graphics Ellipse Draw Polar Equation/bin/Debug/Graphics Ellipse Draw Polar Equation.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sarah-Hesham-2022/ComputerGraphics-Algorithms-With-CPP/bc6119223c770a5c4688a67c5f4a43eba9f26ef1/Graphics Ellipse Draw Polar Equation/bin/Debug/Graphics Ellipse Draw Polar Equation.exe
--------------------------------------------------------------------------------
/Graphics Ellipse Draw Polar Equation/obj/Debug/main.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sarah-Hesham-2022/ComputerGraphics-Algorithms-With-CPP/bc6119223c770a5c4688a67c5f4a43eba9f26ef1/Graphics Ellipse Draw Polar Equation/obj/Debug/main.o
--------------------------------------------------------------------------------
/Graphics Ellipse Draw Polar Iterative Method/Graphics Ellipse Draw Polar Iterative Method.cbp:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/Graphics Ellipse Draw Polar Iterative Method/Graphics Ellipse Draw Polar Iterative Method.depend:
--------------------------------------------------------------------------------
1 | # depslib dependency file v1.0
2 | 1637609083 source:c:\users\sarah hesham\onedrive\documents\c++\graphics ellipse draw polar iterative method\main.cpp
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/Graphics Ellipse Draw Polar Iterative Method/Graphics Ellipse Draw Polar Iterative Method.layout:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/Graphics Ellipse Draw Polar Iterative Method/bin/Debug/Graphics Ellipse Draw Polar Iterative Method.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sarah-Hesham-2022/ComputerGraphics-Algorithms-With-CPP/bc6119223c770a5c4688a67c5f4a43eba9f26ef1/Graphics Ellipse Draw Polar Iterative Method/bin/Debug/Graphics Ellipse Draw Polar Iterative Method.exe
--------------------------------------------------------------------------------
/Graphics Ellipse Draw Polar Iterative Method/main.cpp:
--------------------------------------------------------------------------------
1 | #if defined(UNICODE) && !defined(_UNICODE)
2 | #define _UNICODE
3 | #elif defined(_UNICODE) && !defined(UNICODE)
4 | #define UNICODE
5 | #endif
6 |
7 | #include
8 | #include
9 | #include
10 | /* Declare Windows procedure */
11 | LRESULT CALLBACK WindowProcedure (HWND, UINT, WPARAM, LPARAM);
12 |
13 | void Draw4Points(HDC hdc,int xc,int yc,int a,int b,COLORREF c )
14 | {
15 | SetPixel(hdc,xc-a,yc+b,c);
16 | SetPixel(hdc,xc-a,yc-b,c);
17 | SetPixel(hdc,xc+a,yc+b,c);
18 | SetPixel(hdc,xc+a,yc-b,c);
19 | }
20 | int Round(double x)
21 | {
22 | return int(x+0.5);
23 | }
24 | int Max(int r1,int r2)
25 | {
26 | if(r1>r2)
27 | return r1;
28 | return r2;
29 | }
30 | void DrawEllipse(HDC hdc,int xc,int yc,double r1,double r2,COLORREF c)
31 | {
32 | double dtheta=1.0/Max(r1,r2);
33 | double ctheta=cos(dtheta);
34 | double stheta=sin(dtheta);
35 | double x=r1;
36 | double y=0;
37 | Draw4Points(hdc,xc,yc,x,y,c);
38 | while(x>0)
39 | {
40 | double x1=x*ctheta-(r1/r2)*y*stheta;
41 | y=y*ctheta+(r2/r1)*x*stheta;
42 | x=x1;
43 | Draw4Points(hdc,xc,yc,Round(x),Round(y),c);
44 | }
45 | }
46 | /* Make the class name into a global variable */
47 | TCHAR szClassName[ ] = _T("CodeBlocksWindowsApp");
48 |
49 | int WINAPI WinMain (HINSTANCE hThisInstance,
50 | HINSTANCE hPrevInstance,
51 | LPSTR lpszArgument,
52 | int nCmdShow)
53 | {
54 | HWND hwnd; /* This is the handle for our window */
55 | MSG messages; /* Here messages to the application are saved */
56 | WNDCLASSEX wincl; /* Data structure for the windowclass */
57 |
58 | /* The Window structure */
59 | wincl.hInstance = hThisInstance;
60 | wincl.lpszClassName = szClassName;
61 | wincl.lpfnWndProc = WindowProcedure; /* This function is called by windows */
62 | wincl.style = CS_DBLCLKS; /* Catch double-clicks */
63 | wincl.cbSize = sizeof (WNDCLASSEX);
64 |
65 | /* Use default icon and mouse-pointer */
66 | wincl.hIcon = LoadIcon (NULL, IDI_APPLICATION);
67 | wincl.hIconSm = LoadIcon (NULL, IDI_APPLICATION);
68 | wincl.hCursor = LoadCursor (NULL, IDC_ARROW);
69 | wincl.lpszMenuName = NULL; /* No menu */
70 | wincl.cbClsExtra = 0; /* No extra bytes after the window class */
71 | wincl.cbWndExtra = 0; /* structure or the window instance */
72 | /* Use Windows's default colour as the background of the window */
73 | wincl.hbrBackground = (HBRUSH) COLOR_BACKGROUND;
74 |
75 | /* Register the window class, and if it fails quit the program */
76 | if (!RegisterClassEx (&wincl))
77 | return 0;
78 |
79 | /* The class is registered, let's create the program*/
80 | hwnd = CreateWindowEx (
81 | 0, /* Extended possibilites for variation */
82 | szClassName, /* Classname */
83 | _T("Code::Blocks Template Windows App"), /* Title Text */
84 | WS_OVERLAPPEDWINDOW, /* default window */
85 | CW_USEDEFAULT, /* Windows decides the position */
86 | CW_USEDEFAULT, /* where the window ends up on the screen */
87 | 544, /* The programs width */
88 | 375, /* and height in pixels */
89 | HWND_DESKTOP, /* The window is a child-window to desktop */
90 | NULL, /* No menu */
91 | hThisInstance, /* Program Instance handler */
92 | NULL /* No Window Creation data */
93 | );
94 |
95 | /* Make the window visible on the screen */
96 | ShowWindow (hwnd, nCmdShow);
97 |
98 | /* Run the message loop. It will run until GetMessage() returns 0 */
99 | while (GetMessage (&messages, NULL, 0, 0))
100 | {
101 | /* Translate virtual-key messages into character messages */
102 | TranslateMessage(&messages);
103 | /* Send message to WindowProcedure */
104 | DispatchMessage(&messages);
105 | }
106 |
107 | /* The program return-value is 0 - The value that PostQuitMessage() gave */
108 | return messages.wParam;
109 | }
110 |
111 |
112 | /* This function is called by the Windows function DispatchMessage() */
113 | int xs,ys,xe,ye,x3,y3;
114 | LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
115 | {
116 | switch (message) /* handle the messages */
117 | {
118 | case WM_LBUTTONDOWN:
119 | {
120 | xs=LOWORD(lParam);
121 | ys=HIWORD(lParam);
122 | break;
123 | }
124 | case WM_LBUTTONUP:
125 | {
126 | xe=LOWORD(lParam);
127 | ye=HIWORD(lParam);
128 | break;
129 | }
130 | case WM_RBUTTONDOWN:
131 | {
132 | HDC hdc=GetDC(hwnd);
133 | x3=LOWORD(lParam);
134 | y3=HIWORD(lParam);
135 | double radius1=sqrt((xe-xs)*(xe-xs)+(ye-ys)*(ye-ys));
136 | double radius2=sqrt((x3-xs)*(x3-xs)+(y3-ys)*(y3-ys));
137 | DrawEllipse(hdc,xs,ys,radius1,radius2,RGB(255,0,0));
138 | ReleaseDC(hwnd,hdc);
139 | break;
140 | }
141 | case WM_DESTROY:
142 | PostQuitMessage (0); /* send a WM_QUIT to the message queue */
143 | break;
144 | default: /* for messages that we don't deal with */
145 | return DefWindowProc (hwnd, message, wParam, lParam);
146 | }
147 |
148 | return 0;
149 | }
150 |
--------------------------------------------------------------------------------
/Graphics Ellipse Draw Polar Iterative Method/obj/Debug/main.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sarah-Hesham-2022/ComputerGraphics-Algorithms-With-CPP/bc6119223c770a5c4688a67c5f4a43eba9f26ef1/Graphics Ellipse Draw Polar Iterative Method/obj/Debug/main.o
--------------------------------------------------------------------------------
/Graphics Ellipse Filling/Graphics Ellipse Filling.cbp:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/Graphics Ellipse Filling/Graphics Ellipse Filling.layout:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/Graphics Ellipse Filling/bin/Debug/Graphics Ellipse Filling.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sarah-Hesham-2022/ComputerGraphics-Algorithms-With-CPP/bc6119223c770a5c4688a67c5f4a43eba9f26ef1/Graphics Ellipse Filling/bin/Debug/Graphics Ellipse Filling.exe
--------------------------------------------------------------------------------
/Graphics Ellipse Filling/obj/Debug/main.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sarah-Hesham-2022/ComputerGraphics-Algorithms-With-CPP/bc6119223c770a5c4688a67c5f4a43eba9f26ef1/Graphics Ellipse Filling/obj/Debug/main.o
--------------------------------------------------------------------------------
/Graphics First Lec_Creation/Graphics First Lec..cbp:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
--------------------------------------------------------------------------------
/Graphics First Lec_Creation/Graphics First Lec..depend:
--------------------------------------------------------------------------------
1 | # depslib dependency file v1.0
2 | 1634584737 source:c:\users\sarah hesham\onedrive\documents\c++\graphics first lec.\main.cpp
3 |
4 |
5 |
--------------------------------------------------------------------------------
/Graphics First Lec_Creation/Graphics First Lec..layout:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/Graphics First Lec_Creation/bin/Debug/Graphics First Lec..exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sarah-Hesham-2022/ComputerGraphics-Algorithms-With-CPP/bc6119223c770a5c4688a67c5f4a43eba9f26ef1/Graphics First Lec_Creation/bin/Debug/Graphics First Lec..exe
--------------------------------------------------------------------------------
/Graphics First Lec_Creation/bin/Debug/Graphics First Lec.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sarah-Hesham-2022/ComputerGraphics-Algorithms-With-CPP/bc6119223c770a5c4688a67c5f4a43eba9f26ef1/Graphics First Lec_Creation/bin/Debug/Graphics First Lec.exe
--------------------------------------------------------------------------------
/Graphics First Lec_Creation/main.cpp:
--------------------------------------------------------------------------------
1 | #include
2 |
3 | LRESULT WINAPI WindowProcedure(HWND,UINT,WPARAM,LPARAM);//basic function drawings
4 |
5 | int APIENTRY WinMain(HINSTANCE hInst,HINSTANCE hPrevInst,LPSTR args,int nsh)
6 | {
7 | // MessageBox(NULL,"HELLO WORLD","My Window",MB_OK);
8 | WNDCLASS wc;
9 | wc.cbClsExtra=wc.cbWndExtra=0;
10 | wc.hbrBackground = (HBRUSH)GetStockObject(LTGRAY_BRUSH);
11 | wc.hCursor=LoadCursor(NULL,IDC_ARROW);
12 | wc.hIcon=LoadIcon(NULL,IDI_APPLICATION);
13 | wc.hInstance=hInst;
14 | wc.lpszClassName="My Window";
15 | wc.lpfnWndProc=WindowProcedure; //no brackets here as we are passing a pointer
16 | wc.style=CS_HREDRAW | CS_VREDRAW;
17 |
18 | if(!RegisterClass(&wc))
19 | return -1;
20 |
21 | HWND hWnd=CreateWindow("My Window","My Window Title",WS_OVERLAPPEDWINDOW,200,200,500,500,NULL,NULL,NULL,NULL);
22 | ShowWindow(hWnd,nsh);
23 | UpdateWindow(hWnd);
24 |
25 | HWND hwndButton = CreateWindow(
26 | "BUTTON", // Predefined class; Unicode assumed
27 | "OK BUTTON", // Button text
28 | WS_TABSTOP | WS_VISIBLE | WS_CHILD | BS_DEFPUSHBUTTON, // Styles
29 | 10, // x position
30 | 10, // y position
31 | 100, // Button width
32 | 100, // Button height
33 | hWnd, // Parent window
34 | NULL, // No menu.
35 | (HINSTANCE)GetWindowLongPtr(hWnd, GWLP_HINSTANCE),
36 | NULL); // Pointer not needed.
37 |
38 | HWND hwndEdit= CreateWindow("EDIT",
39 | NULL,
40 | WS_BORDER | WS_CHILD | WS_VISIBLE | WS_VSCROLL | ES_LEFT |
41 | ES_MULTILINE | ES_AUTOVSCROLL|WS_BORDER|WS_HSCROLL,
42 | 100,100,100,100,
43 | hWnd,
44 | NULL,
45 | (HINSTANCE) GetWindowLongPtr(hWnd, GWLP_HINSTANCE),
46 | NULL);
47 |
48 | HWND hwndList= CreateWindow("LISTBox",
49 | NULL,
50 | WS_BORDER | WS_CHILD | WS_VISIBLE | WS_VSCROLL | ES_LEFT |WS_BORDER
51 | |WS_HSCROLL|LBS_COMBOBOX|LBS_DISABLENOSCROLL|LBS_EXTENDEDSEL|LBS_MULTIPLESEL,
52 | 200,200,300,30,
53 | hWnd,
54 | NULL,
55 | (HINSTANCE) GetWindowLongPtr(hWnd, GWLP_HINSTANCE),
56 | NULL);
57 |
58 | MSG msg= {0};
59 | while(GetMessage((&msg),NULL,NULL,NULL))
60 | {
61 | TranslateMessage(&msg);
62 | DispatchMessage(&msg);
63 | }
64 | return 0;
65 | }
66 |
67 | LRESULT WINAPI WindowProcedure(HWND hWnd,UINT msg,WPARAM wc,LPARAM lp)
68 | {
69 | HDC hdc;
70 | switch(msg)
71 | {
72 | case WM_KEYDOWN:
73 | {
74 | hdc=GetDC(hWnd);
75 | Rectangle(hdc,900,1000,400,500);
76 | ReleaseDC(hWnd,hdc);
77 | break;
78 | }
79 | case WM_KEYUP:
80 | {
81 | hdc=GetDC(hWnd);
82 | Arc(hdc,100,200,200,400,300,600,400,800);
83 | ReleaseDC(hWnd,hdc);
84 | break;
85 | }
86 | case WM_LBUTTONDOWN:
87 | {
88 | // MessageBox(hWnd,"Hello","Welcome",MB_OK);
89 | hdc=GetDC(hWnd);
90 | //IMPORTANT ADD LIBRARY gdi32 .Just normal circle: Ellipse(hdc,100,100,400,400);
91 | Ellipse(hdc,LOWORD(lp)-50,HIWORD(lp)-50,LOWORD(lp)+50,HIWORD(lp)+50);//where the mouse clicks
92 | ReleaseDC(hWnd,hdc);
93 | break;
94 | }
95 | case WM_RBUTTONDOWN:
96 | {
97 | hdc=GetDC(hWnd);
98 | LineTo(hdc,LOWORD(lp)+100,HIWORD(lp)+100);
99 | ReleaseDC(hWnd,hdc);
100 | break;
101 | }
102 | case WM_CLOSE:
103 | {
104 | DestroyWindow(hWnd);
105 | break;
106 | }
107 | case WM_DESTROY:
108 | {
109 | PostQuitMessage(0);
110 | break;
111 | }
112 | default:
113 | return DefWindowProc(hWnd,msg,wc,lp);
114 | }
115 | }
116 |
117 |
--------------------------------------------------------------------------------
/Graphics First Lec_Creation/obj/Debug/main.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sarah-Hesham-2022/ComputerGraphics-Algorithms-With-CPP/bc6119223c770a5c4688a67c5f4a43eba9f26ef1/Graphics First Lec_Creation/obj/Debug/main.o
--------------------------------------------------------------------------------
/Graphics General Polygon Filling/Graphics General Polygon Filling.cbp:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/Graphics General Polygon Filling/Graphics General Polygon Filling.depend:
--------------------------------------------------------------------------------
1 | # depslib dependency file v1.0
2 | 1640168420 source:c:\users\sarah hesham\onedrive\documents\c++\graphics general polygon filling\main.cpp
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Graphics General Polygon Filling/Graphics General Polygon Filling.layout:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/Graphics General Polygon Filling/bin/Debug/Graphics General Polygon Filling.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sarah-Hesham-2022/ComputerGraphics-Algorithms-With-CPP/bc6119223c770a5c4688a67c5f4a43eba9f26ef1/Graphics General Polygon Filling/bin/Debug/Graphics General Polygon Filling.exe
--------------------------------------------------------------------------------
/Graphics General Polygon Filling/obj/Debug/main.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sarah-Hesham-2022/ComputerGraphics-Algorithms-With-CPP/bc6119223c770a5c4688a67c5f4a43eba9f26ef1/Graphics General Polygon Filling/obj/Debug/main.o
--------------------------------------------------------------------------------
/Graphics Hermite Curves/Graphics Hermite Curves.cbp:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/Graphics Hermite Curves/Graphics Hermite Curves.depend:
--------------------------------------------------------------------------------
1 | # depslib dependency file v1.0
2 | 1637166039 source:c:\users\sarah hesham\onedrive\documents\c++\graphics hermite curves\main.cpp
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/Graphics Hermite Curves/Graphics Hermite Curves.layout:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/Graphics Hermite Curves/bin/Debug/Graphics Hermite Curves.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sarah-Hesham-2022/ComputerGraphics-Algorithms-With-CPP/bc6119223c770a5c4688a67c5f4a43eba9f26ef1/Graphics Hermite Curves/bin/Debug/Graphics Hermite Curves.exe
--------------------------------------------------------------------------------
/Graphics Hermite Curves/obj/Debug/main.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sarah-Hesham-2022/ComputerGraphics-Algorithms-With-CPP/bc6119223c770a5c4688a67c5f4a43eba9f26ef1/Graphics Hermite Curves/obj/Debug/main.o
--------------------------------------------------------------------------------
/Graphics Lab 2 Midpoint/Graphics Lab 2 Midpoint.cbp:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/Graphics Lab 2 Midpoint/Graphics Lab 2 Midpoint.depend:
--------------------------------------------------------------------------------
1 | # depslib dependency file v1.0
2 | 1636205811 source:c:\users\sarah hesham\onedrive\documents\c++\graphics lab 2 midpoint\main.cpp
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/Graphics Lab 2 Midpoint/Graphics Lab 2 Midpoint.layout:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/Graphics Lab 2 Midpoint/bin/Debug/Graphics Lab 2 Midpoint.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sarah-Hesham-2022/ComputerGraphics-Algorithms-With-CPP/bc6119223c770a5c4688a67c5f4a43eba9f26ef1/Graphics Lab 2 Midpoint/bin/Debug/Graphics Lab 2 Midpoint.exe
--------------------------------------------------------------------------------
/Graphics Lab 2 Midpoint/main.cpp:
--------------------------------------------------------------------------------
1 | #if defined(UNICODE) && !defined(_UNICODE)
2 | #define _UNICODE
3 | #elif defined(_UNICODE) && !defined(UNICODE)
4 | #define UNICODE
5 | #endif
6 |
7 | #include
8 | #include
9 |
10 | /* Declare Windows procedure */
11 | LRESULT CALLBACK WindowProcedure (HWND, UINT, WPARAM, LPARAM);
12 |
13 | /* Make the class name into a global variable */
14 | TCHAR szClassName[ ] = _T("CodeBlocksWindowsApp");
15 |
16 | int Round(double x)
17 | {
18 | return int(x+0.5);
19 | }
20 |
21 | void DrawLine(HDC hdc,int x1,int y1,int x2,int y2,COLORREF c)
22 | {
23 | int y=y1;
24 | int x=x1;
25 | int dx=x2-x1;
26 | int dy=y2-y1;
27 | int d=dx-2*dy;
28 | int d1=2*(dx-dy);
29 | int d2=-2*dy;
30 | SetPixel(hdc,x,y,c);
31 | while(x
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/Graphics Lab One Simple Line/Graphics Lab One Simple Line.layout:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/Graphics Lab One Simple Line/bin/Debug/Graphics Lab One Simple Line.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sarah-Hesham-2022/ComputerGraphics-Algorithms-With-CPP/bc6119223c770a5c4688a67c5f4a43eba9f26ef1/Graphics Lab One Simple Line/bin/Debug/Graphics Lab One Simple Line.exe
--------------------------------------------------------------------------------
/Graphics Lab One Simple Line/main.cpp:
--------------------------------------------------------------------------------
1 | #if defined(UNICODE) && !defined(_UNICODE)
2 | #define _UNICODE
3 | #elif defined(_UNICODE) && !defined(UNICODE)
4 | #define UNICODE
5 | #endif
6 |
7 | #include
8 | #include
9 |
10 | /* Declare Windows procedure */
11 | LRESULT CALLBACK WindowProcedure (HWND, UINT, WPARAM, LPARAM);
12 |
13 | /* Make the class name into a global variable */
14 | TCHAR szClassName[ ] = _T("CodeBlocksWindowsApp");
15 |
16 | void DrawLine(HDC hdc,int x1,int y1,int x2, int y2,COLORREF c)
17 | {
18 | double dx=x2-x1;
19 | double dy=y2-y1;
20 | SetPixel(hdc,x1,y1,c);
21 | for(double t=0; t<1; t+=0.00001)
22 | {
23 | int x=x1+t*dx;
24 | int y=y1+t*dy;
25 | SetPixel(hdc,x,y,c);
26 | }
27 | }
28 |
29 | int WINAPI WinMain (HINSTANCE hThisInstance,
30 | HINSTANCE hPrevInstance,
31 | LPSTR lpszArgument,
32 | int nCmdShow)
33 | {
34 | HWND hwnd; /* This is the handle for our window */
35 | MSG messages; /* Here messages to the application are saved */
36 | WNDCLASSEX wincl; /* Data structure for the windowclass */
37 |
38 | /* The Window structure */
39 | wincl.hInstance = hThisInstance;
40 | wincl.lpszClassName = szClassName;
41 | wincl.lpfnWndProc = WindowProcedure; /* This function is called by windows */
42 | wincl.style = CS_DBLCLKS; /* Catch double-clicks */
43 | wincl.cbSize = sizeof (WNDCLASSEX);
44 |
45 | /* Use default icon and mouse-pointer */
46 | wincl.hIcon = LoadIcon (NULL, IDI_APPLICATION);
47 | wincl.hIconSm = LoadIcon (NULL, IDI_APPLICATION);
48 | wincl.hCursor = LoadCursor (NULL, IDC_ARROW);
49 | wincl.lpszMenuName = NULL; /* No menu */
50 | wincl.cbClsExtra = 0; /* No extra bytes after the window class */
51 | wincl.cbWndExtra = 0; /* structure or the window instance */
52 | /* Use Windows's default colour as the background of the window */
53 | wincl.hbrBackground = (HBRUSH) COLOR_BACKGROUND;
54 |
55 | /* Register the window class, and if it fails quit the program */
56 | if (!RegisterClassEx (&wincl))
57 | return 0;
58 |
59 | /* The class is registered, let's create the program*/
60 | hwnd = CreateWindowEx (
61 | 0, /* Extended possibilites for variation */
62 | szClassName, /* Classname */
63 | _T("Code::Blocks Template Windows App"), /* Title Text */
64 | WS_OVERLAPPEDWINDOW, /* default window */
65 | CW_USEDEFAULT, /* Windows decides the position */
66 | CW_USEDEFAULT, /* where the window ends up on the screen */
67 | 544, /* The programs width */
68 | 375, /* and height in pixels */
69 | HWND_DESKTOP, /* The window is a child-window to desktop */
70 | NULL, /* No menu */
71 | hThisInstance, /* Program Instance handler */
72 | NULL /* No Window Creation data */
73 | );
74 |
75 | /* Make the window visible on the screen */
76 | ShowWindow (hwnd, nCmdShow);
77 |
78 | /* Run the message loop. It will run until GetMessage() returns 0 */
79 | while (GetMessage (&messages, NULL, 0, 0))
80 | {
81 | /* Translate virtual-key messages into character messages */
82 | TranslateMessage(&messages);
83 | /* Send message to WindowProcedure */
84 | DispatchMessage(&messages);
85 | }
86 |
87 | /* The program return-value is 0 - The value that PostQuitMessage() gave */
88 | return messages.wParam;
89 | }
90 |
91 |
92 | /* This function is called by the Windows function DispatchMessage() */
93 | int x1,y1,x2,y2;
94 | LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
95 | {
96 | switch (message) /* handle the messages */
97 | {
98 | case WM_LBUTTONDBLCLK:
99 | {
100 | x1=LOWORD(lParam);
101 | y1=HIWORD(lParam);
102 | break;
103 | }
104 | case WM_RBUTTONDBLCLK:
105 | {
106 | HDC hdc=GetDC(hwnd);
107 | x2=LOWORD(lParam);
108 | y2=HIWORD(lParam);
109 | DrawLine(hdc,x1,y1,x2,y2,RGB(0,0,255));
110 | ReleaseDC(hwnd,hdc);
111 | break;
112 | }
113 | case WM_DESTROY:
114 | PostQuitMessage (0); /* send a WM_QUIT to the message queue */
115 | break;
116 | default: /* for messages that we don't deal with */
117 | return DefWindowProc (hwnd, message, wParam, lParam);
118 | }
119 |
120 | return 0;
121 | }
122 |
--------------------------------------------------------------------------------
/Graphics Lab One Simple Line/obj/Debug/main.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sarah-Hesham-2022/ComputerGraphics-Algorithms-With-CPP/bc6119223c770a5c4688a67c5f4a43eba9f26ef1/Graphics Lab One Simple Line/obj/Debug/main.o
--------------------------------------------------------------------------------
/Graphics Lab One Square Draw/Graphics Lab One Line Draw.cbp:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/Graphics Lab One Square Draw/Graphics Lab One Line Draw.depend:
--------------------------------------------------------------------------------
1 | # depslib dependency file v1.0
2 | 1635628333 source:c:\users\sarah hesham\onedrive\documents\c++\graphics lab one line draw\main.cpp
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/Graphics Lab One Square Draw/Graphics Lab One Line Draw.layout:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/Graphics Lab One Square Draw/bin/Debug/Graphics Lab One Line Draw.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sarah-Hesham-2022/ComputerGraphics-Algorithms-With-CPP/bc6119223c770a5c4688a67c5f4a43eba9f26ef1/Graphics Lab One Square Draw/bin/Debug/Graphics Lab One Line Draw.exe
--------------------------------------------------------------------------------
/Graphics Lab One Square Draw/obj/Debug/main.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sarah-Hesham-2022/ComputerGraphics-Algorithms-With-CPP/bc6119223c770a5c4688a67c5f4a43eba9f26ef1/Graphics Lab One Square Draw/obj/Debug/main.o
--------------------------------------------------------------------------------
/Graphics Line Clipping/Graphics Line Clipping.cbp:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/Graphics Line Clipping/Graphics Line Clipping.depend:
--------------------------------------------------------------------------------
1 | # depslib dependency file v1.0
2 | 1640191833 source:c:\users\sarah hesham\onedrive\documents\c++\graphics line clipping\main.cpp
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/Graphics Line Clipping/Graphics Line Clipping.layout:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/Graphics Line Clipping/bin/Debug/Graphics Line Clipping.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sarah-Hesham-2022/ComputerGraphics-Algorithms-With-CPP/bc6119223c770a5c4688a67c5f4a43eba9f26ef1/Graphics Line Clipping/bin/Debug/Graphics Line Clipping.exe
--------------------------------------------------------------------------------
/Graphics Line Clipping/obj/Debug/main.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sarah-Hesham-2022/ComputerGraphics-Algorithms-With-CPP/bc6119223c770a5c4688a67c5f4a43eba9f26ef1/Graphics Line Clipping/obj/Debug/main.o
--------------------------------------------------------------------------------
/Graphics Line Draw_Bresenhams/Graphics Line Draw_Bresenhams.cbp:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/Graphics Line Draw_Bresenhams/Graphics Line Draw_Bresenhams.depend:
--------------------------------------------------------------------------------
1 | # depslib dependency file v1.0
2 | 1637187520 source:c:\users\sarah hesham\onedrive\documents\c++\graphics line draw_bresenhams\main.cpp
3 |
4 |
5 |
--------------------------------------------------------------------------------
/Graphics Line Draw_Bresenhams/Graphics Line Draw_Bresenhams.layout:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/Graphics Line Draw_Bresenhams/bin/Debug/Graphics Line Draw_Bresenhams.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sarah-Hesham-2022/ComputerGraphics-Algorithms-With-CPP/bc6119223c770a5c4688a67c5f4a43eba9f26ef1/Graphics Line Draw_Bresenhams/bin/Debug/Graphics Line Draw_Bresenhams.exe
--------------------------------------------------------------------------------
/Graphics Line Draw_Bresenhams/main.cpp:
--------------------------------------------------------------------------------
1 | #include
2 |
3 | LRESULT WINAPI WindowProcedure(HWND,UINT,WPARAM,LPARAM);//basic function drawings
4 |
5 | //The algorithm can be extended to cover gradients between 0 and -1 by checking whether y needs to increase or decrease (i.e. dy < 0)
6 | void PlotLineLow(HDC hdc,int x0,int y0,int x1, int y1,COLORREF c)
7 | {
8 | int dx = x1 - x0;
9 | int dy = y1 - y0;
10 | int yi = 1;
11 | if (dy < 0)
12 | {
13 | yi = -1;
14 | dy = -dy;
15 | }
16 | int D = (2 * dy) - dx;
17 | int y = y0;
18 |
19 | for ( int x=x0; x 0)
23 | {
24 | y = y + yi;
25 | D = D + (2 * (dy - dx)) ;
26 | }
27 | else
28 | D = D + 2*dy;
29 | }
30 | }
31 | void PlotLineHigh(HDC hdc,int x0, int y0,int x1, int y1,COLORREF c)
32 | {
33 | int dx = x1 - x0;
34 | int dy = y1 - y0;
35 | int xi = 1;
36 | if (dx < 0)
37 | {
38 | xi = -1;
39 | dx = -dx;
40 | }
41 | int D = (2 * dx) - dy;
42 | int x = x0;
43 |
44 | for (int y=y0; y 0)
48 | {
49 | x = x + xi;
50 | D = D + (2 * (dx - dy));
51 | }
52 | else
53 | D = D + 2*dx;
54 | }
55 | }
56 | void DrawLine(HDC hdc,int x0,int y0,int x1,int y1,COLORREF c)
57 | {
58 | if (abs(y1 - y0) < abs(x1 - x0))
59 | {
60 | if (x0 > x1)
61 | PlotLineLow(hdc,x1, y1, x0, y0,c);
62 | else
63 | PlotLineLow(hdc,x0, y0, x1, y1,c);
64 | }
65 | else
66 | {
67 | if (y0 > y1)
68 | PlotLineHigh(hdc,x1, y1, x0, y0,c);
69 | else
70 | PlotLineHigh(hdc,x0, y0, x1, y1,c);
71 | }
72 | }
73 |
74 | int APIENTRY WinMain(HINSTANCE hInst,HINSTANCE hPrevInst,LPSTR args,int nsh)
75 | {
76 | // MessageBox(NULL,"HELLO WORLD","My Window",MB_OK);
77 | WNDCLASS wc;
78 | wc.cbClsExtra=wc.cbWndExtra=0;
79 | wc.hbrBackground = (HBRUSH)GetStockObject(LTGRAY_BRUSH);
80 | wc.hCursor=LoadCursor(NULL,IDC_ARROW);
81 | wc.hIcon=LoadIcon(NULL,IDI_APPLICATION);
82 | wc.hInstance=hInst;
83 | wc.lpszClassName="My Window";
84 | wc.lpfnWndProc=WindowProcedure; //no brackets here as we are passing a pointer
85 | wc.style=CS_HREDRAW | CS_VREDRAW;
86 |
87 | if(!RegisterClass(&wc))
88 | return -1;
89 |
90 | HWND hWnd=CreateWindow("My Window","My Window Title",WS_OVERLAPPEDWINDOW,200,200,500,500,NULL,NULL,NULL,NULL);
91 | ShowWindow(hWnd,nsh);
92 | UpdateWindow(hWnd);
93 | MSG msg= {0};
94 | while(GetMessage((&msg),NULL,NULL,NULL))
95 | {
96 | TranslateMessage(&msg);
97 | DispatchMessage(&msg);
98 | }
99 | return 0;
100 | }
101 | int xs,ys,xe,ye;
102 | LRESULT WINAPI WindowProcedure(HWND hWnd,UINT msg,WPARAM wc,LPARAM lp)
103 | {
104 | HDC hdc;
105 | switch(msg)
106 | {
107 | case WM_LBUTTONDOWN:
108 | {
109 | xs=LOWORD(lp);
110 | ys=HIWORD(lp);
111 | break;
112 | }
113 | case WM_LBUTTONUP:
114 | {
115 | xe=LOWORD(lp);
116 | ye=HIWORD(lp);
117 | hdc=GetDC(hWnd);
118 | DrawLine(hdc,xs,ys,xe,ye,RGB(0,0,255));
119 | ReleaseDC(hWnd,hdc);
120 | break;
121 | }
122 | case WM_CLOSE:
123 | {
124 | DestroyWindow(hWnd);
125 | break;
126 | }
127 | case WM_DESTROY:
128 | {
129 | PostQuitMessage(0);
130 | break;
131 | }
132 | default:
133 | return DefWindowProc(hWnd,msg,wc,lp);
134 | }
135 | }
136 |
137 |
--------------------------------------------------------------------------------
/Graphics Line Draw_Bresenhams/obj/Debug/main.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sarah-Hesham-2022/ComputerGraphics-Algorithms-With-CPP/bc6119223c770a5c4688a67c5f4a43eba9f26ef1/Graphics Line Draw_Bresenhams/obj/Debug/main.o
--------------------------------------------------------------------------------
/Graphics Line Draw_Simple DDA 2/Graphics Line Draw_Simple DDA 2.cbp:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/Graphics Line Draw_Simple DDA 2/Graphics Line Draw_Simple DDA 2.depend:
--------------------------------------------------------------------------------
1 | # depslib dependency file v1.0
2 | 1635337427 source:c:\users\sarah hesham\onedrive\documents\c++\graphics line draw_simple dda 2\main.cpp
3 |
4 |
5 |
--------------------------------------------------------------------------------
/Graphics Line Draw_Simple DDA 2/Graphics Line Draw_Simple DDA 2.layout:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/Graphics Line Draw_Simple DDA 2/bin/Debug/Graphics Line Draw_Simple DDA 2.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sarah-Hesham-2022/ComputerGraphics-Algorithms-With-CPP/bc6119223c770a5c4688a67c5f4a43eba9f26ef1/Graphics Line Draw_Simple DDA 2/bin/Debug/Graphics Line Draw_Simple DDA 2.exe
--------------------------------------------------------------------------------
/Graphics Line Draw_Simple DDA 2/main.cpp:
--------------------------------------------------------------------------------
1 | #include
2 |
3 | LRESULT WINAPI WindowProcedure(HWND,UINT,WPARAM,LPARAM);//basic function drawings
4 |
5 | int round(double x)
6 | {
7 | return (int)(x+0.5);
8 | }
9 |
10 | void DrawLine(HDC hdc,int xs,int ys,int xe,int ye,COLORREF color)
11 | {
12 | int dx=xe-xs;
13 | int dy=ye-ys;
14 | SetPixel(hdc,xs,ys,color);
15 | if(abs(dx)>=abs(dy))
16 | {
17 | int x=xs,xinc= dx>0?1:-1;
18 | double y=ys,yinc=(double)dy/dx*xinc;
19 | while(x!=xe)
20 | {
21 | x+=xinc;
22 | y+=yinc;
23 | SetPixel(hdc,x,round(y),color);
24 | }
25 | }
26 | else
27 | {
28 | int y=ys,yinc= dy>0?1:-1;
29 | double x=xs,xinc=(double)dx/dy*yinc;
30 | while(y!=ye)
31 | {
32 | x+=xinc;
33 | y+=yinc;
34 | SetPixel(hdc,round(x),y,color);
35 | }
36 | }
37 | }
38 |
39 |
40 | int APIENTRY WinMain(HINSTANCE hInst,HINSTANCE hPrevInst,LPSTR args,int nsh)
41 | {
42 | // MessageBox(NULL,"HELLO WORLD","My Window",MB_OK);
43 | WNDCLASS wc;
44 | wc.cbClsExtra=wc.cbWndExtra=0;
45 | wc.hbrBackground = (HBRUSH)GetStockObject(LTGRAY_BRUSH);
46 | wc.hCursor=LoadCursor(NULL,IDC_ARROW);
47 | wc.hIcon=LoadIcon(NULL,IDI_APPLICATION);
48 | wc.hInstance=hInst;
49 | wc.lpszClassName="My Window";
50 | wc.lpfnWndProc=WindowProcedure; //no brackets here as we are passing a pointer
51 | wc.style=CS_HREDRAW | CS_VREDRAW;
52 |
53 | if(!RegisterClass(&wc))
54 | return -1;
55 |
56 | HWND hWnd=CreateWindow("My Window","My Window Title",WS_OVERLAPPEDWINDOW,200,200,500,500,NULL,NULL,NULL,NULL);
57 | ShowWindow(hWnd,nsh);
58 | UpdateWindow(hWnd);
59 |
60 | /* HWND hwndButton = CreateWindow(
61 | "BUTTON", // Predefined class; Unicode assumed
62 | "OK BUTTON", // Button text
63 | WS_TABSTOP | WS_VISIBLE | WS_CHILD | BS_DEFPUSHBUTTON, // Styles
64 | 10, // x position
65 | 10, // y position
66 | 100, // Button width
67 | 100, // Button height
68 | hWnd, // Parent window
69 | NULL, // No menu.
70 | (HINSTANCE)GetWindowLongPtr(hWnd, GWLP_HINSTANCE),
71 | NULL); // Pointer not needed.
72 |
73 | HWND hwndEdit= CreateWindow("EDIT",
74 | NULL,
75 | WS_BORDER | WS_CHILD | WS_VISIBLE | WS_VSCROLL | ES_LEFT |
76 | ES_MULTILINE | ES_AUTOVSCROLL|WS_BORDER|WS_HSCROLL,
77 | 100,100,100,100,
78 | hWnd,
79 | NULL,
80 | (HINSTANCE) GetWindowLongPtr(hWnd, GWLP_HINSTANCE),
81 | NULL);
82 |
83 | HWND hwndList= CreateWindow("LISTBox",
84 | NULL,
85 | WS_BORDER | WS_CHILD | WS_VISIBLE | WS_VSCROLL | ES_LEFT |WS_BORDER
86 | |WS_HSCROLL|LBS_COMBOBOX|LBS_DISABLENOSCROLL|LBS_EXTENDEDSEL|LBS_MULTIPLESEL,
87 | 200,200,300,30,
88 | hWnd,
89 | NULL,
90 | (HINSTANCE) GetWindowLongPtr(hWnd, GWLP_HINSTANCE),
91 | NULL);*/
92 |
93 | MSG msg= {0};
94 | while(GetMessage((&msg),NULL,NULL,NULL))
95 | {
96 | TranslateMessage(&msg);
97 | DispatchMessage(&msg);
98 | }
99 | return 0;
100 | }
101 |
102 | LRESULT WINAPI WindowProcedure(HWND hWnd,UINT msg,WPARAM wc,LPARAM lp)
103 | {
104 | HDC hdc;
105 | static int x1,y1;
106 | switch(msg)
107 | {
108 | /* case WM_KEYDOWN:
109 | {
110 | hdc=GetDC(hWnd);
111 | Rectangle(hdc,900,1000,400,500);
112 | ReleaseDC(hWnd,hdc);
113 | break;
114 | }
115 | case WM_KEYUP:
116 | {
117 | hdc=GetDC(hWnd);
118 | Arc(hdc,100,200,200,400,300,600,400,800);
119 | ReleaseDC(hWnd,hdc);
120 | break;
121 | }*/
122 | case WM_LBUTTONDOWN:
123 | {
124 | /* MessageBox(hWnd,"Hello","Welcome",MB_OK);
125 | hdc=GetDC(hWnd);
126 | //IMPORTANT ADD LIBRARY gdi32 .Just normal circle: Ellipse(hdc,100,100,400,400);
127 | Ellipse(hdc,LOWORD(lp)-50,HIWORD(lp)-50,LOWORD(lp)+50,HIWORD(lp)+50);//where the mouse clicks
128 | ReleaseDC(hWnd,hdc);*/
129 | x1=LOWORD(lp);
130 | y1=HIWORD(lp);
131 | break;
132 | }
133 | case WM_LBUTTONUP:
134 | {
135 | hdc=GetDC(hWnd);
136 | DrawLine(hdc,x1,y1,LOWORD(lp),HIWORD(lp),RGB(0,0,255));
137 | ReleaseDC(hWnd,hdc);
138 | break;
139 | }
140 | /* case WM_RBUTTONDOWN:
141 | {
142 | hdc=GetDC(hWnd);
143 | LineTo(hdc,LOWORD(lp)+100,HIWORD(lp)+100);
144 | ReleaseDC(hWnd,hdc);
145 | break;
146 | }*/
147 | case WM_CLOSE:
148 | {
149 | DestroyWindow(hWnd);
150 | break;
151 | }
152 | case WM_DESTROY:
153 | {
154 | PostQuitMessage(0);
155 | break;
156 | }
157 | default:
158 | return DefWindowProc(hWnd,msg,wc,lp);
159 | }
160 | }
161 |
162 |
--------------------------------------------------------------------------------
/Graphics Line Draw_Simple DDA 2/obj/Debug/main.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sarah-Hesham-2022/ComputerGraphics-Algorithms-With-CPP/bc6119223c770a5c4688a67c5f4a43eba9f26ef1/Graphics Line Draw_Simple DDA 2/obj/Debug/main.o
--------------------------------------------------------------------------------
/Graphics Line Draw_Simple DDA/Graphics Line Draw_Simple DDA.cbp:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/Graphics Line Draw_Simple DDA/Graphics Line Draw_Simple DDA.depend:
--------------------------------------------------------------------------------
1 | # depslib dependency file v1.0
2 | 1635336894 source:c:\users\sarah hesham\onedrive\documents\c++\graphics line draw_simple dda\main.cpp
3 |
4 |
5 |
--------------------------------------------------------------------------------
/Graphics Line Draw_Simple DDA/Graphics Line Draw_Simple DDA.layout:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/Graphics Line Draw_Simple DDA/bin/Debug/Graphics Line Draw_Simple DDA.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sarah-Hesham-2022/ComputerGraphics-Algorithms-With-CPP/bc6119223c770a5c4688a67c5f4a43eba9f26ef1/Graphics Line Draw_Simple DDA/bin/Debug/Graphics Line Draw_Simple DDA.exe
--------------------------------------------------------------------------------
/Graphics Line Draw_Simple DDA/obj/Debug/main.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sarah-Hesham-2022/ComputerGraphics-Algorithms-With-CPP/bc6119223c770a5c4688a67c5f4a43eba9f26ef1/Graphics Line Draw_Simple DDA/obj/Debug/main.o
--------------------------------------------------------------------------------
/Graphics NRFloodFill Algorithm/Graphics NRFloodFill Algorithm.cbp:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/Graphics NRFloodFill Algorithm/Graphics NRFloodFill Algorithm.depend:
--------------------------------------------------------------------------------
1 | # depslib dependency file v1.0
2 | 1639080273 source:c:\users\sarah hesham\onedrive\documents\c++\graphics nrfloodfill algorithm\main.cpp
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Graphics NRFloodFill Algorithm/Graphics NRFloodFill Algorithm.layout:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/Graphics NRFloodFill Algorithm/bin/Debug/Graphics NRFloodFill Algorithm.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sarah-Hesham-2022/ComputerGraphics-Algorithms-With-CPP/bc6119223c770a5c4688a67c5f4a43eba9f26ef1/Graphics NRFloodFill Algorithm/bin/Debug/Graphics NRFloodFill Algorithm.exe
--------------------------------------------------------------------------------
/Graphics NRFloodFill Algorithm/obj/Debug/main.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sarah-Hesham-2022/ComputerGraphics-Algorithms-With-CPP/bc6119223c770a5c4688a67c5f4a43eba9f26ef1/Graphics NRFloodFill Algorithm/obj/Debug/main.o
--------------------------------------------------------------------------------
/Graphics NRFloodFill Queue Algoritm/Graphics NRFloodFill Queue Algoritm.cbp:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/Graphics NRFloodFill Queue Algoritm/Graphics NRFloodFill Queue Algoritm.depend:
--------------------------------------------------------------------------------
1 | # depslib dependency file v1.0
2 | 1641565099 source:c:\users\sarah hesham\onedrive\documents\c++\graphics nrfloodfill queue algoritm\main.cpp
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Graphics NRFloodFill Queue Algoritm/Graphics NRFloodFill Queue Algoritm.layout:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/Graphics NRFloodFill Queue Algoritm/bin/Debug/Graphics NRFloodFill Queue Algoritm.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sarah-Hesham-2022/ComputerGraphics-Algorithms-With-CPP/bc6119223c770a5c4688a67c5f4a43eba9f26ef1/Graphics NRFloodFill Queue Algoritm/bin/Debug/Graphics NRFloodFill Queue Algoritm.exe
--------------------------------------------------------------------------------
/Graphics NRFloodFill Queue Algoritm/obj/Debug/main.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sarah-Hesham-2022/ComputerGraphics-Algorithms-With-CPP/bc6119223c770a5c4688a67c5f4a43eba9f26ef1/Graphics NRFloodFill Queue Algoritm/obj/Debug/main.o
--------------------------------------------------------------------------------
/Graphics Point Clipping/Graphics Point Clipping.cbp:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/Graphics Point Clipping/Graphics Point Clipping.depend:
--------------------------------------------------------------------------------
1 | # depslib dependency file v1.0
2 | 1640178571 source:c:\users\sarah hesham\onedrive\documents\c++\graphics point clipping\main.cpp
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/Graphics Point Clipping/Graphics Point Clipping.layout:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/Graphics Point Clipping/bin/Debug/Graphics Point Clipping.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sarah-Hesham-2022/ComputerGraphics-Algorithms-With-CPP/bc6119223c770a5c4688a67c5f4a43eba9f26ef1/Graphics Point Clipping/bin/Debug/Graphics Point Clipping.exe
--------------------------------------------------------------------------------
/Graphics Point Clipping/obj/Debug/main.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sarah-Hesham-2022/ComputerGraphics-Algorithms-With-CPP/bc6119223c770a5c4688a67c5f4a43eba9f26ef1/Graphics Point Clipping/obj/Debug/main.o
--------------------------------------------------------------------------------
/Graphics Polygon Clipping/Graphics Polygon Clipping.cbp:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/Graphics Polygon Clipping/Graphics Polygon Clipping.depend:
--------------------------------------------------------------------------------
1 | # depslib dependency file v1.0
2 | 1640281903 source:c:\users\sarah hesham\onedrive\documents\c++\graphics polygon clipping\main.cpp
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Graphics Polygon Clipping/Graphics Polygon Clipping.layout:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/Graphics Polygon Clipping/bin/Debug/Graphics Polygon Clipping.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sarah-Hesham-2022/ComputerGraphics-Algorithms-With-CPP/bc6119223c770a5c4688a67c5f4a43eba9f26ef1/Graphics Polygon Clipping/bin/Debug/Graphics Polygon Clipping.exe
--------------------------------------------------------------------------------
/Graphics Polygon Clipping/obj/Debug/main.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sarah-Hesham-2022/ComputerGraphics-Algorithms-With-CPP/bc6119223c770a5c4688a67c5f4a43eba9f26ef1/Graphics Polygon Clipping/obj/Debug/main.o
--------------------------------------------------------------------------------
/Graphics RFloodFill Algorithm/Graphics RFloodFill Algorithm.cbp:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/Graphics RFloodFill Algorithm/Graphics RFloodFill Algorithm.depend:
--------------------------------------------------------------------------------
1 | # depslib dependency file v1.0
2 | 1639076537 source:c:\users\sarah hesham\onedrive\documents\c++\graphics rfloodfill algorithm\main.cpp
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/Graphics RFloodFill Algorithm/Graphics RFloodFill Algorithm.layout:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/Graphics RFloodFill Algorithm/bin/Debug/Graphics RFloodFill Algorithm.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sarah-Hesham-2022/ComputerGraphics-Algorithms-With-CPP/bc6119223c770a5c4688a67c5f4a43eba9f26ef1/Graphics RFloodFill Algorithm/bin/Debug/Graphics RFloodFill Algorithm.exe
--------------------------------------------------------------------------------
/Graphics RFloodFill Algorithm/obj/Debug/main.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sarah-Hesham-2022/ComputerGraphics-Algorithms-With-CPP/bc6119223c770a5c4688a67c5f4a43eba9f26ef1/Graphics RFloodFill Algorithm/obj/Debug/main.o
--------------------------------------------------------------------------------
/Graphics Second Lec_Naiive Line Draw Algorithm/Graphics Second Lec.cbp:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/Graphics Second Lec_Naiive Line Draw Algorithm/Graphics Second Lec.depend:
--------------------------------------------------------------------------------
1 | # depslib dependency file v1.0
2 | 1635330674 source:c:\users\sarah hesham\onedrive\documents\c++\graphics second lec\main.cpp
3 |
4 |
5 | 1635331950 source:c:\users\sarah hesham\onedrive\documents\c++\graphics second lec_naiive line draw algorithm\main.cpp
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Graphics Second Lec_Naiive Line Draw Algorithm/Graphics Second Lec.layout:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/Graphics Second Lec_Naiive Line Draw Algorithm/bin/Debug/Graphics Second Lec.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sarah-Hesham-2022/ComputerGraphics-Algorithms-With-CPP/bc6119223c770a5c4688a67c5f4a43eba9f26ef1/Graphics Second Lec_Naiive Line Draw Algorithm/bin/Debug/Graphics Second Lec.exe
--------------------------------------------------------------------------------
/Graphics Second Lec_Naiive Line Draw Algorithm/lib_finder.script:
--------------------------------------------------------------------------------
1 | function SetBuildOptions(base)
2 | {
3 | if ( "LibFinder" in getroottable() )
4 | {
5 | LibFinder.SetupTarget(base);
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/Graphics Second Lec_Naiive Line Draw Algorithm/obj/Debug/main.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sarah-Hesham-2022/ComputerGraphics-Algorithms-With-CPP/bc6119223c770a5c4688a67c5f4a43eba9f26ef1/Graphics Second Lec_Naiive Line Draw Algorithm/obj/Debug/main.o
--------------------------------------------------------------------------------
/Graphics Two Circles Touching and a line/Graphics Two Circles Touching and a line.cbp:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/Graphics Two Circles Touching and a line/Graphics Two Circles Touching and a line.depend:
--------------------------------------------------------------------------------
1 | # depslib dependency file v1.0
2 | 1637594148 source:c:\users\sarah hesham\onedrive\documents\c++\graphics two circles touching and a line\main.cpp
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/Graphics Two Circles Touching and a line/Graphics Two Circles Touching and a line.layout:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/Graphics Two Circles Touching and a line/bin/Debug/Graphics Two Circles Touching and a line.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sarah-Hesham-2022/ComputerGraphics-Algorithms-With-CPP/bc6119223c770a5c4688a67c5f4a43eba9f26ef1/Graphics Two Circles Touching and a line/bin/Debug/Graphics Two Circles Touching and a line.exe
--------------------------------------------------------------------------------
/Graphics Two Circles Touching and a line/obj/Debug/main.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sarah-Hesham-2022/ComputerGraphics-Algorithms-With-CPP/bc6119223c770a5c4688a67c5f4a43eba9f26ef1/Graphics Two Circles Touching and a line/obj/Debug/main.o
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # ComputerGraphics-Algorithms-With-CPP
2 | -My favorite and the most important repository I have made, the most one I am proud of :) .
3 |
4 | -C++ Projects Codes.
5 |
6 | -Computer Graphics built using Win32 Desktop Applications with C++ .
7 |
8 | -Dependes on input taken from mouse clicks .
9 |
10 | -Building computer graphics from scratch using mathematical equations and problem solving with C++ .
11 |
12 | -Implementing the most famous computer graphics algorithms from scratch.
13 |
14 | -ComputerGraphics-Algorithms-With-C++ .
15 |
16 | https://github.com/Sarah-Hesham-2022/ComputerGraphics2D_Win32_Desktop_Project
17 |
18 | https://github.com/Sarah-Hesham-2022/ComputerGraphics-Face-Drawing-Clipping
19 |
--------------------------------------------------------------------------------