PROSEMINAR ON WEB 3 - PowerPoint PPT Presentation

1 / 23
About This Presentation
Title:

PROSEMINAR ON WEB 3

Description:

... horizontal scan-line whereas multiple is needed for concave as in the diagram below. ... ears,fascilitates polygon triangulation.An ear is determinedby a ... – PowerPoint PPT presentation

Number of Views:27
Avg rating:3.0/5.0
Slides: 24
Provided by: Riff
Category:
Tags: proseminar | web | diagram | ear | of | the

less

Transcript and Presenter's Notes

Title: PROSEMINAR ON WEB 3


1
PROSEMINAR ON WEB 3

3-D COMPUTERFUNDAMENTALS
  • BY MOKUBE

2
TOPICS
  • 3-D TRANSFORMATION
  • RASTERIZATION OF
  • 2-D PRIMITIVES
  • 2-D AND 3-D CLIPPING

3
CONTENT OF THE TOPICS
  • 3-D TRANSFORMATION
  • EUCLIDEAN SPACES AND DEGREES OF FREEDOM



    TRANSLATION,SCALING ,ROTATION
  • REPRESENTATION ,PROJECTION ,AND
  • IMPLEMENTATION.
  • RASTERIZATION OF 2-D PRIMITIVES
  • -POINTS RASTERIZATION,
  • -LINE SEGMENTS RASTERIZATION,
  • -POLYGONS RASTERIZATION
  • 2-D AND 3-D CLIPPING
  • -CLIPPING- STRATEGIES, -POINTS,
  • -LINE SEGMENTS,AND POLYGONS

4
  • Transformation
  • Definition this is a function which maps points
    from one coordinate system to another.
  • A single point in a 2-D Euclidean
    space is unambiguosly specified through ist
    Cartesian coordinates(x,y) whereas with 3-D
    Euclidean space,a single point is uniguely
    specified by three coordinates(x,y,z).
  • Points,scalar values and vectors are used
    to construct the description of a virtual world.A
    rigd body possesses in a plain three degrees of
    freedom and six degrees of freedom in 2-D and
    3-D spaces respectively.
  • The degrees of freedom in 2-D spaces are
    translation along the two axes and rotation
    around a point.
  • .

5
  • TRANSLATION
  • In 2-D space,translation is the movement of
    points along the x and y
  • axes with the distance between the points
    being constant or the moving
  • of the coordinate system into the opposite
    direction as in the figurs below.
  • Simple Algorithms are used to describes a
    Translation Transformation

6
  • SCALING
  • This is propotional expansion or contraction of
    distances between point or of space itself and
    hence not a rigid body transformation.
  • ROTATION
  • In 2-D rotation is either clockwise or
    anticlockwise on the X and Yaxes at some angles-
    the angle of rotation.3-D rotation is along the
    x,y and z axes and involves a kind of reference
    system,a positive direction of rotation to be
    applied and in what order,hence involving the
    trigonometric sine and cosine. Functions in its
    calculations.
  • The chosen reference system is vertical for
    y,horizontal for x,and z
  • diagonally away from us and the order 3-D
    rotation transformation
  • is seen as matrix multiplication of a rotation
    matrix by a vector
  • producing a result vector.

7
  • Graphical explanation

8
  • REPRESENTATION OF TRANSFORMATION
  • Scaling and rotation transformatons are linear
    whereas translation is affine
  • transformation and are all better expressed by a
    4x4 matrix and somewhat
  • adjusted coordinate vectors.This is expressed as
    below

9
  • Projection transformation
  • Definition3-D world coordinates mapping
    onto 2-D screen coordinates.Parallel and
    perspective projection do exist.
  • Parallel when one dimension of space is
    collapsed and all the points of the parallel
    lines in a 3-D space mapps into a single point in
    2-D plane.If the projecction line crosses the
    projection plain at angle of 90 degrees, this is
    an orthogonal parallel projection while the rest
    are oblique.The actual size of object remains
    thesame and the parallel lines are preserved.This
    projection is used in CAD applications.
  • Diagram

10
  • Perspective produces an image in which sizes of
    the projections of objects depends on the
    objectsdistance to the viewer.At point of
    intersection of the rays from the object,an image
    seen as an object to a viewer is formed.This
    transformation is non-linear and hence require to
    mainttain homogeneouse coordinats for it to be
    represented in a matrix form.there exist
    one-point and two-point perspectives and one
    whose transformation depend on the angle between
    the cameras view and the normal of the screen.
  • The diagrams below perspective transformation.

11
Diagrams explains it
12
  • IMPLIMENTING TRANSFORMATION
  • Fixed Point Arithmeticthis is the
    representation of integers such as binary (power
    of two), decimal(power of ten) numbers in
    computer.
  • Negative numbers are computed using the twos
    complement
  • form which negates the leftmost digit.
  • Fixed point easily carries on fast addition and
    subtraction when
  • there exist no floating point unit but then has
    the problem of
  • overflows
  • The performance of basic geometric
    transformation,the techniques describing
    location,orientation and motion of visual objects
    and their visibility to a viewer has been
    discussed so far in this section.

