2D Animation and Graphics Programming Guide
2D Animation and Graphics Programming Guide
DATE
EXPT. NO,
Expl. Wnite
animatom
waig transfanmatim.
want te
eirele to
shilt oinele aleng
x-dineefon continuely
inteniaa.
The bols
monernet
motiun
and
otaticn tanslati ete
ULTRA
Teacher's Signature
PAGE NO, o2
DATE
EXPT, NO,
[Link] cirela.
irectins
ineuee <slio h
void main )
Satenlor ()
sat pllstyle (salid- FILLa)
delay e),
setcolor(3):
setillshyle (solid-fill )
crele ; so,se)
ploodfilL Ct2,s2.3);
elean leice C
ULTRA
Teacher's Signature
PAGE NO.
DATE
EXPT. NO.
Seteolor Ca)
Selfill styk CSolTD-fIlL, 9):
crele(so,i,so);
floolillL(S2 it2,3):
elay C2):
Setcalaz(3):
(solid -fill
set filstyle
eizeleCso, i, se)
)
(20)
elea avicer )
eirele lingenal lizeeien
Setfillshyle
9):
(soLID- FILL,
CI2it2,3)
loedfill
(2)
Soaßenm
ULTRA
Teacher's Signature
Output -
PAGE NO.
DATE
EXPT. NO.
n eee digonal
lirecticn
Seteolor Cs)i
setfillstyle CsoLID-fIIL,9):
cirele Ci So);
loodfill Cie2, i42,3)
(20) ?
Aalay,
Aáaßenmf
ULTRA
Teacher's Signature
PAGE NO.
DATE
EXPT. NO.
Ex 2. Wnite which
aethuatim list
pixel Anawing simple
2D obyeet Cetrele, Etipse ).
Deseniphm i
300, 4oD)
hird þanamaten
Spacfies the adius ef the eirele.
Declarati an - eizelo Cx,) eirele Cioe 20o,25
(25is hadius centa
to da ellipse Cxy
Da to dao e
(tniangle, heetaglefegtg
ete)
Draspaly Cnum, fainta)
Salicate nembens
en: de mildnaw a
whieh
foita
are (32o,/s0),"
Contains
20, 309 and C2so, 3oo) nae tt
loat pait (320 lGo)
ULTRA
Teacher's Signature
PAGE NO.
DATE
EXPT. N0.
sbape.i
#include <s\dio.)
ineludo < Conioh)
int gd DETECT qm
cleas euice C)
line 15o, (00, 242,16o
ellipa (2u2,l65, o, aoo,S:
|
line(15o, 60, (20, 1So)
150 320,1so)
260)
iwe320, So, 32o,200):
1ine o0, 260, 200)
l320,200, 316, 2s0):
ae
ine
290,280
130, 200
ine (270
Sakeng
ULTRA
Teacher's Signature
Oukput
:
PAGE NO. o8
DATE
EXPT. NO.
Desenption'
AA Bezien a penamaten
cantrol mation.
foun potnta
the plane in highen imenial
Baze e.
ULTRA
Toacher's Signature
PAGE NO.
DATE
EXPT. NO.
pass
theaepoita ane thee to pnovido
dimensicnal informatim
itnnains the
lietim before tunning tmianda
ue
The
B4) = (-° t3it),t3(1-t){ftp, tElo,1]
eaplicit
CUe
# inelude cgtaphia h)
leabem
PAGE NO.
DATE
EXPT. NO.
stan
ULTRA
Teacher's Signature
Output:
Centnol pointa:
136 |20
|60
240 220
JLTE
PAGE NO.
DATE
EXPT. NO.
Ex . Wait
2D nansformation such as
The 2b tanfomadion
line path
(4,1) Co)
4S) (2,5)
distanee Bxis
alg
ULTRA
Teacher's Signature
PAGE NO.
12
DATE
EXPT. NO.
translatin
Piogam foz
+incude sldios)
#incude< conio- h)
# incude <gxaphics h)
+in cule < mathh
void main ls
tyty
printe (Entan tie shenting þaiot
3h+ty
Setcoloy ();
ULTRA
Teacher's Signature
Output
Oiial line
PAGE NO. 13
DATE
EXPT, NO.
[Link]
We
o&get eithen
eithen ky inceaig
Anade
baacd
axis axis
alt
Co-odinste
oetaincd as
n matrix oom
X
o SY
ULTRA
Teacher's Signature
PAGE NO.
DATE
EXPT, NO,
incude csllio-h)
# incude cavaplhicsh)
+incle <math h
the
pnintEsto
Satolar (s)
euttet xY CxtYt2,hel
x3=X1t SX
X = X SX
Y4 = Y, SY
SatcoloY ();
(inelx3,Y3, X4 Yy
6uttext Y(X3 t2 Y3t2,
ULTRA
Teacher's Signature
Outpat
Enter te stnig point !120 160
point i1s0
100
Enter enlig
Enton disfanee sxsY:
scling
2 2
blon
PAGE NO.
DATE
EXPT. NO.
lonunday
e en
tl agon
colo the
and
chzete
senlig palygn fill algentan
algonkm
not asigle
taat
e is
paint suelh
kefined
anus
within
by neflacig
inteni
caley
Lcalr baunday
alganitm
T
nd
. is
We
Clled
eassija
stant
all
ploadlill
faam
pial
a Speailie
aes tt
inteni ox CKr) pixe
ane euzently set
-given
intezior calor weith te lesied ill
Cely
fas tan me
ULTRA
Teacher's Signature
PAGE NO. I6
DATE
EXPT, NO.
intariox pixel
pixel auesso tuat all
& eonneeted
4 conheeted
4
Algenatam
putpial (xY,flca)
losd (xt1, R-cel,old cal);
tloed Cx-l, il-cal, old-call
locd CxY+1 ill=cel, oldceld
ULTRA
Teacher's Signature
PAGE NO.
DATE
EXPT. NO0.
4 Connectad floodgil
tinclede Lstdioh)
#inchde <cnio h)
tinclude<giaphics h)
# inclule Kdosh)
iood Cint, ind int iat)
void
Void
int gd, qnn= ÞETEeI
init gaugh
Necngle
ULTRA
Teacher's Signature
PAGE N,
DATE
EXPT NO
Exp G: Cveate
2D motiun taseun by
qraphics
maomedia
step yi Now
tyl entesa
stap
ULTRA
Date:
Conwent
8 Then dtaltentu
U.S.
Teacher's Signature
Page No. 20
Date :
Macromedia {lask.
slep 2;Du)
Dra ny shape de picune in the stog
step 3:
3; click any fame
Cnst be Cmnezt to
ing F&)
step 4 Nou alick fast rane
480
U.S.
Teacher's Signature