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

Curves and Fractals

The document discusses different types of curves that are commonly used in computer graphics. It describes implicit curves, explicit curves, and parametric curves. Implicit curves define a set of points on a curve through a procedure to test if a point lies on the curve, usually defined by an implicit function. Explicit curves represent a mathematical function plotted as a curve. Parametric curves have parameters in their form and specify curves using two functions of a parameter that define the x and y coordinates. Bezier curves are generated under the control of other points using approximate tangents from control points.

Uploaded by

Ashwin Mohan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
41 views

Curves and Fractals

The document discusses different types of curves that are commonly used in computer graphics. It describes implicit curves, explicit curves, and parametric curves. Implicit curves define a set of points on a curve through a procedure to test if a point lies on the curve, usually defined by an implicit function. Explicit curves represent a mathematical function plotted as a curve. Parametric curves have parameters in their form and specify curves using two functions of a parameter that define the x and y coordinates. Bezier curves are generated under the control of other points using approximate tangents from control points.

Uploaded by

Ashwin Mohan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

I

ncomput
erg
r a
phi
cs,
weof t
enneedtodr
awdif
fer
enttypesofobj
ect
son t
othes
creen
.
Obj
ect
sarenotfl
atal
lth
et i
mea n
dwen eedtodra
wc ur
vesmanytimestodr
awa n
obj
ect
.

Ty
peso
fCu
rve
s
Acurvei
sani
nfi
nit
elyl
arg
es etofpoi
nt
s.Ea
chpoi
nthast
won ei
ghbor
sexcepten
dpoi
nt
s.
Cur
vescanbebroadl
yclass
ifi
edin
tothr
eecat
egor
ies− 
expl
i
cit
,impl
ici
t,
 
and 
par
ametr
ic
cur
ves.

I
mpl
i
citCu
rves
I
mplici
tcur
ver epresentat
ion
sdefin
et hesetofpoi
nt
sonac u r
vebyemployi
nga
proc
eduretha
tc ant esttos eei
fapointi
nonthecurve.Us
ual
ly,ani
mpl
i
citcur
vei
s
defi
nedbyanimpli
citfu
n c
ti
onofthefor
m−

f
(x,
y)=0

I
tcanrepr
esen
tmu l
ti
val
uedcu
rves(mult
ipl
eyva l
uesf
ora
nxva
lue)
.A c
ommon
exa
mpl
eistheci
rcl
e,whosei
mpl
i
citr
epr
esenta
ti
oni
s

x2 
+y2 
-R2 
=0

Expl
i
citCu
rves
Ama themati
calfun
cti
ony=f (x)canbeplott
eda sacur
ve.Su
chafu n
cti
onist
heexpli
ci
t
repr
esenta
ti
onoft hecurve.Theexplici
trepres
enta
ti
onisnotgeneral
,si
ncei
tc a
nnot
repr
esentver
ti
c a
lli
nesandisa l
sosin
gle-
valued.
Foreachval
ueofx,onlyasi
ngl
eva l
ue
ofyisnormal
lycompu t
edbyt hefu
n ct
ion
.

Pa
ramet
ri
cCu
rves
Cur
veshavin
gpa ramet
ri
cfor
ma recal
ledpa ra
metri
cc ur
ves
.Theexpli
ci
ta ndimpli
ci
t
cu
rverepresent
ati
onscanbeusedonl
ywh ent h
ef un
cti
onisknown
.Inpr act
ic
et he
par
ametr
iccurvesareus
ed.Atwo-
di
men s
ion
a lpar
ametri
ccur
vehasth
ef ol
lowin
gf or
m

P(
t)=f
(t)
,g(
t)orP(
t)=x(
t)
,y(
t)

Thefun
cti
onsfa n
dgbec
omet he(
x,y)coor
dinat
esofan
ypointonthecur
ve,an
dthe
poi
ntsa
reobta
inedwh
enthepa
rameterti
svari
edoveracer
tai
nin
ter
val[
a,b]
,nor
mal
ly
[0
,1]
.

Be
zie
rCu
rve
s
Bezi
erc ur
veisdis
cover
edbyt heFr en
chengineer
 PierreBézi
