Exploring the Bezier curves.docx
《Exploring the Bezier curves.docx》由会员分享,可在线阅读,更多相关《Exploring the Bezier curves.docx(16页珍藏版)》请在冰豆网上搜索。
![Exploring the Bezier curves.docx](https://file1.bdocx.com/fileroot1/2023-2/6/d3dfbee9-1b12-462a-bb71-851305949226/d3dfbee9-1b12-462a-bb71-8513059492261.gif)
ExploringtheBeziercurves
ExploringtheBeziercurves
ABeziercurveisaparametriccurvewhichusuallyusedincomputergraphicstomodelsmoothcurvesthatcanbescaledindefinitelyandalsousedinanimationasatooltocontrolmotion.‘Beziercurvesarealsousedinthetimedomain,particularlyinanimationandinterfacedesign,e.g.,BeziercurvescanbeusedtospecifythevelocityovertimeofanobjectsuchasaniconmovingfromAtoB,ratherthansimplymovingatafixednumberofpixelsperstep.Whenanimatorsorinterfacedesignerstalkaboutthe"physics"or"feel"ofanoperation,theymaybereferringtotheparticularBeziercurvesusedtocontrolthevelocityovertimeofthemoveinquestion.’(http:
//en.wikipedia.org/wiki/B%C3%A9zier_curve)Thisinvestigationisaimedtousetheknowledgeofvectorsandparametricequationstoexplorethemathematicsofcomputeraideddesigncurves.
Inthisinvestigation,coordinateaxes,graphs,includingaxesintercepts;vectors,includingvectoraddition,scalarmultiplicationandratiodivision;quadraticandcubicpolynomialswillbeused.First,asimpleexamplewillbeusedtoshowhowtheparametricequationworks.Then,ourknowledgeandcalculatorwillbeusedtoexploremoreaboutBeziercurves.
Tobegintogiveasimpleexplanationabouthowtheparametricequationworks.ThereisalinesegmentstartfrompointA(-3,4)topointB(2,5).Onthislinesegment,thereisapointPmovingfromAtoB.SoPdividedABintheratiotto1-t,and
.Whent=0,PisattheinitialpointA.Whent=1,itisattheendpointB.
t
A
P
B
O
Accordingtothediagram,andusethedivisionformula,wecanfindthat
.BecauseitisaarbitrarypointonAB,soit’sparametricequationofABis
.Showitingraphiccalculatoris
A
B
Then,usethesamemethodandfollowthesamesteptofindanotherlinesegmentBC,whereCis(4,6).
Now,QisthemovingpointonBC.Usethesamemethod,wecanfindthat
.SotheparametricequationofBCis
.Showitingraphiccalculatoris
C
B
A
Inthegraph,bothpointsPandQmovefromtheinitialpointtotheendpoint,andthereisaninvisiblelinesegmentbetweenPandQ.ThelinesegmentcreatedbyPQismovingtoo.AssumethatthereisanotherpointSliesonPQ,andSmovesfromPtoQjustlikePmovesfromAtoBandQmovesfromBtoCwithtchangingfrom0to1.ItmeansthatwhenPstartsatA(-3,4),SalsostartsatA(-3,4),andwhenQarrivesatC(4,-6),SalsoarrivesatC(4,-6).InordertogetthepathofS,previousresultswillbeused.
SinceSalsodividesPQintheratiooftto1-t,
SotheparametricequationforthearcACis
Thenentertheequationonthegraphiccalculation,andgraphthecurve.Wecanget
C
B
A
Fromthegraph,wecanfindthatABandBCarethetangentlinesofarcAC.
Usetheparametricequation,thecoordinatesofthecurvewhereitcutstheaxescanbefound.
Whenx=0:
SoitcutstheY-axesat(0,10/3)
Wheny=0:
SoitcutstheX-axesat(-14/3,0)
NowwearegoingtousetheknowledgewegetpreviouslytodrawapictureofNemo.Thepictureisacombinationofsixarcs.
Thecoordinateofpointsare:
H(-5,1);I(-1,5);J(4,2);K(1,-6);L(-1,-2);M(-2,-4);N(1,-3);R(2,1.5);T(1,-2);V(5,6);W(7,-1);X(4,-2)
R
J
W
V
I
T
X
L
H
M
N
K
Takethedorsalfinintoconsiderationfirst.IthasaninitialpointE(-2,3)andendpointG(2,3).Then,useourruler,wecanfindthesharppointF(3,8).WecanimagethatPisalwaysthepointmovingfrominitialpointtosharppointandQisalwaysmovesfromsharppointtoendpoint.ThenSisalwaysmovesfromPtoQ.
Usingthesamemethodusedabove,theparametricequationofEFandGFcanbefound.Andtherefore,theparametricequationforarcEGcanbefound.
SoEF=
SoFG=
SotheparametricequationofarcEGis
Entertheequationintothecalculatorwillget
G
F
E
Repeattheprocessfortheremainingandgraphallsixarcswiththecalculator.
SotheparametricequationofarcHJis
SotheparametricequationofarcHJ2is
SotheparametricequationofarcLNis
SotheparametricequationofarcTNis
SotheparametricequationofarcVWis
EnterthesesixarcsintocalculatorwillgetapictureofNemo.
Becauseallcurvesabovearepartsofparabolas,theyarecalledparabolicarcs.
Nextstepisgoingtodomoreabouttheparaboliccurves.
GiventhatinitialpointisL(-2,4),sharppointM(0,-4)andendpointN(2,4).
Usethesamemethod:
EnteritintocalculatorandaddthelinesegmentLMandMNcanget:
M
N
L
Fromthegraph,LM,MNbotharethetangentlineofcurveLN.
SoarcLNisapartofparaboliccurve
AnotherparabolicarchasinitialpointU(0,0),sharppointV(0,1)andendpointW(4,2).
EnteritintocalculatorandaddthelinesegmentUVandVWcanget:
W
U
V
LinesegmentsUVandVWaretangentlinesofcurveUW.
Fromtheparametricequation,Cartesianequationcanbefound.
SotheCartesianequationis
Becauseparabolicarcsareallhavethreepoints,sotheparametricequationcanbefoundinaregularway.
AssumethatthereisaparabolicarcwithinitialpointA
sharppointB
andendpointC
.Theparametricequationcanbefound.
Sotheparametricequationis
Thisequationcanbeusedtochecktheworkwehavedone.
ArcAC=
ArcEG=
ArcLN=
ArcUW=
Thisequationalsocanbeusedtofindanewarcwithinitialpoint(-1,5),sharppoint(1,5)andendpoint(3,1).
Soitisapartoftheparabola:
Allofthearcsfoundabovearecalledparabolicarcs.Theyareallcontrolledbythreepoints.Inordertocreateamoreflexiblecurve,anotherpointcanbeaddedtothegraph.Andtheycancreateanon-parabolicarccalledBeziercurve.
FirstarccanbeusedagaintofindaBeziercurve.ThenanotherpointD(6,0)willbeadded.
UsetheequationtofindarcBD:
ArcACis
Thenenterthemintocalculate.
B
D
C
A
AssumethatthereisapointTmovesfromBtoDonarcBDandSfromAtoConarcAC.Astincreasesfrom0to1,linesegmentSTstartsasABwhent=0andfinishesasCDwhent=1.NowassumeagainthatthereisapointZonlinesegmentSTanddividingSTintheratiotto1-t.Thenusethesamemethod,theparametricequationofarcADcanbefound.
SotheparametricequationforarcADis:
C
D
B
A
ThearcADiscalledtheBeziercurvewithinitialpointA,sharppointBandCandendpointD.
Withtheworkdonebefore,thegeneralequationalsocanbedetermined.
LetDbe
Sis
Tis
Sotheparametricequationis:
Inconclusion,ifanarciscontrolledbyaninitialpoint,asharppointandanendpoint,wecallthisarcparabolicarc.Itsequationis
.
Ifthereisafourthpointalsocontrolonearc,thearccanbemoreflexibleandnon-parabolic.ItiscalledBeziercurve.Anditsequationis
Bibliography:
http:
//en.wikipedia.org/wiki/B%C3%A9zier_curve