Title: MZ Circle
1MZ Circle
- Bala Muralikrishnan
- Dept of MEES, UNCC
2Minimum Zone Circle
- All data points must be contained within two
concentric circles such that the difference in
radii between them is the smallest
ri R acos(?i)bsin (?i)
Zone 2h
ri R h acos(?i)bsin (?i)
ri R -h acos(?i)bsin (?i)
3MZ circle implementation
- Arbitrarily choose four points.
- Fit a limacon through the points
- r1 Rh acos(?1)bsin (?1)
- r2 R-h acos(?2)bsin (?2)
- r3 Rh acos(?3)bsin (?3)
- r4 R -h acos(?4)bsin (?4)
- Solve for (R,h,a,b)
- If h is negative, the starting assumption of
point one lying - outside the circle is wrong.
4- If no other data point lies furthur radially from
the limacon either outside or inside, we have a
solution - Else, identify the point lying farthest radially
either outside or inside - Replace it by one of the 4 points currently used,
but making sure the alternating rule is obeyed.
5Alternating Rule
- Alternating Rule says that the 4 points that
now lie either on the inner or outer circle
they must alternate I.e, if the 1st lies on the
inner circle, the 2nd must lie on the outer
circle etc
6HINTS
7Minimum Zone circle
- Function R,a,b,h mzcircle(Y)
- Arbitrarily select 4 points to start
- Fit a limacon through the four points
- Set flag 1
- While flag 1
- Find the point that lies farthest away from the
circles - If there is no such point
- Flag 0
- Else
- replace one of the points with the new point
using the alternating rule - fit a limacon through the new points
- End
- End
8functions
- You will need two functions
- Function R,a,b,h Limaconfit(p1,p2,p3,p4,Y,thet
a) - Function p1,p2,p3,p4 alternatingrule(p1,p2,p3,
p4,index,h,deviation)
9Limacon fit function
- function R,a,b,h limaconfit(p1,p2,p3,p4,Y,thet
a) - solve the system of 4 equations in 4 variables
- R h acos(theta(p1)) bsin(theta(p1))
r(p(1)) - R h acos(theta(p2)) bsin(theta(p2))
r(p(2)) - R h acos(theta(p3)) bsin(theta(p3))
r(p(3)) - R - h acos(theta(p4)) bsin(theta(p4))
r(p(4)) - four equations and four unknowns
10Alternating rule
- Function p1,p2,p3,p4 alternatingrule(p1,p2,p3,
p4,index,h,deviation) - Five cases to consider
- If (index lt p1)
- ???
- Elseif (index lt p2)
- ???
- Elseif (index lt p3)
- ???
- Elseif (index lt p4)
- ???
- Else (index gt p4)
- ???
- End
11If (index lt p1) with hgt 0, deviation gt 0
deviation is the distance of index from the
mean circle deviation gt0 or lt0
p1
index
p2
p4
p3
12If (index lt p1), with hgt 0, deviation lt 0
deviation is the distance of index from the
mean circle deviation gt0 or lt0
p1
p2
index
p4
p3
13If (index lt p1) with hlt 0, deviation gt 0
deviation is the distance of index from the
mean circle deviation gt0 or lt0
p2
index
p1
p3
p4
14If (index lt p1) with hlt 0, deviation lt 0
deviation is the distance of index from the
mean circle deviation gt0 or lt0
p1
p2
index
p4
p3
15Alternating rule
- Function p1,p2,p3,p4 alternatingrule(p1,p2,p3,
index,h,deviation) - Five cases to consider
- If (index lt p1)
- If (deviation gt0 hgt0)
- p1 index
- Elseif (deviation gt 0 hlt 0)
- Elseif (deviation lt 0 hgt 0)
- Elseif (deviation lt 0 hlt 0)
- end
- Elseif (index lt p2)
- ???
- Elseif (index lt p3)
- ???
- Elseif (index lt p4)
- ???
- Else (index gt p4)
- End