13
  • Rasterization of 2-D primitives
  • The process of transforming 2-D analytical
    description of geometric
  • primitive into a proper set of descrete
    pixels irasterization.
  • Point rasterization setting specific cell of
    bitmap memory to a color
  • value.Difficulties arise with realization
    as imag bitmap is inherently
  • descrete.2-D space tries to mimic contains
    continuoseranges of real
  • numbers.
  • Assumptionto reduce round-off errors the
    coordinates of the point to
  • be plotted are integers and the area of
    point equals that of the pixel
  • Line rasterizationfinding all pixels
    intersected by or closed enough
  • to a given lines path.For a line forming
    two similar triangles with
  • points(Xstart,Ystart),(Xend,Yend) and the
    point (X,Y) on the line.
  • A forward difference technque is applied to
    iteratively compute
  • coordinates of multiple points.It describes
    the rate of change of the
  • function with respect to the change of the
    argument.
  • J.E.Bresenham iterative method involves
    taking a wider range of
  • coordinates assuming the change in the x
    coordinate being wider,

14
  • Polygon rasterization simple polygon consists of
    convex and concave and uses the scan-line
    approach for their rasterization i.e letting the
    scan-line to travel verticaly along the
    polygon,intersectin at each heights at some line
    of pixels.convex is differentiated from concave
    its connecting line at any two points never
    leaves the polygons boundaries.And only one
    continuos span of pixel is needed for any
    horizontal scan-line whereas multiple is needed
    for concave as in the diagram below.
  • verteces
  • -preset the start and end values
  • -determine the scan-line from the edges and
  • -rasterize the current scan-line.

15
  • The algorithm for the rasterization of concave
    polygon in finding the
  • Intersection of a scan-line with edges is as
    follows
  • -pre-sort all edges(excluding useless
    horizontal ones)according to their least Y
    coordinate
  • -maintain a list of active edgesby adding the
    edges of the pre-sorted list to it.
  • -examine if y of the pre-sorted list is equal
    to that of the current scan-line.
  • -use current X coordinates for the edges in
    the activeedge list to fill the span and repeat
    the iteration.

16
  • MEISTERS THEOREM
  • Meisters theorem which states that any simple
    polygon with
  • A tleast three vertices has atleast two
    non-intersecting
  • ears,fascilitates polygon triangulation.An ear is
    determinedby a
  • polygons vertex such that ist two neighbor
    vertices can
  • connected by a diagonal.

17
  • Rendering interpolatively shaded polygons
  • Here we integrate rasterization and
    computation of light intensity by keeping a color
    intensity value or values in every vertex of the
    polygon and linearly interpolating these values
    at the time of pixel line computation in finding
    the color for each pixel inside the polygon
  • Rendering textured polygon
  • -A texture associates some color values to two
    parameters (u,v) of polygons area.Procedural
    textures can be distinguishedwhere some function
    (a procedure)computes a color for arbitrary (u,v)
    coordinates.
  • Commonly textures are stored as a bitmap
    whereby colors are explicitly stored for each
    (u,v) pair inside a 2-D array.

18
  • Anti-aliasing
  • There exist some degree of inperfections,for
    instance when drawing polygons a pixel partially
    covered by the analytical area of the polygon was
    not plotted.Also when picking a color value from
    the texturemap,only one texture cell was
    considered.
  • -the textures are precomputed at different
    scales
  • -smaller textures are used for polygons
    further away from the viewer
  • -MIP mapping method are employed.
  • Stochastic sampling is another approach
    used-leaves visual noise and not regular
    patterns in the filtered image.

19
  • 2-D and 3-D Clipping
  • Clipping the process to locate primitives
    part or parts which
  • satisfy some spatial constraints.
  • 2-D Clipping strategies
  • -clipp before the rasterization phase for
    polygons restricted by simple clipping area
    (rectangle).
  • -clipp during rasterization stage for convex
    primitivescheck if a pixel is within the proper
    bounds,and then plotting.
  • -the primitive is rasterized into some bigger
    buffer selecting from the buffer only those
    pixels inside the complex clipping area.

20
  • Clipping points
  • -rectangular clipping described by infinite
    four lines which limit the least and greatest X
    coordinates and the least and greatest Y
    coordinates.
  • Clipping line segments
  • -simultaneous clipping with rasterization
    and checking if the pixel is within the
    boundaries or not.
  • - with line segment were finding
    intersection between segment and boarders of
    clipping areas.
  • -trivial acceptance or rejection based on
    region outcodes speeds up comparism.
  • -use of bitwise and and or operation.
  • -An algorithmic procedure describes the
    binary search clipping

21
  • clipping polygons
  • -clipping the polygon iteratively along all
    edges
  • -searching intersection between polygons
    edges and edges of the clipping area.
  • -polygon changes ist shape as a result of
    clipping.
  • 3-D Clipping strategies
  • -ensures transfornation of all valid points
  • -limited numbers of primitives and overflow
    due to big coordinates
  • There is no 3-D effect for far objects and
    has a perspective angle of
  • 90.

22
To sum up
  • Transformation techniques allow to describe
    location, orientation and motion of virtual
    objects and also their visibility to the viewer
  • The rasterization routines are used to picture
    geometric primitives. Shading and texture mapping
    can be added to improve visual realism
  • Clipping discards the objects in the world space
    which would not contribute to the generation of
    the image

23
  • ANY QUESTIONS
  • THANKS A BUNCH
Write a Comment
User Comments (0)
About PowerShow.com