Piv Ann2
Piv Ann2
Piv Ann2
ANNEX2
BISECTIONMETHOD
Indesigningabisectionprocedureweneedtochooseasuitableparameterandfunctionwhichistobe
solved.ReferringtoFigure9inthemaintext,foragivenpixelonthescreenweknowtheheighthofthe
imageplane,weknow1and2andhencek,k1andk2fromthebudtransformTselected;andweknow
C(x1,y1),O(x2,y2)andWfromthevortexselected.Fromhwecalculateh'.Wethusalsoknowa,b,cande.
ThisleavesuandF(x3,y3)tobefound,andthencem,suchthattheplanespassthroughQ.Therecanbe
severalsolutionsfordifferentvaluesofu,twoforeachvalueofu.Thereasonthesolutionisnotstraight
forwardisthattheequationofthevortexisinvolved,whichcontainsapowerofuandhencewehavea
transcendentalsituation.
NowasuvariesGmovesalongOC,andsinceQisfixedforagivenh,clearlyFmovesalongastraightline
whichistheprojectionofOCfromQontheupperinvariantplane.Wefindtheequationofthislineand
fromitfindafunctionf(m)=0whichweuseforthebisectioni.e.weusemasourparameter. Thiswas
foundtobebetterthanusingu.
Recallingthat
a [ ex 2 u x 1 x 2 ]
x 3=
e [ aeu ]
wehave
e [ ae x 3 ax 2 ]
u= (1)
a x 1 x 2 ex 3
Similarlyfromy3weget
e [ ae y 3 ay 2 ]
u=
a y 1 y 2 ey 3
Eliminatinguandrearranginggivestheequation
x 3 [ ae y 1 y 2 ey 2 ]y 3 [ ae x 1 x 2 ex 2 ]a [ y 2 x 1 y 1 x 2 ]=0
i .e .
Ax 3 By3 C=0
where
A= ae y 1 y 2 ey 2
B= ae x 1 x 2 ex 2
C=a y 2 x 1 y 1 x 2
whichgivesusthelinealongwhichFismovingasuvaries,sinceitisindependentofuandABCare
constants.
Nowfrom(13)inthemaintext
y 1m 2
y 3 mx 3 =
kv
y 1m 2 Ax 3 C
so y 3 = mx 3=
kv B
2
x 1m C
mkv B
giving x 3 = 2
A
m
B
Thuswecanfindx3andy3frommasxisdeterminedbytheselectedpixelonthescreen.
InAnnex1weshowedthat
2
[ 2 2
] 2
m R x 1 x 3 2m x 1 x 3 y 1 y3 R y 1 y 3 =0
2
where
R=W
eu u
u e (3)
Thismayberearrangedas
2
1m 2 R 2= [ m x 1 x 3 y 1 y3 ]
giving
y 3 = y1 m( x1 x 3 ) R 1 + m 2 (4)
Thesignambiguitygivestwosolutionsfory3andhencetwotangentplanesforagivenm,sothebisection
mustbedonetwice.
Thustheprocedureis:
1. Givenm,calculatex3fromtheEquation(2)
2. ThencalculateufromEquation(1)
3. CalculateRfrom(3)
4. Findy3from(4)
5. Calculatexfortheassumedvalueofm,fromx'=mkvy"(c.f.(13)inthemaintext)
6. Returnasthevalueofthebisectionfunctionthedifferencebetweenx'andtheknownvalue
ofx(fromthepixelposition).
Thusvaryingmuntilthedifferenceis(inprinciple)zeroyieldsasolutionformandhencefortheother
parameters. Inparticularitenablesthecoordinateyorthogonaltothescreentobecalculated. Thisis
incorporated in a global search function which seeks all such solutions for the intersections with the
horizontalprofile,andhencefindsthevalueofynearesttotheviewer.
Itisherethatrealproblemsemergeasthereisnobasisforanormalbisectionsothesearchproceduremust
startfromtheaxisandstepoutwards.Ifthestepsaretoosmallproductionofapictureisexcessivelyslow
(allthisisdoneforeachpixel),butontheotherhandifthesteppingfactoristoolargerootsthatareclose
togethermaybemissed.Plottingmagainstthebisectionerroraswemoveoutfromtheaxisgivesatypical
plotshownbelow.
Hereoneorbothofthetworootscouldbemissedbythesearch.Incorporationofananalysisofchangesin
thegradientsolvedcasessuchasthis.Butthefollowinggraphshowsamuchmoreseverecase:
Averysharpspikeoccurswhichwillalmostcertainlybemissedbyasearchalgorithm,andindeedhardly
showsonthegraph!Sometimesthesespikescanbepredictedtheoreticallyandalogicaltestforsuchcases
isincludedinthealgorithm.
Thepointisthatsomeofthepictureshaveblemishes,andtheexplanationliesindifficultiessuchasthis.
Ifthewrongrootisfound(i.e.notnearesttotheviewer)thentheangleofthetangentplanecalculated
appliestoahiddenpartofthesurfaceandhencepresentsashadingdiscontinuity.Althoughtheycouldbe
manuallyeditedoutquiteeasilyandthishasbeendoneforsomepurposestheyareleftinhereasthis
ismoreamathematicalinvestigationthanalovelypictureexercise.Alsothelocationandtypeofblemish
doesconveyinformation.