er.Thesecurvesc anbe
gener
a t
edundert
hecontr
olofotherpoi
nts
.Approxi
ma tetangen
tsbyu s
ingcontrolpoi
nt
s
areusedtogener
atecur
ve.TheBezierc
urvecanber epresen
tedma t
hema t
ic
a l
lyas−
∑k=0nPi
Bni
(t)
∑k=0
nPi
Bi
n(
t)

Wh
er pi
e   
pii
sth
esetofpoi
nt
san
d Bni
(t)
Bi
n(

)r
epr
esen
tst
heBer
nst
einpol
ynomi
al
swh
ich
a
reg
ivenby−
Bni
(t)
=(n
i)
(1
−t)
n t
−iBi
i n
(t)
=(n
i)
(1
−t)
n−i
ti

Wh
ere 
n i
sth
epol
ynomi
aldeg
ree,
 

ist
hei
ndex,
and 

ist
heva
ria
ble.

Th
esi
mpl
estBéz
ierc
urvei
sth
est
rai
ghtl
i
nef
rom t
hepoi
nt
 P0P0 
t P1
o  .A qu
P1 adr
ati
c
Bezi
erc
urveisdet
ermi
nedbyt
hreec
ont
rolpoi
nt
s.Ac
ubi
cBez
ierc
urvei
sdet
ermi
nedby
fou
rcont
rolpoi
nt
s.

Pr
ope
rti
eso
fBe
zie
rCu
rve
s
Bez
ierc
urvesh
avet
hef
oll
owi
ngpr
oper
ti
es−

 Th
eyg
ener
all
yfol
lowt
hes
hapeoft
hec
ont
rolpol
ygon
,wh
ichc
ons
ist
soft
hes
egmen
tsj
oi
ni
ng
t
hec
ont
rolpoi
nt
s.

 Th
eya
lwa
yspa
sst
hrou
ght
hef
ir
sta
ndl
astc
ont
rol
poi
nt
s.

 Th
eya
rec
ont
ai
nedi
nth
econ
vexh
ulloft
hei
rdef
ini
ngc
ont
rol
poi
nt
s.

 Th
edeg
reeoft
hepol
ynomi
aldef
ini
ngt
hec
urves
egmen
tison
eles
sth
att
hen
umberof
def
ini
ngpol
ygonpoi
nt
.Th
eref
ore,f
or4c
ont
rolpoi
nt
s,t
hedeg
reeoft
hepol
ynomi
ali
s3,i
.
e.
c
ubi
cpol
ynomi
al
.

 ABezi
erc
urveg
ener
all
yfol
l
owst
hes
hapeoft
hedef
ini
ngpol
ygon
.

 Th
edi
rec
ti
onoft
het
ang
entvec
tora
tth
een
dpoi
nt
siss
amea
sth
atoft
hevec
tordet
ermi
ned
byf
ir
sta
ndl
asts
egmen
ts.

 Th
econ
vexh
ullpr
oper
tyf
oraBez
ierc
urveen
sur
est
hatt
hepol
ynomi
als
moot
hlyf
oll
owst
he
c
ont
rolpoi
nt
s.

 Nos
tra
igh
tli
nei
nt
ers
ect
saBez
ierc
urvemor
eti
mest
hani
ti
nt
ers
ect
sit
scon
trolpol
ygon
.

 Th
eya
rei
nva
ria
ntu
ndera
naf
fi
net
ran
sfor
mat
ion
.
 Bezi
erc
urvesexh
ibi
tgl
oba
lcon
trolmea
nsmovi
ngac
ont
rolpoi
nta
lter
sth
esh
apeoft
he
wh
olec
urve.

 Ag
ivenBez
ierc
urvec
anbes
ubdi
vi
deda
tapoi
ntt
=t0i
nt
otwoBez
iers
egmen
tswh
ichj
oi
n
t
oget
hera
tth
epoi
ntc
orr
espon
din
gtot
hepa
ramet
erva
luet
=t0
.

B-
Spl
i
neCu
rve
s
Th
eBez
ier
-cu
rvepr
odu
cedbyt
heBer
nst
einba
sisf
unc
ti
onh
asl
i
mit
edf
lexi
bi
li
ty.

 Fi
rs
t,t
hen
umberofs
pec
ifi
edpol
ygonver
ti
cesf
ixest
heor
deroft
her
esu
lti
ngpol
ynomi
al
wh
ichdef
inest
hec
urve.

 Th
