0% found this document useful (0 votes)
9 views

CG (Assignment 2) Shubh

Uploaded by

Aviral Jain
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

CG (Assignment 2) Shubh

Uploaded by

Aviral Jain
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

22BCONiI9S

Subject Date.:

Aaigmmend-2
Secio-A

objectuaa celeeton af pixels Th giaphics


ehattaA centinuou Thpised ud a cicte.
Fath

2hat i Raatuigatiom

ertet plxel odsta fo suthut on A idio dihlay


in bitnao ile fomat
3. Baln clipping ano cis winda
Cipig
that li Qutidea sbcipd uieuing ana

chRAdiate sytemofa quaphic dlce thatdyinw


The Aibleaua

4.

diuplay 9n cmdaat,Tu nis pet the duuic


coedinate a a to llplay
A windowpatcan be
GwNDOWw A uiw port àdllnd
by the GPORTcmmand
22Bco NII95
Subject Deta

Circle
2Me aquradaant h each
quadaant th a tuus actant 4 hecalculatien
0ctant aene Tne he

Sution -B

dauing agoithn Bruueng han u lin AMgo


Ain. Alysulha
diükial amalyger
t m o n eficiemt man
Benengham line algo

Jees than han


Breeingham line alga

Bungham Jme algo algoithm


hasmol
paeciion

comaplex

2. behlain puunghamm ine arauuing algo. aaw a


ine gm (23) to csg) hy ming
bruwngham's algonithm.
22BconN 195

Subject Date.:

Brngtunm Jine Aigoithm


alosih j adontotmg oine
4

iciatuthd becauwineee endy integu


additicn tactinnd mutiblcaten Thw

cam hegeuadec quaickly


(2,3)
Dawsing
RounghamA
ime
alg0:
2i2.

Hea m1
Nous Deciienparamate (P)

P 203)-S= 1
PO

Pr = Rt2 (A- A)

P<o henZi=
22 BcoNI9s

Subject Data

i
3
-3 3
3 3
-) 6

(23), c3,4)(3,s) (4, c) u,1)(5,3)

3 waite DDAalgarithm Waite aduonttge and


duadwanta_e o thi algcrithm.

DDA CDipilal oijaintial algo malegea)
lime daauiang algeitnm d n cmahuta gaabhi
to qnMate a d gnnt hetuuin tuss shecllied
sime aid iclead
algeithm Thatnka by ing The

Stelzsi
LH) Calcuate onndA:
Calculate Moe(m).
Set tu

coondinate Ang aquation

s uachd
+2z;t3 Px=fk
+) i’
Pzo
-(raduu) Pa y
-ACradius) =5 (P)poaamts diina
fa
crcle Otergn
a
goithnÀ neecio
fo odetnine d
algo am point mi-d

adluu
g amd D)Co, Kmtu hauing cincle
ras crcdegensatien
algo. -peint id lsit
Secion
-C
aca
censhlexity tina
DiLadwantaqu
e n
pgintcalcutoes itand ltiblicotion
polmt laattag amy nat dau becaue
uedrct the
cnhlexiHes:
npleranatd to
eay and Alinsple i4
AdyantaguK
Date.: Subject
19S 228c0
22BCoNI 55
Subject, Deta

Cainn initialplato, 6)
Rodlus=9
haitialie k)= (0,5)
Odamt)
uadant

f (o,9)
(, 9)
(2,3)
(3, 8)

(5,6)
69)
fs -4C0)+ 3 -5

2 PK = 0 2 (2-8)+ S = 7

-4 + 203)t 3 2
fo fk 2

P= 24 2(43) +5-)
22 BcON19s
Subject Date.:

=1+C2)45

Hene

2. hlrite ten stherland algoitnm fon ine



algnithm
uindouw
di_is binasyThL
diiien Te ugien
and (x_min ymin)Th cntal
(amox,y-max)
pat the
uieuing ugim Sott ccleg uiaclou al nes
uhicth Li uuttnin Thii nugiem
Viible. Canypleely
Algsitn m:
Calcuate poltim o bath encyast ne
OR teraton n both theu end polnts
D000
lime

Th ine ç cEruiduecd hdied cau


22BCONI3S
Date.

Jntuectibm
boundauer he nsolow
m=ltsS(-X)

etangle widow
I t m (t-)
whee X- Xe min
e Xwmin miimn valw andiaate
b) bit 2 is" o nlhae
e intuucd
inatuurd im ght banday

he X = Xwmax
uith battam bnda
X3 = X+(9-)/m
y= Ywmin
(d) bity " m e ntenRcts witn tot bondany

3 laim lord fiing and Baumdag illing mthode


tuo nal ie examaple
Ploed flinng
binide: Ta algoithm tasta
and eAiayilu ayiacent plxele uitn te
bundang
Selet a sed 2ixel ithin tA

chi Rcumialy chek ancd ll ntgh bauzimgpixele


Subject Date.:
22BcoN)125

Baumdang fiingi
jnwuard wmtil it
each thecemter
The boundang pixelthe gien
bonadagpixel and meue nard
lllng achacnt piseb with Aane cclous until
cint_ ached
) Reheat fon al bouncay pisele

Real ite Examble


Caleahlacmasnd Bath algo can
mage uittn
arantnL Cele
cam be Aed to l

yuith a
quodient pattism

You might also like