vector graphics from the begining to the end .pptx
NidaaFlaih1
34 views
43 slides
Aug 30, 2025
Slide 1 of 43
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
About This Presentation
vector graphics
Size: 927.99 KB
Language: en
Added: Aug 30, 2025
Slides: 43 pages
Slide Content
Vector Graphics
Vector graphics is the use of geometrical primitives such as points , lines , curves , and shapes or polygon (s), which are all based on mathematical expressions, to represent images in computer graphics . Definition
Modern displays and printers are raster devices; vector formats have to be converted to raster format (bitmaps – pixel arrays) before they can be rendered (displayed or printed). Vector vs Raster
The size of the bitmap/raster-format file generated by the conversion will depend on the resolution required, but the size of the vector file generating the bitmap/raster file will always remain the same. Thus , it is easy to convert from a vector file to a range of bitmap/raster file formats but it is much more difficult to go in the opposite direction, especially if subsequent editing of the vector picture is required.
Once a file is converted from the vector format, it is likely to be bigger, and it loses the advantage of scalability without loss of resolution. It will also no longer be possible to edit individual parts of the image as discrete objects. The file size of a vector graphic image depends on the number of graphic elements it contains; it is a list of descriptions.
Vector formats are not always appropriate in graphics work. For example, devices such as cameras and scanners produce essentially continuous-tone raster graphics that are impractical to convert into vectors, and so for this type of work, an image editor will operate on the pixels rather than on drawing objects defined by mathematical expressions.
Computer Graphics Applications Computer Graphics is about animation (films)
Games are very important in Computer Graphics
Medical Imaging is another driving force
Computer Aided Design too
Scientific Visualisation
3D computer graphics in contrast to 2D computer graphics are graphics that use a three-dimensional representation of geometric data that is stored in the computer for the purposes of performing calculations and rendering 2D images. Such images may be for later display or for real-time viewing. Despite these differences, 3D computer graphics rely on many of the same algorithms as 2D computer vector graphics 3D Graphics
Translation Rotation Scaling Reflection Shearing 3D Transformations
In a three-dimensional homogeneous coordinate representation, a point is translated from position P = (x, y, z) to position P' = (x', y', z') with the matrix operation 1 0 0 0 x´= x+h 0 1 0 0 y´= y+k 0 0 1 0 z´= z+e h k e 1 Translation
To generate a rotation transformation for an object, we must designate an axis of rotation (about which the object is to be rotated) and the amount of angular rotation. Rotation
X-axis Y-axis Z-axis x' = x x ' = z sin(a) + x cos (a) x' = x cos (a) - y sin(a) y' = y cos (a) - z sin(a) y' = y y ' = x sin(a) + y cos (a) z' = y sin(a) + z cos (a) z' = z cos (a) - x sin(a) z' = z Rotation X-Axis Rotation Y-Axis Rotation Z-Axis 1 0 0 0 cos (a) 0 -sin(a) 0 cos (a) sin(a) 0 0 cos (a) sin(a) 0 0 1 0 0 -sin(a) cos (a) 0 0 0 -sin(a) cos (a) 0 sin(a) 0 cos (a) 0 0 0 1 0 0 0 0 1 0 0 0 1 0 0 0 1 Coordinate-Axes Rotations
Scaling an object with transformation changes the size of the object and repositions the object relative to the coordinate origin. Scaling Matrix Sx 0 0 0 x´= x* Sx Sy 0 0 y´= y* Sy 0 0 Sz 0 z´= z* Sz 0 0 0 1 Scaling
Shearing transformations can be used to modify object shapes. They are also useful in three-dimensional viewing for obtaining general projection-n transformations. Shearing
For the representation of a three-dimensional scene on a flat computer screen a projection to the two-dimensional plane is required. The plane in the area into which we transform (project) objects is called the 'Table'(screen) . The most frequently used projections are: parallel central Projection
Parallel projection is the transformation of a three-dimension area into a plane. In this projection, all projection rays are parallel. We can split parallel projection into the following types: vertical orthogonal projection oblique (slant) Parallel projection
The orthogonal parallel projection orthogonal parallel projection into the plane xy neglects z -coordinate. To the point P=( x,y,z ) corresponding to in the projection the point P' = ( x, y ).
Oblique projection In oblique projections the parallel projection rays are not perpendicular to the viewing plane as with orthographic projection, but strike the projection plane at an angle other than ninety degrees.
The oblique parallel projection of the point ( x, y, z ) to the plane xy can be expressed as follows: : x' = x + z. (a.cos(a)), y' = y + z. (a.sin(a)), where the parameter a determines elongation for the axis z and the angle a is deviation from the axis x . If the parameter a =0 , then it is a case of an orthogonal projection The oblique projection to the plane xy can be expressed in the following matrix 1 0 0 0 Pxy = 0 1 0 0 a.cosa a.sina 0 0 0 0 0 1
For the representation of a three-dimensional scene, the viewer’s position and the projection plane need to be defined. The viewer looks in the direction of the projection plane , which can be interpreted as a kind of window behind which the virtual world lies. The projection of an object onto this plane is obtained by connecting the points of the object with the centre of projection and computing the intersection points of these lines, called projectors , with the projection plane. Central or perspective Projection
Let the center of projection is at ( Xp , Yp , Zp ) and the point on the object is (X1, Y1, Z1), then the parametric equation of projection line is X = (XpZ1 -X1Zp) / (Z1-Zp) Y= (YpZ1 -Y1Zp) / (Z1-Zp) Z= 0 The projected image will be on the XY plane, therefore Z=0 1 0 0 0 Pxy = 0 1 0 0 Xp / Zp - Yp / Zp 0 -1/ Zp 0 0 0 1
Clipping refers to the removal of part of a scene. Internal clipping removes parts of a picture outside a given region; external clipping removes parts inside a region. Clipping
Use 6-bit outcodes When needed, clip line segment against planes 3D Cohen-Sutherland
Trivially accept if both end-codes are Trivially reject if bit-by-bit AND of end-codes is not 0 Up to 6 intersections may have to be computed bit 1 point ABOVE the view volume y > 1 bit 2 point BELOW the view volume y < -1 bit 3 point RIGHT OF the view volume x > 1 bit 4 point LEFT OF the view volume x < -1 bit 5 point BEHIND the view volume z < -1 bit 6 point IN FRONT the view volume z > 0
Use parametric representation of the line to compute intersections So for y=1 replace y with 1 and solve for t If 1 ! t ! 0 use it to find x and z Test if x and z are in valid range Repeat for planes y=-1, x=1, x=-1, z=-1, z=0
A polygon mesh or unstructured grid is a collection of vertices, edges and faces that defines the shape of a polyhedral object in 3D computer graphics and solid modelling . The variety of operations performed on meshes may include Boolean logic, smoothing, simplification, and many others. Polygon mesh
Polygon meshes may be represented in a variety of ways, using different methods to store the vertex, edge and face data. These include: Face-vertex meshes: A simple list of vertices , and a set of polygons that point to the vertices it uses. Winged-edge meshes, in which each edge points to two vertices, two faces, and the four (clockwise and counter-clockwise) edges that touch it. Winged-edge meshes allow constant time traversal of the surface, but with higher storage requirements. Half-edge meshes: Similar to winged-edge meshes except that only half the edge traversal information is used. Quad-edge meshes, which store edges, half-edges, and vertices without any reference to polygons. The polygons are implicit in the representation, and may be found by traversing the structure. Memory requirements are similar to half-edge meshes.
Corner-tables, which store vertices in a predefined table, such that traversing the table implicitly defines polygons. This is in essence the "triangle fan" used in hardware graphics rendering. The representation is more compact, and more efficient to retrieve polygons, but operations to change polygons are slow. Furthermore, corner-tables do not represent meshes completely. Multiple corner-tables (triangle fans) are needed to represent most meshes. Vertex-vertex meshes: A "VV" mesh represents only vertices, which point to other vertices. Both the edge and face information is implicit in the representation. However, the simplicity of the representation allows for many efficient operations to be performed on meshes.
Vertex-vertex meshes represent an object as a set of vertices connected to other vertices. This is the simplest representation, but not widely used since the face and edge information is implicit. Thus, it is necessary to traverse the data in order to generate a list of faces for rendering.
Face-vertex meshes represent an object as a set of faces and a set of vertices. This is the most widely used mesh representation, being the input typically accepted by modern graphics hardware.
Winged-edge meshes explicitly represent the vertices, faces, and edges of a mesh. This representation is widely used in modelling programs to provide the greatest flexibility in dynamically changing the mesh geometry, because split and merge operations can be done quickly. Winged-edge meshes address the issue of traversing from edge to edge, and providing an ordered set of faces around an edge.
Render dynamic meshes Winged-edge meshes are not the only representation which allows for dynamic changes to geometry. A new representation which combines winged-edge meshes and face-vertex meshes is the render dynamic mesh , which explicitly stores the vertices of a face (like FV meshes), the faces of a vertex (like FV meshes), and the faces and vertices of an edge (like winged-edge).
polygon triangulation is the decomposition of a polygonal area ( simple polygon ) P into a set of triangles , i.e., finding the set of triangles with pairwise non-intersecting interiors whose union is P . A convex polygon is trivial to triangulate in linear time , by adding edges from one vertex to all other vertices. A monotone polygon can easily be triangulated in linear time with either the algorithm of A. Fournier and D.Y. Montuno , or the algorithm of Godfried Toussaint . Triangulation:
One way to triangulate a simple polygon is based on the fact that any simple polygon with at least 4 vertices without holes has at least two so called ' ears ', which are triangles with two sides being the edges of the polygon and the third one completely inside it (and with an extra property unimportant for triangulation).The algorithm then consists of finding such an ear, removing it from the polygon (which results in a new polygon that still meets the conditions) and repeating until there is only one triangle left. Ear clipping method
A simple polygon may be decomposed into monotone polygons as follows. For each point, check if the neighbouring points are both on the same side of the ' sweep line '( a horizontal or vertical line). If they are, check the next sweep line on the other side. Break the polygon on the line between the original point and one of the points on this one. Note that if you are moving downwards, the points where both of the vertices are below the sweep line are 'split points'. They mark a split in the polygon. From there you have to consider both sides separately. Using this algorithm to triangulate a simple polygon takes O ( n log n ) time. Breaking a polygon into monotone polygons