slide-iscms-2
DESCRIPTION
Model and Visualization of Ray Tracing using JavaScript and HTML5 for TIR Measurement System Equipped with Equilateral Right Angle PrismTRANSCRIPT
Model and Visualization of Ray Tracing using
JavaScript and HTML5 for TIR Measurement System
Equipped with Equilateral Right Angle Prism
ISCSM-2, FMIPA, ITB Bandung, 11-12 Oktober 2013 1
Equipped with Equilateral Right Angle Prism
Sparisoma Viridi* and Hendro+
KK Fisika Nuklir dan Biofisika, KK Fisika Teoretik Energi Tinggi dan Instrumentasi
Institut Teknologi Bandung, Jalan Ganesha 10, Bandung 40132, Indonesia
*[email protected], [email protected]
.
Outline
• Problem of using prism (TIR, ATR)
• Theory
• Visualization tools
• Results
ISCSM-2, FMIPA, ITB Bandung, 11-12 Oktober 2013 2
• Results
• Conclusion
Problem of using prism (TIR, ATR)
• Angle of deviated ray can not be determined
easily as function of incident angle.
• Sometimes the ray is not reflected from the
part of sample but beyond it, e.g. sample is
ISCSM-2, FMIPA, ITB Bandung, 11-12 Oktober 2013 3
part of sample but beyond it, e.g. sample is
too small, but scanning angle range is too
wide.
• A visualization from a model is needed.
Theory
• Snell’s law of refraction
i
f
f
i
n
n=
θ
θ
sin
sin
• Snell’s law of reflection
ISCSM-2, FMIPA, ITB Bandung, 11-12 Oktober 2013 4
if nθsin
fi θθ =
Theory (cont.)
• Linear equation
12
12
1
1
xx
yy
xx
yy
−
−=
−
−
ISCSM-2, FMIPA, ITB Bandung, 11-12 Oktober 2013 5
121 xxxx −−
Theory (cont.)
• ERAP (equilateral right angle prism)
y
(xPN, yPN)
ISCSM-2, FMIPA, ITB Bandung, 11-12 Oktober 2013 6
x
(xPS, yPS)
(xPE, yPE)
to
Theory (cont.)
• Line between two
adjacent points is
obtained using linear
equation
ySS(x)
y (x)
(yS, xS)
(y0, x0)
(y1, x1) equation
• Successive line after a
point is obtained using
Snell’s law of refraction
and reflection
ISCSM-2, FMIPA, ITB Bandung, 11-12 Oktober 2013 7
yS1(x)
yS2(x)
yS3(x)
(y1, x1)
(y2, x2)
Visualization tools
• HTML5: a markup language that can be
viewed easily nowadays, even with your
gadged.
• JavaScript: a script / programming language • JavaScript: a script / programming language
embedded in HTML.
• CSS: a style to enhance layout and user
friendly view.
• Software: plain text editor & internet browser
ISCSM-2, FMIPA, ITB Bandung, 11-12 Oktober 2013 8
Visualization tools (cont.)
• Internet browser:
Google Chrome
(recommended)URI http://www.filehippo.com/download_google_chrome/ [20130926]
• Plain text editor:
Notepad++
(recommended)
• Why? They are free and open source.ISCSM-2, FMIPA, ITB Bandung, 11-12 Oktober 2013 9
URI http://www.filehippo.com/download_google_chrome/ [20130926]
URI http://notepad-plus-plus.org/download/v6.4.5.html [20130926]
Results
• http://portal2.fi.itb.ac.id/viridi/atr.html
ISCSM-2, FMIPA, ITB Bandung, 11-12 Oktober 2013 10
Results (cont.)
ISCSM-2, FMIPA, ITB Bandung, 11-12 Oktober 2013 11
Results (cont.)
ISCSM-2, FMIPA, ITB Bandung, 11-12 Oktober 2013 12
Results (cont.)
θD = -0.609 θS - 17.58R² = 0.998
-40
-30
-20
(θS - θD) = 1.609 θS + 17.58R² = 0.999
100
120
140
160
180
θD
ISCSM-2, FMIPA, ITB Bandung, 11-12 Oktober 2013 13
-70
-60
-50
0 20 40 60 80 100
θD
θS
0
20
40
60
80
100
0 20 40 60 80 100
θS
-θ
θS
Results (cont.)
θD' = 1.639 θD + 28.74
R² = 0.998
-40
-30
-20
-10
0
y1 = 7E-05 θS3
- 0.006 θS2
+ 0.273 θS
- 5.092
R² = 0.9957.0
11.0
15.0
ISCSM-2, FMIPA, ITB Bandung, 11-12 Oktober 2013 14
-90
-80
-70
-60
-50
-40
-70 -60 -50 -40 -30 -20
θD'
θD
R² = 0.995
-5.0
-1.0
3.0
0 20 40 60 80 100
y1
θS
Conclusion
• Relations between , , , and are
not simply in general linear.
• Visualization can be used to optimize the
experiment, e.g. help preparation of sample,
Sθ Dθ Dθ ′ 1y
experiment, e.g. help preparation of sample,
design range of scanning angle, etc.
ISCSM-2, FMIPA, ITB Bandung, 11-12 Oktober 2013 15
Thank you
ISCSM-2, FMIPA, ITB Bandung, 11-12 Oktober 2013 16
Thank you