esec
ondl
i
mit
in
gch
ara
cter
is
ti
cist
hatt
heva
lueoft
hebl
endi
ngf
unc
ti
oni
snon
zer
ofora
ll
pa
ramet
erva
luesovert
heen
ti
rec
urve.

TheB-s
pli
neba
sisc
ont
ai
nst
heBer
nst
einba
sisa
sth
espec
ialc
ase.
TheB-
spl
i
neba
sisi
s
non
-gl
obal
.

AB-spl
in
ec urveisdefi
nedasali
n earcombi
nat
ionofc
ontr
olpoi
nt
sPi andB-
spl
i
neba
sis
fu
ncti
onNi
  Ni
,  
k(
, t)g
ivenby
C(t)
=∑ni Pi
=0 Nik(
, t)
,C(
t)
=∑i
=0nPi
Ni
,k(t

,n≥k−1
,
n≥k−1t[
 
, tk−1
,tn
+1]
tϵ[
tk−1
,
tn+1
]
Wh
ere,

pi
 { pi
:i
=0,
1,2….
n}a
ret
hec
ont
rol
poi
nt
s
 ki
sth
eor
deroft
hepol
ynomi
als
egmen
tsoft
heB-
spl
i
nec
urve.
Orderkmea
nst
hatt
hec
urve
i
sma
deu
pofpi
ecewi
sepol
ynomi
als
egmen
tsofdeg
reek-1
,

 t
h Ni
e  k(
, t
)Ni
,
k(t

aret
he“
nor
mal
i
zedB-
spl
i
nebl
endi
ngf
unc
ti
ons
”.Th
eya
redes
cri
bedbyt
he
or
derka
ndbyan
on-
dec
rea
sin
gsequ
enc
eofr
ealn
umber
snor
mal
lyc
all
edt
he“
knot
s
equ
enc
e”.
t
:
ii
=0,
.
.
.n+Kt
i:
i
=0,
.
.
.n+K

Th
eNi,
kfu
nct
ion
sar
edes
cri
beda
sfol
lows−
Ni
,
1(t
)={
1,
0,
if
u[t
i
,t
i )
+1Ot
her
wis
eNi
,
1(
t)
={1
,
if
u[t
i,
ti
+1)
0,
Oth
erwi
se

a
ndi
fk>1
,
Ni
k(
, t
)=t
−tt
ii Ni
+k−1 , (
k−1t)
+t+k−
i t
t+k−
i t
i Ni
+1 +1
, (
k−1t)
Ni
,k(
t)
=t−t
it
i+k−1
Ni,
k−1
(t
)+t
i+k−t
ti
+k−t
i+1
Ni
+1
,
k−1
(t
)

a
nd
t[
t ,
k−1t
n )
+1t[
tk−1
,
tn+1
)

Pr
ope
rti
eso
fB-
spl
i
neCu
rve
B-
spl
i
nec
urvesh
avet
hef
oll
owi
ngpr
oper
ti
es−
 Th
esu
moft
heB-
spl
i
neba
sisf
unc
ti
onsf
ora
nypa
ramet
erva
luei
s1.

 Eac
hba
sisf
unc
ti
oni
spos
it
iveorz
erof
ora
llpa
ramet
erva
lues
.

 Eac
hba
sisf
unc
ti
onh
aspr
eci
sel
yon
ema
ximu
mva
lue,
exc
eptf
ork=1
.

 Th
ema
ximu
mor
deroft
hec
urvei
sequ
alt
oth
enu
mberofver
ti
cesofdef
ini
ngpol
ygon
.

 Th
edeg
reeofB-
spl
i
nepol
ynomi
ali
sin
depen
den
tont
hen
umberofver
ti
cesofdef
ini
ng
pol
ygon
.

 B-
spl
i
nea
ll
owst
hel
oca
lcon
trolovert
hec
urves
urf
acebec
aus
eea
chver
texa
ffec
tst
he
s
hapeofac
urveon
lyoverar
ang
eofpa
ramet
erva
lueswh
erei
tsa
ssoc
iat
edba
sisf
unc
ti
oni
s
n
onz
ero.

 Th
ecu
rveexh
ibi
tst
heva
ria
ti
ondi
min
ish
ingpr
oper
ty.

 Th
ecu
rveg
ener
all
yfol
lowst
hes
hapeofdef
ini
ngpol
ygon
.

 An
yaf
fi
net
ran
sfor
mat
i
onc
anbea
ppl
i
edt
oth
ecu
rvebya
ppl
yi
ngi
ttot
hever
ti
cesofdef
ini
ng
pol
ygon
.

 Th
ecu
rvel
i
newi
th
int
hec
onvexh
ull
ofi
tsdef
ini
ngpol
ygon
.

AFrench
/America
nma t
hema
ti
cia
nDrBenoi
tMandel
brotdi
scover
edFr
act
als
.Th
ewor
d
f
rac
talwasder
ivedfr
omaLati
nwor f
d r
act
us 
whi
chmea nsbr
oken.

Wh
ata
reFr
act
al
s?
Fr
actal
sareverycomplexpict
uresgen
eratedbyac omput
erfromas i
nglefor
mu l
a.Th ey
ar
ec r
eatedusi
ngiter
ati
ons.Thi
smea nson efor
mu l
aisrepea
t edwi
ths l
ight
lydif
ferent
val
uesoverandoveragai
n,ta
kingi
nt
oa cc
ou ntt
heresul
tsfr
omt hepr
eviousit
era
ti
on .

Fr
act
alsa
reu
sedi
nma
nya
rea
ssu
cha
s−
 As
tronomy 
−Fora
nal
yzi
ngg
ala
xies
,ri
ngsofSa
tur
n,et
c.

 Bi
ol
ogy/
Chemi
st
ry 
− Fordepi
ct
in
gba
cter
iac
ult
ures
,Ch
emi
calr
eac
ti
ons
,hu
mana
nat
omy,
mol
ecu
les
,pl
ant
s,

 Ot
her
s −Fordepi
ct
in
gcl
ouds
,coa
stl
i
nea
ndbor
der
li
nes
,da
tac
ompr
ess
ion
,di
ff
usi
on,
econ
omy,
f
rac
tala
rt,
fra
cta
lmu
sic
,la
nds
capes
,spec
ialef
fec
t,et
c.

Ge
ner
ati
ono
fFr
act
al
s
Frac
talscanbeg enerat
edbyr epeat
in
gthesames hapeoverandoveragai
nasshownin
th
ef ol
lowingfi
gure.I
nf i
gure(a)sh
owsa nequil
ater
altr
ian
gle.I
nfi
gure(b)
,weca nsee
th
atthet ri
ang
leisrepeatedtocrea
teas t
ar-
li
kesh a
pe.I
nfigur
e(c)
,wec anseet
hatthe
st
ars h
a pei
nfigu
re(b)isrepeat
edagaina
ndag a
intocrea
tean ewshape.

Wecandoun
li
mit
edn
umberofi
ter
a t
iont
ocr
eat
eades
ir
eds
hape.
Inpr
ogr
ammi
ngt
erms
,
r
ecu
rsi
oni
susedt
ocr
eat
esuchshapes.

Ge
ome
tri
cFr
act
al
s
Geomet
ri
cfra
cta
lsdea
lwithsha
pesfoun
dinn a
tureth
ath a
ven on
-i
nt
egerorfr
act
al
di
mensi
ons
.Togeomet
ri
cal
lyc
onstr
uctadet
ermi
nis
ti
c(non
random)sel
f-
si
mil
arf
ract
al,
west
artwit
hagiveng
eometri
csh
ape,call
edthe 
i
nit
iat
or.Su
bpa
rtsoft
hei
ni
ti
at
ora
re
t
henr
epla
cedwi
thapat
ter
n,c
all
edthe 
gener
ator
.

Asa nexample,i
fweu setheini
ti
atorandgener
atorshownintheabovefi
gur
e,wec a
n
const
ructgoodpa t
ternbyr epeati
ngit.Eachstr
aig
ht-l
i
nes egmenti
nthei n
it
ia
toris
repl
acedwithfou
requ a
l-l
engt
hlin
es egmentsateachstep.Thesca
li
ngfa
ctori
s1/3,s
o
t
h efr
actal
dimensi
onisD=l n4/l
n3≈1 .
2619.

Al
so,t
hel
engt
hofeachl
inesegmenti
nthei
ni
ti
at
ori
ncreasesbyafa
ctorof4/3atea
ch
st
ep,s
oth
atth
elengt
hofthefr
act
alcur
veten
dstoi
nfi
nit
ya smor
edetai
li
saddedtot
he
cur
veass
hownint
hefol
l
owingfi
gur
e−

You might also like