3 d graphics basics
DESCRIPTION
3D graphicsTRANSCRIPT
![Page 1: 3 d graphics basics](https://reader036.vdocuments.site/reader036/viewer/2022062514/5583bebed8b42a784f8b47d4/html5/thumbnails/1.jpg)
3D GRAPHICS BASICS
![Page 2: 3 d graphics basics](https://reader036.vdocuments.site/reader036/viewer/2022062514/5583bebed8b42a784f8b47d4/html5/thumbnails/2.jpg)
3D view
Human eyes see object defiantly
![Page 3: 3 d graphics basics](https://reader036.vdocuments.site/reader036/viewer/2022062514/5583bebed8b42a784f8b47d4/html5/thumbnails/3.jpg)
3D shadow
3D projection is in 2 D
![Page 4: 3 d graphics basics](https://reader036.vdocuments.site/reader036/viewer/2022062514/5583bebed8b42a784f8b47d4/html5/thumbnails/4.jpg)
Coordinate system
Are the measured frame of reference within which geometry is defined, manipulated and viewed
In this system, a point serves as the origin, and three lines (axes) that pass through this point and are orthogonal to each other (at right angles 90 degrees)
![Page 5: 3 d graphics basics](https://reader036.vdocuments.site/reader036/viewer/2022062514/5583bebed8b42a784f8b47d4/html5/thumbnails/5.jpg)
Types
1D coordinate system 2D coordinate system 3D coordinate system
![Page 6: 3 d graphics basics](https://reader036.vdocuments.site/reader036/viewer/2022062514/5583bebed8b42a784f8b47d4/html5/thumbnails/6.jpg)
1D coordinate system
Direction and magnitude along a single axis, with reference to origin
Location are defined by a single coordinate
![Page 7: 3 d graphics basics](https://reader036.vdocuments.site/reader036/viewer/2022062514/5583bebed8b42a784f8b47d4/html5/thumbnails/7.jpg)
We can define points, segments, lines rays
Can have multiple origins (frame of reference) and transform coordinates among them
![Page 8: 3 d graphics basics](https://reader036.vdocuments.site/reader036/viewer/2022062514/5583bebed8b42a784f8b47d4/html5/thumbnails/8.jpg)
![Page 9: 3 d graphics basics](https://reader036.vdocuments.site/reader036/viewer/2022062514/5583bebed8b42a784f8b47d4/html5/thumbnails/9.jpg)
2D coordinate system
Direction and magnitude along two axes, with reference to an origin
Location are defined by x, y coordinate
![Page 10: 3 d graphics basics](https://reader036.vdocuments.site/reader036/viewer/2022062514/5583bebed8b42a784f8b47d4/html5/thumbnails/10.jpg)
We can define points, segments, lines rays, curves, polygons (any other planar geometry)
Can have multiple origins (frame of reference) and transform coordinates among them
![Page 11: 3 d graphics basics](https://reader036.vdocuments.site/reader036/viewer/2022062514/5583bebed8b42a784f8b47d4/html5/thumbnails/11.jpg)
![Page 12: 3 d graphics basics](https://reader036.vdocuments.site/reader036/viewer/2022062514/5583bebed8b42a784f8b47d4/html5/thumbnails/12.jpg)
3D coordinate system
3D Cartesian coordinate system Direction and magnitude along three
axes, with reference to an origin Location are defined by x, y, z coordinate
![Page 13: 3 d graphics basics](https://reader036.vdocuments.site/reader036/viewer/2022062514/5583bebed8b42a784f8b47d4/html5/thumbnails/13.jpg)
We can define points, segments, lines rays, curves, polygons (any other planar geometry) and cubes, cones, spheres, etc. (volume in space)
Can have multiple origins (frame of reference) and transform coordinates among them
![Page 14: 3 d graphics basics](https://reader036.vdocuments.site/reader036/viewer/2022062514/5583bebed8b42a784f8b47d4/html5/thumbnails/14.jpg)
![Page 15: 3 d graphics basics](https://reader036.vdocuments.site/reader036/viewer/2022062514/5583bebed8b42a784f8b47d4/html5/thumbnails/15.jpg)
Rules
right hand rules etc. These rules determine orientation of axes
and direction of rotations Thumb = pos x Index up = pos y Middle out = pos z
![Page 16: 3 d graphics basics](https://reader036.vdocuments.site/reader036/viewer/2022062514/5583bebed8b42a784f8b47d4/html5/thumbnails/16.jpg)
Most world and objects axes tend to be right handed
Left hand axes often are used for cmaeras
![Page 17: 3 d graphics basics](https://reader036.vdocuments.site/reader036/viewer/2022062514/5583bebed8b42a784f8b47d4/html5/thumbnails/17.jpg)
![Page 18: 3 d graphics basics](https://reader036.vdocuments.site/reader036/viewer/2022062514/5583bebed8b42a784f8b47d4/html5/thumbnails/18.jpg)
Rotation
Grasp axis with right hand with thumb oriented in positive direction, fingers will then curl in direction of positive rotation for that axis
![Page 19: 3 d graphics basics](https://reader036.vdocuments.site/reader036/viewer/2022062514/5583bebed8b42a784f8b47d4/html5/thumbnails/19.jpg)
Right handed Cartesian coordinate system describes the relationship of the x, y, z in the following manner
X is positive to the right of the origin and negative to the left
Y is positive to the above of the origin and negative to the below
Z is positive behind the origin and negative beyond
![Page 20: 3 d graphics basics](https://reader036.vdocuments.site/reader036/viewer/2022062514/5583bebed8b42a784f8b47d4/html5/thumbnails/20.jpg)
Z up typically used by designers Y up typically used by animators
![Page 21: 3 d graphics basics](https://reader036.vdocuments.site/reader036/viewer/2022062514/5583bebed8b42a784f8b47d4/html5/thumbnails/21.jpg)
Application data will be transformed among the various coordinate systems depending on whats to be accomplished
Individual coordinate systems often are hierarchically linked within the scene
![Page 22: 3 d graphics basics](https://reader036.vdocuments.site/reader036/viewer/2022062514/5583bebed8b42a784f8b47d4/html5/thumbnails/22.jpg)
Use OPP to make the object of the 3d points
Class 3d-class { public:
Float x; Float y; Float z;
}
![Page 23: 3 d graphics basics](https://reader036.vdocuments.site/reader036/viewer/2022062514/5583bebed8b42a784f8b47d4/html5/thumbnails/23.jpg)
3D modeling
Modeling is the process of describing an object or scene so that we can construct an image of it
Angle, location, size etc.. Polygon strips or meshes
Meshes provide a more economical description than multiple individual polygons (wireframe model
100 individual triangles, each have 3 vertices, would require 100 x3 vertex definitions
Triangle strips require n + 2 vertex definitions, n is number of triangles in strip. For 100 needs 102 unique vertex definitions
![Page 24: 3 d graphics basics](https://reader036.vdocuments.site/reader036/viewer/2022062514/5583bebed8b42a784f8b47d4/html5/thumbnails/24.jpg)
Meshes also provide continuity across surfaces which is important for shading calculations
![Page 25: 3 d graphics basics](https://reader036.vdocuments.site/reader036/viewer/2022062514/5583bebed8b42a784f8b47d4/html5/thumbnails/25.jpg)
![Page 26: 3 d graphics basics](https://reader036.vdocuments.site/reader036/viewer/2022062514/5583bebed8b42a784f8b47d4/html5/thumbnails/26.jpg)
With cured surfaces the accuracy of the approximation is directly proportional to the number of polygons used in the representation
More polygons yield a better approximation
But more polygons also exact greater computational overhead..
![Page 27: 3 d graphics basics](https://reader036.vdocuments.site/reader036/viewer/2022062514/5583bebed8b42a784f8b47d4/html5/thumbnails/27.jpg)
Rendering
The process of computing a 2d image using a combination of a 3 D database, scene characteristics and viewing transformations
Various Alog. According to the need of applications
![Page 28: 3 d graphics basics](https://reader036.vdocuments.site/reader036/viewer/2022062514/5583bebed8b42a784f8b47d4/html5/thumbnails/28.jpg)
Dissolution
The subdivision of an entity or surface into one or more non-overlapping primitives
Typically, renderers decompose surfaces into triangles as part of the rendering
![Page 29: 3 d graphics basics](https://reader036.vdocuments.site/reader036/viewer/2022062514/5583bebed8b42a784f8b47d4/html5/thumbnails/29.jpg)
![Page 30: 3 d graphics basics](https://reader036.vdocuments.site/reader036/viewer/2022062514/5583bebed8b42a784f8b47d4/html5/thumbnails/30.jpg)
![Page 31: 3 d graphics basics](https://reader036.vdocuments.site/reader036/viewer/2022062514/5583bebed8b42a784f8b47d4/html5/thumbnails/31.jpg)
Sampling
The process of selecting a representative but finite number of values along a continuous function sufficient to render a reasonable approximations of the function for the task at hand
![Page 32: 3 d graphics basics](https://reader036.vdocuments.site/reader036/viewer/2022062514/5583bebed8b42a784f8b47d4/html5/thumbnails/32.jpg)
Level of detail
To improve rendering efficiency when dynamically viewing a scene, more or less detailed versions of a model may be swapped in and out of the scene database depending on the importance of the object in current view
![Page 33: 3 d graphics basics](https://reader036.vdocuments.site/reader036/viewer/2022062514/5583bebed8b42a784f8b47d4/html5/thumbnails/33.jpg)
Surfce normal
A vector perpendicular to a surface and outward facing
SN are used to determine visibility and also in the calculation of shading values
![Page 34: 3 d graphics basics](https://reader036.vdocuments.site/reader036/viewer/2022062514/5583bebed8b42a784f8b47d4/html5/thumbnails/34.jpg)