CE-201 Lect_5

download CE-201 Lect_5

of 20

Transcript of CE-201 Lect_5

  • 8/13/2019 CE-201 Lect_5

    1/20

    !"#$ &'$()*+,'$

    Lecture-5

  • 8/13/2019 CE-201 Lect_5

    2/20

    !!" "$%&'()*+

  • 8/13/2019 CE-201 Lect_5

    3/20

    13

    12

    11

    10

    10 11 12 13

    53

    52

    51

    50

    50 51 52 53

    ,'-.-/*0+1. 2(/- "$%&'()*+

    3*(. '0.)-'4$(/- %-/-'05/% 0$%&'()*+ (. +&'- 0667'0)-0/8 -9:6(-/)

    ;) 7.-. &/$< (/6'-+-/)0$ (/)-%-' 60$67$05&/. ;) 60/ =- 080>)-8 )& 8(.>$0< 6('6$-. 0/8 &)*-' 67'?-.@ 3*- +-)*&8 (. =0.-8 &/ (8-/590)* 0) -06* .0+>$- .)->@

    Fig-1 Fig-2

  • 8/13/2019 CE-201 Lect_5

    4/20

    ,'-.-/*0+1. 2(/- "$%&'()*+BC

    ;/ D(% C )*- $(/- .-%+-/).)0'). 9'&+ .60/ $(/- CC

    0/8 > (A- $ >&. (5&/

    E6&$7+/F CG@ 3*- /-A)

    >&(/) 0$&/% )*- $(/- +0(A-$ >&.(5&/ ECCH

    CCF &' ECCH CIF

    J(+($0'$(A-$

    >&.(5&/ +0< =- EKCH KIF

    &' EKCH KCF

  • 8/13/2019 CE-201 Lect_5

    5/20

    ,'-.-/*0+1. 2(/- "$%&'()*+BI

    ,'-.-/*0+1. $(/- 0$%&'()*+ )-.). )*- .(%/ &9 0/(/)-%-' >0'0+-)-' 0/8 )*- &/- L*&.- ?0$7- (.

    >'&>&')(&/0$ )& )*- 8(99-'-/6- =-)L--/ )*-

    .->0'05&/. &9 )*- )L& >(A-$ >&.(5&/. 9'&+ )*- 06)70$

    $(/- >0)* (. .-$-6)-8@

    2-) )*- $(/- .)0'). 9'&+ $-9)4-/8>&(/) EA&H (A-$ L*&.- .60/4$(/- < ?0$7-

    (. 6$&.-.) )& )*- $(/- >0)* (. >$&))-8@ ykxk+1 xk+2

    Fig-3

    yk+1

    yk+2

    yk+3

    xk xk+3

  • 8/13/2019 CE-201 Lect_5

    6/20

    ,'-.-/*0+1. 2(/- "$%&'()*+BN

    2-) )*- >(A-$ 8(.>$0$&) L($$ =- (/ 6&$7+/ AOPC 0/8 +0< =- '->'-.-/)-8 0.

    EAOPCH 7)-8@

    D&' :'.) >&(/)

    !(99-'-/6-

    D&' .-6&/8 >&(/)

  • 8/13/2019 CE-201 Lect_5

    7/20

    ,'-.-/*0+1. 2(/- "$%&'()*+BS

    !(99-'-/6- E8CR 8IF Q I+@EAOPCF R I 0'0+-)-' >O (. R?- (@-@ 8CX8I Y(A-$ 0) &(/) L($$ =- >$&))-8 Z(6-4Z-'.0

    xk+1 xk+2

    Fig-3

    yk

    yk+1

    yk+2

    yk+3

    xk xk+3

    d1

    d2

    y = m.x + b

  • 8/13/2019 CE-201 Lect_5

    8/20

    ,'-.-/*0+1. 2(/- "$%&'()*+BK

    3*- 6*0/%- (/ 6&&'8(/0)- 0$&/% )*- $(/- )0O-. >$06- (/7/() .)->.@ 3*- 8-6(.(&/ >0'0+-)-' 0) /-A) .)-> EOPCF

    L($$ =-[

    >OPC Q IT< @ AOPC 4 I TA @

  • 8/13/2019 CE-201 Lect_5

    9/20

    ,'-.-/*0+1. 2(/- "$%&'()*+B\

    "$%&'()*+ 9&' _+_XC[ E.)->.FC@ ;/>7) 0/8 .)&'- EA&H $&) >&(/) EAO PCH OPC Q >O P I T< 4 I TA

    K@ b->-0) .)-> S TA 5+-.

  • 8/13/2019 CE-201 Lect_5

    10/20

    ,'-.-/*0+1. 2(/- "$%&'()*+B]

    cA0+>$- 4 Y$&) 0 $(/- L()* -/8 >&(/). EIGH CGF 0/8 ENGH C^F@

    3*- .$&>- &9 $(/- (. G@^@

    C@ `0$67$0)- TA EQCGFH T< EQ^FI@ `&+>7)- 8-6(.(&/ >0'0+-)-'H >& EQ I T< 4 TAQ \FN@ `&+>7)- I T< EQC\FH I T< 4 I TA EQ 4SFS@ "..7+(/% >O X GH )*- /-A) >&(/) L($$ =- EAOPCH OPC Q >O P IT0'05&/. 9'&+ )*- $(/- >0)* 0'--g70$ E8C Q 8IFH L- 6*&&.- 7>>-' E&' $&L-'F &9 )*- )L&

    60/8(80)- >(A-$.@

    J>-6(0$ 60.-. $(O- T

  • 8/13/2019 CE-201 Lect_5

    14/20

    ,'-.-/*0+1. 2(/- "$%&'()*+BCG

    D&' /-%05?- .$&>- &9 0 $(/- E_+_XCF W*-/ +&?(/% 9'&+ $-h )& '(%*) >& Q 4 IT< 4 TA

    ;9 >& (. R ?-H >&(/) L($$ =- EAOPCH OPC Q >& 4 I T& (. P ?- >&(/) L($$ =- EAOPCH OPC Q >& 4 I T< 4 I TA

  • 8/13/2019 CE-201 Lect_5

    15/20

    ,'-.-/*0+1. 2(/- "$%&'()*+BCC

    D&' /-%05?- .$&>- &9 0 $(/- E_+_XCF W*-/ +&?(/% 9'&+ '(%*) )& $-h >& Q IT< P TA ;9 >& (. R ?- >&(/) L($$ =- EAO4CH OPC Q >& 4 I T& (. P ?- >&(/) L($$ =- EAO4CH OPC Q >& P I T< P I TA

  • 8/13/2019 CE-201 Lect_5

    16/20

    ,'-.-/*0+1. 2(/- "$%&'()*+D&' .$&>-. (/ )*- '0/%- GX+XC

    3*- 60$$ )& !"#$%&"'$&08. 0 >'-.-) 6&$&' ?0$7- (/)& )*- 9'0+- =7j-' 0) )*- .>-6(:-8 EAH (A-$ >&.(5&/

  • 8/13/2019 CE-201 Lect_5

    17/20

    FRAME BUFFER

    A frame buffer is a video output device that drives a video display from amemory buffer containing a complete frame of data. The information in the

    memory buffer typically consists of color values for every pixel (point that can bedisplayed) on the screen.

    Color values are commonly stored in 1-bit binary (monochrome), 4-bit palettized,

    8-bit palettized, 16-bit highcolor and 24-bit truecolor formats.

    The total amount of the memory required to drive the frame buffer depends on

    the resolution of the output signal, and on the color depth and palette size.

  • 8/13/2019 CE-201 Lect_5

    18/20

    2&08(/% D'0+- ,799-'

    W*-/ &=k-6). 0'- .60/ 6&/?-')-8 9&' 8(.>$0< L()*'0.)-' .&.(5&/. +7.) =-60$67$0)-8@

    J60/ 6&/?-'.(&/ 0$%&'()*+. %-/-'0)- >(A-$ >&.(5&/.0) .766-..(?- 7/() (/)-'?0$.H )*(. 0$$&L. )*- 7.- &9(/6'-+-/)0$ +-)*&8. )& 60$67$0)- 9'0+- =799-'

    088'-..-.@ 3*(. (. 066&+>$(.*-8 L()* .-)Y(A-$ >'&6-87'-H L*(6*.)&'-. (/)-/.()< ?0$7-. 9&' )*- >(A-$. 0) )*-6&''-.>&/8(/% 088'-..-. L()*(/ )*- 9'0+-4=799-'0''0

  • 8/13/2019 CE-201 Lect_5

    19/20

    Frame-buffer array is addressed in row-major order

    Pixel screen positions stored linearly in row-major order within the frame buffer

    For 1 bit per pixel, the frame buffer address

    for pixel position (x,y) is calculated as

    addr(x,y)=addr(0,0)+y(xmax+1)+x

    addr(x+1,y)=addr(x,y)+1

    addr(x+1,y+1)=addr(x,y)+xmax+2

  • 8/13/2019 CE-201 Lect_5

    20/20

    SOFTWARE STANDARDS

    ! The primary goal is portability among the graphics softwares.! Without standards, programs designed for one hardware system can not be

    transferred to another system without extensive rewriting of programs.

    ! Several Int. & national standards planning organizations have cooperatedand developed Graphical Kernel System (GKS). The is adopted by Int.Standards organisation (ISO) and American National Standards Institute

    (ANSI).

    ! Other system is PHIGS (Programmers Hierarchial Interactive GraphicsStandard), which is extension of GKS.

    ! PHIGS+ is developed to provide 3D surface-shading.! Standard graphics functions are defined as a set of specifications that is in-

    dependent to any programming language.

    PHIGS

    Fortran

    C

    polyline(n,x,y)call gpl(n,x,y)

    ppolyline (n,pts)