-
Notifications
You must be signed in to change notification settings - Fork 0
/
O5.html
186 lines (146 loc) · 6.98 KB
/
O5.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" href="css/calculator.css">
<link rel="stylesheet" type="text/css" href="/WebShop/css/calculator.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/css/bootstrap.min.css">
<script src="https://cdn.bootcss.com/jquery/3.1.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/js/bootstrap.min.js"></script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]},displayAlign: "center"});
</script>
<script async src='https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script>
<script src="https://code.angularjs.org/1.6.9/angular.min.js"></script>
</head>
<body ng-app="main">
<div class="row" id="Diffraction_limited" ng-controller="control_panel">
<div class="col">
<!-- <h1 class="title">Diffraction-limited angular resolution<small><span data-toggle="collapse" data-target="#info_Diffraction_limited" class="glyphicon glyphicon-collapse-down"></span></small></h1>
-->
<div class="banner" data-toggle="collapse" data-target="#info_Diffraction_limited" class="btn btn-default btn-sm">
<div class="banner-content">
<h1 class="title"> <span class="fa fa-chevron-down"></span> Two convex lens imaging</h1><br>
</div>
</div>
</div>
<div class="col">
<div id="info_Diffraction_limited" class="collapse">
<b><p style="text-align:left;">This calculator will help you calculate the relation between object distance and image distance with two convex lens and magnification.</p></b>
<p style="text-align:left;">The formula that will be used is as followed:</p>
<img src="image/O5-resize.png" >
<h4 style="text-align:left;">$V_1$=$\frac{u_1 * f_o}{u_1-f_o}$ $M_1$=$\frac{f_o}{u_1-f_0}$</h3><br>
<p style="text-align:left;"> For L$\lt V_1$,</p>
<h4 style="text-align:left;">$U_2$=$V_1-L$ $M_2$=$\frac{f_e}{f_e+U_2}$</h3>
<h4 style="text-align:left;">$V_2$=$M_2 U_2$ $M$=$M_1 * M_2$ </h3><br>
<p style="text-align:left;">For $V_1 \lt L \lt V_1+f_e$, </p>
<h4 style="text-align:left;">$U_2$=$L-V_1$   $M_2$=$\frac{f_e}{f_e+V_1-L}$</h3>
<h4 style="text-align:left;">$V_2$=$\frac{f_e U_2}{U_2-f_e}$   $M$=$M_1 * M_2$</h3><br>
<p style="text-align:left;">For ($V_1+f_e \lt L \lt V_1+2 f_e$) & ($L \gt V_1+2 f_e$), </p>
<h4 style="text-align:left;">$U_2$=$L-V_1$ $M_2$=$\frac{f_e}{L+V_1-f_e}$</h3>
<h4 style="text-align:left;">$V_2$=$\frac{f_e U_2}{U_2-f_e}$ $M$=$M_1 * M_2$</h3><br>
</b>
</div><br>
<fieldset class="input">
<legend>Input</legend>
<div class="col">
<h5>Object Distance, <b>$U_1$</b>: </h5>
<div class="input-group">
<input type="number" class="form-control" ng-model="u1" ng-change="myFunc()">
<span class="input-group-addon">m</span>
</div>
</div>
<div class="col">
<h5><br>Focal Length of the eyepiece, <b>$f_e$</b>: </h5>
<div class="input-group">
<input type="number" class="form-control" ng-model="fe" ng-change="myFunc()">
<span class="input-group-addon">m</span>
</div>
</div>
<div class="col">
<h5> Distance between the objective lens and the eyepiece, <b>$L$</b>: </span></h5>
<div class="input-group">
<input type="number" class="form-control" ng-model="l" ng-change="myFunc()">
<span class="input-group-addon">m</span>
</div><br>
</div>
<div class="col">
<h5> <br>Focal Length of the obective lens, <b>$f_o$</b>: </span></h5>
<div class="input-group">
<input type="number" class="form-control" ng-model="fo" ng-change="myFunc()">
<span class="input-group-addon">m</span>
</div><br>
</div>
</fieldset><br>
<fieldset class="output">
<legend>Output</legend>
<div class="col">
<h5>Image Distance, <b>$V_2$</b>:</h5>
<div class="input-group">
<input class="form-control" ng-model="v2" readonly/>
<span class="input-group-addon">m</span>
</div><br>
</div>
<div class="col">
<h5>Total Magnification, <b>M</b>:</h5>
<input class="form-control" ng-model="magnification" readonly/>
</div><br>
</fieldset>
</div>
</body>
<script>
angular.module('main', [])
.controller('control_panel', ['$scope', function($scope) {
$scope.myFunc = function() {
$scope.v1=($scope.fo*$scope.u1)/($scope.u1-$scope.fo);
if($scope.l<$scope.v1){
$scope.u2=$scope.v1-$scope.l;
$scope.m1=$scope.fo/($scope.u1-$scope.fo);
$scope.m2=($scope.fe)/($scope.fe+$scope.u2);
$scope.v2=$scope.m2*$scope.u2;
$scope.magnification=$scope.m1*$scope.m2;
};//number 1
if($scope.v1<$scope.l && $scope.l<($scope.v1+$scope.fe)){
$scope.u2=$scope.l-$scope.v1;
$scope.m1=$scope.fo/($scope.u1-$scope.fo);
$scope.m2=($scope.fe)/($scope.fe+$scope.v1-$scope.l);
$scope.v2=($scope.fe*$scope.u2)/($scope.u2-$scope.fe);
$scope.magnification=$scope.m1*$scope.m2;
}; //number 2
if(($scope.v1+$scope.fe)<$scope.l && $scope.l<($scope.v1+(2*$scope.fe))){
$scope.u2=$scope.l-$scope.v1;
$scope.m1=$scope.fo/($scope.u1-$scope.fo);
$scope.m2=($scope.fe)/($scope.l+$scope.v1-$scope.fe);
$scope.v2=($scope.fe*$scope.u2)/($scope.u2-$scope.fe);
$scope.magnification=$scope.m1*$scope.m2;
};//number 3
if($scope.l>($scope.v1+(2*$scope.fe))){
$scope.u2=$scope.l-$scope.v1;
$scope.m1=$scope.fo/($scope.u1-$scope.fo);
$scope.m2=($scope.fe)/($scope.l+$scope.v1-$scope.fe);
$scope.v2=($scope.fe*$scope.u2)/($scope.u2-$scope.fe);
$scope.magnification=$scope.m1*$scope.m2;
};//number 4
};
}]);
</script>
<!---title----->
<style>
fieldset {
background-color: #e6e6e6;
}
</style>
<!--OUTPUT-->
<style>
legend {
font-size: 180%;
border-radius: 10px 10px 0 0;
background-image: linear-gradient(to bottom , lightblue,#03448c 90%);
background-color: #668cff;
color: white;
text-align: center;
}
</style>
</html>