//Lens of 29a2, data from Burd 2002

// Length Characteristic
lc=0.1;
lcn=0.4;
lcz=2000000;

//EYE LENS
//anterior surface points
Point(1)={0,		2.04,			0,	lc};
Point(2)={0.25,		2.03491975347626,	0,	lc};
Point(3)={0.5,		2.01892515898577,	0,	lc};
Point(4)={0.75,		1.99156156258277,	0,	lc};
Point(5)={1,		1.95313237322244,	0,	lc};
Point(6)={1.25,		1.90451976066532,	0,	lc};
Point(7)={1.5,		1.84700535338165,	0,	lc};
Point(8)={1.75,		1.78209093645573,	0,	lc};
Point(9)={2,		1.71131914949032,	0,	lc};
Point(10)={2.25,	1.63609418451099,	0,	lc};
Point(11)={2.5,		1.55750248387048,	0,	lc};
Point(12)={2.75,	1.47613343815308,	0,	lc};
Point(13)={3,		1.39190008407900,	0,	lc};
Point(14)={3.25,	1.30385980240874,	0,	lc};
Point(15)={3.5,		1.21003501584743,	0,	lc};
Point(16)={3.75,	1.10723388694925,	0,	lc};
Point(17)={4,		0.99087101602176,	0,	1000};

//Offset Points (middle point of circle)
Point(35)={3.7926, 	0.5119, 		0, 	lc};
Point(36)={4.3136, 	0.5119, 		0, 	lc};

//Position of point A and B (see Burd Paper from 2002 figure 1)
Point(37)={4.02915, 	0.97616,		0,	lc};
Point(38)={4.2087, 	0.198341,		0,	lc};

//ZONULAR FIBRES
//Points of zonular attachments
Point(45)={3.9229,	1.02854109474898,	0,	1000};
Point(46)={6.474,	0.5119,			0,	1000};
Point(47)={3.9229,	-0.141311647,		0,	1000};

//posterior surface points
Point(18)={0,		-2.09,			0,	lc};
Point(19)={0.25,	-2.083131926,		0,	lc};
Point(20)={0.5,		-2.0595012,		0,	lc};
Point(21)={0.75,	-2.016307025,		0,	lc};
Point(22)={1,		-1.952715118,		0,	lc};
Point(23)={1.25,	-1.869417609,		0,	lc};
Point(24)={1.5,		-1.768192929,		0,	lc};
Point(25)={1.75,	-1.651465706,		0,	lc};
Point(26)={2,		-1.521866654,		0,	lc};
Point(27)={2.25,	-1.381792466,		0,	lc};
Point(28)={2.5,		-1.232965707,		0,	lc};
Point(29)={2.75,	-1.075994704,		0,	lc};
Point(30)={3,		-0.909933441,		0,	lc};
Point(31)={3.25,	-0.73184145,		0,	lc};
Point(32)={3.5,		-0.536343703,		0,	lc};
Point(33)={3.75,	-0.315190504,		0,	lc};
Point(34)={4,		-0.05681738,		0,	lc};

//Nucleus points
Point(39)={0,		0,			0,	lcn};
Point(40)={2.85,	0,			0,	lcn};
Point(41)={0,		1.32,			0,	lcn};
Point(42)={0,		-1.36,			0,	lcn};

//Middle of the nucleus circles
Point(43)={0,		-2.41674545,		0,	lcn};
Point(44)={0,		2.306213235,		0,	lcn};

//Outline of the lens
BSpline(1) = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 45, 17, 37};
BSpline(2) = {18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 47, 34, 38};
Circle(3) = {37, 35, 36};
Circle(4) = {36, 35, 38};

//Line of Nucleus
Circle(5) = {40, 43, 41};
Circle(6) = {40, 44, 42};

//Axis of rotation of the lens
Line(7) = {1, 41};
Line(8) = {41, 39};
Line(9) = {39, 42};
Line(10) = {42, 18};

//Physical Groups
//Surface of Nucleus as physical surface
Line Loop(11) = {6, -9, -8, -5};
Plane Surface(12) = {11};
Physical Surface(17) = {12};

//Surface of Cortex as physical surface
Line Loop(13) = {2, -4, -3, -1, 7, -5, 6, 10};
Plane Surface(14) = {13};
Physical Surface(16) = {14};

//Capsule as physical line
Physical Line(15) = {2, 4, 3, 1};

/*
//Lines of the zonular fibres
Line(18) = {45, 46};
Line(19) = {47, 46};
Line(20) = {36, 46};

//Zonular fibres as physical lines
//anterior zonular fibre
Physical Line(21) = {18};

//center zonular fibres
Physical Line(22) = {20};

//posterior zonular fibres
Physical Line(23) = {19};
*/