MTS ..... Muhammad Tahir Shahzad, B.C.S Honours [ 2000-04 ], G.C. University Lahore formerly Government College Lahore, Pakistan. All the Programs, Projects and Games in C++, C, Visual C++, Visual Basic, Java and Assembly Language are written by MTS. This new interface of the web site is exclusively designed by MTS. This web site is uploaded on two servers at the same time. The url "www.mts-home.cjb.net" is a redirection url of [ http://mtshome.sw3solutions.com ] and the url "www.mtshome.cjb.net" is a redirection url of [ www.geocities.com/mtahirshahzad ]. Please send your Comments and Suggestions about the website to MTS at mts_home@hotmail.com.
MTS-HOME
C++  :::  COMPUTER GRAPHICS
Home
C
C++
Java
Games
Projects
Libraries
Visual C++
Visual Basic
Visual Prolog
Assembly Language
About
Utilities
Feedback
Links Exchange
Add To Favorites
Make Your Homepage
This section C++ : Computer Graphics contains C++ programs for drawing the basic functions of Graphics like Lines, Circles, Ellipses, etc. This section also contains other 2D and 3D programs on different techniques in Computer Graphics. These Programs are well formatted and are very easy to understand.

Line
Line Styles
Polygons
Circle
Ellipse
Arcs
Curves
Area Filling
Character Generation
2D Transformations
2D Viewing - Clipping
Projection
3D Object Representations
Quadratic Surfaces
Bezier curves - Surfaces
3D Transformations
Miscellaneous Programs
Note:
All the given files are in zip format, which can be uncompressed with the help of a compression tool. If you do not have any tool, then you can get one from Utilities : Compression Tools.
Line
CG-01 A C++ Program to draw a line using Cartesian Slope-Intercept Equation [ Simple Implementation ].
CG-02 A C++ Program to draw a line using Cartesian Slope-Intercept Equation.
CG-03 A C++ Program to draw a line using Parametric Equations.
CG-04 A C++ Program to draw a line using Digital Differential Analyzer (DDA) Algorithm.
CG-05 A C++ Program to draw a line using Bresenham's Line Algorithm (BLA) for lines with slopes negative and less than 1.
CG-06 A C++ Program to draw a line using Bresenham's Line Algorithm (BLA) for lines with slopes negative and greater than 1.
CG-07 A C++ Program to draw a line using Bresenham's Line Algorithm (BLA) for lines with slopes positive and less than 1.
CG-08 A C++ Program to draw a line using Bresenham's Line Algorithm (BLA) for lines with slopes positive and greater than 1.
CG-09 A C++ Program to draw a line using Bresenham's Line Algorithm (BLA).
Line Styles
CG-10 A C++ program to draw different kinds of Dashed Lines using Bresenham's Line Algorithm.
CG-11 A C++ program to draw different kinds of Thick Lines using Bresenham's Line Algorithm.
Polygons
CG-12 A C++ Program to draw a Triangle using Bresenham's Line Algorithm.
CG-13 A C++ Program to draw a Rectangle using Bresenham's Line Algorithm.
CG-14 A C++ Program to draw a Polygon using Bresenham's Line Algorithm.
Circle
CG-15 A C++ Program to draw a circle using Polynomial Method.
CG-16 A C++ Program to draw a circle using Trigonometric Method.
CG-17 A C++ Program to draw a circle using Bresenham's Circle Algorithm.
CG-18 A C++ Program to draw a circle using MidPoint Circle Algorithm.
Ellipse
CG-19 A C++ Program to draw an ellipse using Polynomial Method.
CG-20 A C++ Program to draw an ellipse using Trigonometric Method.
CG-21 A C++ Program to draw an ellipse using MidPoint Ellipse Algorithm.
Arcs
CG-22 A C++ Program to draw a Circular Arc using Trigonometric Method.
CG-23 A C++ Program to draw an Elliptical Arc using Trigonometric Method.
Curves
CG-24 A C++ Program to draw a C-Curve of nth order.
CG-25 A C++ Program to draw a K-Curve of nth order.
CG-26 A C++ Program to draw a Cubic Bezier Curve
CG-27 A C++ Program to draw a Bezier Curve of nth degree.
Area Filling
CG-28 A C++ Program to fill differnt geometric shapes by using Boundary Fill Algorithm.
CG-29 A C++ Program to fill differnt geometric shapes by using Flood Fill Algorithm.
CG-30 A C++ Program to fill a Polygon using Scan-Line Polygon Fill Algorithm.
CG-31 A C++ Program to fill a Rectangle using Scan-Line Rectangle Fill Algorithm.
CG-32 A C++ Program to fill a Circle using Scan-Line Circle Fill Algorithm.
CG-33 A C++ Program to fill a Circle using Scan-Line Circle Fill Algorithm using Polar Coordinates.
CG-34 A C++ Program to fill differnt geometric shapes by using Boundary Fill Algorithm using Linked-List.
CG-35 A C++ Program to fill differnt geometric shapes by using Flood Fill Algorithm using Linked-List.
Character Generation
CG-36 A C++ Program to generate Udru Alphabets using Stroke Method.
CG-37 A C++ Program to generate Udru Alphabets using Matrix Method.
2D Transformations
CG-38 A C++ Program to illustrate the implementation of Translation Transformation.
CG-39 A C++ Program to illustrate the implementation of Scaling Transformation.
CG-40 A C++ Program to illustrate the implementation of Scaling Transformation along a Fixed Point.
CG-41 A C++ Program to illustrate the implementation of Scaling Transformation along Arbitrary Direction.
CG-42 A C++ Program to illustrate the implementation of Rotation Transformation.
CG-43 A C++ Program to illustrate the implementation of Rotation Transformation along a Pivot Point.
CG-44 A C++ Program to illustrate the implementation of Reflection Transformation about x-axix, y-axis and w.r.t origin.
CG-45 A C++ Program to illustrate the implementation of Reflection Transformation about the line y=x and y=-x.
CG-46 A C++ Program to illustrate the implementation of X-Direction Shear Transformation.
CG-47 A C++ Program to illustrate the implementation of Y-Direction Shear Transformation.
2D Viewing - Clipping
CG-48 A C++ Program to show the implementation of Window-to-Viewport Coordinate Transformaton.
CG-49 A C++ Program to show the implementation of Point Clipping Algorithm.
CG-50 A C++ Program to show the implementation of Cohen-Sutherland Line Clipping Algorithm.
CG-51 A C++ Program to show the implementation of Cohen-Sutherland MidPoint Subdivision Line Clipping Algorithm.
CG-52 A C++ Program to show the implementation of Liang-Barsky Line Clipping Algorithm.
CG-53 A C++ Program to show the implementation of Sutherland-Hodgeman Polygon Clipping Algorithm.
CG-54 A C++ Program to show the implementation of Window-to-Viewport Transformaton.
CG-55 A C++ program to show the implementation of None-or-All String Clipping Strategy.
CG-56 A C++ program to show the implementation of None-or-All Character Clipping Strategy.
Projection
CG-57 A C++ Program to show the projection of 3D objects using Standard Perspective Projection.
CG-58 A C++ Program to show the projection of 3D objects using Standard Perspective Projection w.r.t. an Arbitrary Plane and Center of Projection is the origion i.e. C(0,0,0).
CG-59 A C++ Program to show the projection of 3D objects using General Perspective Projection.
CG-60 A C++ Program to show the projection of 3D objects using Orthographics Projection Parallel onto xy-plane.
CG-61 A C++ Program to show the projection of 3D objects using Orthographics Parallel Projection w.r.t. xy-plane & along vector v.
CG-62 A C++ Program to show the projection of 3D objects using General Oblique Parallel Projection onto xy-plane.
CG-63 A C++ Program to show the projection of 3D objects using Cavalier Oblique Parallel Projection onto xy-plane (angle=45).
CG-64 A C++ Program to show the projection of 3D objects using Cabinet Oblique Parallel Projection onto xy-plane (angle=30).
3D Object Representations
CG-65 A C++ Program to illustrate the implementation of Polygon-Mesh Representation.
CG-66 A C++ Program that creats a 3D solid object using Translational Sweep Representatiom Method.
CG-67 A C++ Program that creats a 3D solid object using Rotational Sweep Representatiom Method.
Quadratic Surfaces
CG-68 A C++ Program to draw a Sphere using Ellipses.
CG-69 A C++ Program to draw a Sphere using Parametric Equations.
CG-70 A C++ Program to draw an Ellipsoid using Parametric Equations.
Bezier Curves - Surfaces
CG-71 A C++ Program to draw a 3D Cubic Bezier Curve.
CG-72 A C++ Program to draw a 3D Bezier Curve of Nth degree.
CG-73 A C++ Program to draw a 3D Piece-Wise Bezier Curve of nth degree with Zeroth Order Continuity.
CG-74 A C++ Program to draw a 3D Bezier Surface for MxN control Points.
3D Transformations
CG-75 A C++ Program to illustrate the implementation of Translation Transformation.
CG-76 A C++ Program to illustrate the implementation of Scaling Transformation.
CG-77 A C++ Program to illustrate the implementation of Scaling Transformation along a Fixed Point.
CG-78 A C++ Program to illustrate the implementation of 3D Rotation Transformation along x-axis.
CG-79 A C++ Program to illustrate the implementation of 3D Rotation Transformation along y-axis.
CG-80 A C++ Program to illustrate the implementation of 3D Rotation Transformation along z-axis.
CG-81 A C++ Program to show the 3D Reflection Transformation along xy-plane.
CG-82 A C++ Program to show the 3D Reflection Transformation along yz-plane.
CG-83 A C++ Program to show the 3D Reflection Transformation along zx-plane.
CG-84 A C++ Program to show the 3D Shearing Transformation along x-axis.
CG-85 A C++ Program to show the 3D Shearing Transformation along y-axis.
CG-86 A C++ Program to show the 3D Shearing Transformation along z-axis.
Miscellaneous Programs
CG-87 A C++ Program to generate a pattern as required by the following:
- Read two values r and n.
- Calculate the coordinates of 4n points around the edges of a square of side r.
- There is one point at each corner.
- The points are placed such that the distance b/w two consecutive points is r/n.
- The Rule: P(I) is joined with P(J) for all I and J such that J-I is a fibonacci number for number less than 4n, the subtraction being carried out modulo 4n.
- The outer square must also be drawn.
- For efficiency, there is no need to join points which lie on the same side of the square.
CG-88 A C++ Program that places n equally spaced points on the circumference of a circle of radius r,and then join each point to every other point.
CG-89 A C++ Program to draw a Chess Board.
CG-90 A C++ Program to draw a Luddo Board.
[ Home | C | C++ | Java | Visual Prolog | Games | Projects | Libraries | Visual C++ | Visual Basic | Assembly Language | About Me ]
  Copyright © 2000-2005
  Muhammad Tahir Shahzad
Recomended Browsers:
Internet Explorer 5.0+
Recomended Resolution:
800x600*
Report a Dead Link or Bug to MTS:
mts_home@hotmail.com