Translator Disclaimer
Open Access Paper
17 July 2014 A teaching resource using the GUIDE environment: simplified model of the eye for secondary school students
Author Affiliations +
Proceedings Volume 9289, 12th Education and Training in Optics and Photonics Conference; 928920 (2014)
Event: 12th Education and Training in Optics and Photonics Conference, 2013, Porto, Portugal
Nowadays, new technologies have great influence on our lives and how we access to the information. The new generations have never known a world without them and make use of these new technologies in practically all facets of their day-to-day. Education systems have also evolved rapidly and frequently make use of learning strategies based on interactive tools. In this work we have created a graphical user interface with GUIDE, a development environment of MATLAB, to show, in a simple way, how the eye works. This interactive program is addressed to the first courses of secondary education and designed to introduce them to the basic concepts of the normal refractive condition of the eye and the most common refractive errors, as myopia and hyperopia. The graphic interface makes use of the simplified model of the eye, where the optic system of the visual organ is represented by a converging lens (cornea and crystalline) and a screen (retina). Emmetropic, myopic and hyperopic eye operation is shown graphically to the students, as well as how these focusing errors can be solved with a diverging and converging lens, respectively. This teaching tool was used this academic course in the Colegio Hogar de Santa Margarita (A Coruña) for a better understanding of the students in this matter and to catch their attention to the world of Optics and its importance.



The evolution of new technologies has a very important impact on society and on our daily lives. The education world has greatly evolved in last years and very often makes use of the tools provided by these new technologies in order to improve the active learning of the students. Motivation is essential for an effective learning so that students will obtain better academic results whether they are motivated and enthusiastic about the topic they are studying. In this work we propose the use of the MATLAB mathematical software to design graphical user interfaces (GUIs) to promote students participation during the classes. The MATLAB GUIDE environment provides user-friendly interfaces, is extraordinarily versatile and is increasingly used in undergraduate education1-3. Those applications designed using MATLAB GUIDE4 are very simple to handle and its use can also be extended to secondary education. In particular, we present a graphical user interface that simulates the basis of eye operation and its more common focusing errors, addressed to secondary school students. This tool has been developed this academic year as a result of the collaboration between the Microoptics and GRIN Optics group of the University of Santiago de Compostela and secondary teachers of the Colegio Hogar de Santa Margarita located in A Coruna. This GUI has been used in the classroom and the valuation as much for students as for teachers has been very positive. Besides, the exam results of those students that used the GUI proposed in this work have significantly improved in relation to the previous academic year.



We present here a graphical user interface created to explain to 2°ESO (compulsory secondary education) students the basis of human eye operation and its most common refractive errors, namely myopia and hyperopia, and how the use of corrective lenses can mend this focusing problems. Graphical user interfaces can be designed using the MATLAB GUIDE environment in a simple way. A MATLAB GUI permits us to perform tasks interactively through the GUIDE Layout Editor. With this editor we can populate a GUI with different components, namely buttons, sliders, text fields and axes, among others4. These GUIs are also very interesting in the education world given that it is possible to create a standalone executable file from an existing MATLAB GUI, so you can design personalized interfaces for others to use, even without the need for a MATLAB license.

The main window of the tool is shown in Figure 1. When the user starts the interface can see three ray diagrams corresponding to emmetropic, myopic and hyperopic eyes, respectively. Pupils to whom this tool is addressed study a simplified model of the eye, where the optic system of the visual organ is represented by a converging lens (cornea and crystalline) and a screen (retina)5. This is what they can see first in Figure 1, where a set of parallel rays (blue color) converge sharply to a point in the retina, represented by a vertical line, after they pass through the cornea and the crystalline, both represented by a convex lens. Below, the ray tracings corresponding to a myopic and hyperopic eye are shown and three comparative pictures of how the same image would be seen in each of the three cases case are shown.

Figure 1.

Graphical user interface created with Matlab to explain to 2°ESO students, in a simplified way, the normal refractive condition of the eye and the most common refractive errors.


With this tool the teachers can show to their students that in people with normal vision the light focuses on the retina when the eye is relaxed. However, it focuses in front of the retina when people suffer from myopia, therefore a nearsighted person can clearly see close objects but not distant objects. On the contrary, a person suffering from hyperopia can see far away objects but has difficulty focusing on near by objects, given that in a farsighted eye incoming rays of light reach the retina before they converge forming a sharped image, so the light focuses behind the retina. With this tool is easy to demonstrate students that it is important to distinguish between the concepts of optical image and retinal image, without going into details. An optical image is that formed by the optical system of the eye. This is always a sharp image and can be formed on the retina or not. On the other hand, a retinal image of an object is formed on the retina and can be a blurry image or to be perfectly focused. If the image formed by the optical system of the eye is focused with accuracy on the retina, both optical and retinal images coincide. Otherwise, the retinal image will be a blurry circle.

As shown in Figure 1, unaided, myopic and hyperopic eyes can not focus the incoming lights from an object on the retina. When suitable lenses are added, both vision problems can be solved. Since light is focused in front of the retina in a nearsighted eye, nearsightedness can be corrected using a diverging lens. This fact is shown in Figure 2, where the GUI users can select the option of inserting the corrective lens and the new ray light trajectories are traced (red) superimposed on the image formed by a myopic eye. In the same way, hyperopia can be corrected using a converging lens and the corresponding ray tracing is also depicted in the figure.

Figure 2.

When the option “Wear your glasses” in the interface is selected, students can figure out how myopia and hyperopia are corrected by using a negative and a positive lens, respectively. The teacher can also explain them what happens when ligh rays propagate through these lenses.


In addition to this, users have the option to press the bottom “Ray diagrams”. This button executes a MATLAB code that performs an animated ray tracing through a converging and a diverging lens (Fig. 3(a) and 3(b), respectively). The aim of these two additional windows is not to go deep into the explanation of geometric optics but to allow students to get an overall picture on how is light propagation through positive and negative lenses.

Figure 3.

Graphical user interface for image formation by a converging lens (a) and a diverging lens (b).




The GUI presented in this work was developed during the 2012-2013 academic year, in collaboration with the Colegio Hogar de Santa Margarita, in order to provide secondary school teachers with an interactive tool that could make easier to explain to their students the basis of the eye operation. Teachers observed in former years that students had problems understanding this topic, so we introduce the GUI in the classroom in order to help them to visualize more clearly how vision occurs, which are the most common types of refractive errors and how these errors can be corrected with lenses.

In order to evaluate the student satisfaction with the tool, we asked them to fill in a short survey, using a Likert scale of 1-5 (5 being the highest) and a section where they could add their comments and suggestions to help us to improve the GUI. The bar chart in Figure 4 shows the percentage of respondents to each of the four questions realized to the students. The total number of survey respondents was 52.

Figure 4.

Survey results: evaluation of the GUI by the secondary school students.


A majority of respondents reported as “excellent” (48%) and “very good” (46%) that the interface properly reflected the concepts of the lesson, while the rest of them (6%) reported it as “good”. With respect to the simplicity and ease-of-use of the GUI, a little over half (54%) indicated their agreement as “excellent”, less than a half (37%) did it as “very good” and a minority of the respondents (10%) just gave a mark as “good”. To the question about if, in their opinion, the interface aided them to have a better understanding of the lesson, a majority of the survey respondents marked the options “excellent” (56%) and “very good” (29%), while the rest of the students marked their answer as “good”. Finally, when asked about their general level of satisfaction with this teaching resource, half and a little less than half (42%) of the respondents choose “excellent” and “very good” as response, respectively. A small percentage (4%) reported as either “good” or “fair” their satisfaction with the GUI.

From the above results we can conclude that the vast majority of the students who took part in the consultation appreciate this initiative and place high value on introducing interactive tools like this in the classroom. The main given comments by the students were that the concepts of the lesson were easier to understand with the GUI and that they found it more entertaining that using conventional teaching methods. They propose to employ more interactive tools like this applied to other topics of the subject and underline that they would like to have the option to use it in their own devices.

The application was employed by two teachers in two groups of students of 2°ESO. None of the teachers encounter any difficulties to handle the GUI. To explain to the students how the application works, the teachers took them to a teaching room equipped with an interactive digital board. One of the teachers devoted a previous class to explain, with conventional methods (blackboard and chalks), what the students were going to see in the graphical user interface. The other teacher explained the contents of the lesson using the GUI since the very first moment. In both cases teachers emphasized that the experience resulted to be very positive. Teachers reported that the application greatly facilitated their labour given that, besides having some figures to supplement their explanations (and also save same time because they do not need to draw them in the board), were able to attract their pupils attention by introducing the new technologies in the classroom. In this way, they could dedicate more time to explain the subject contents and take advantage of the higher level of attention obtained from the students.

Approximately fifteen days after they first used the application, the students were examined in the topic “Waves: light and sound“5. The Department of Natural Sciences uses to make a question about the eye operation. For this reason, and to check the effectiveness of the application, teachers asked again the same question as in the academic year 2010–2011. The question was the following: “Define myopia and hyperopia. Justify which lens is more suitable for a nearsighted and a farsighted person.” The score of the question could be among 0 and 1 point. To obtain the maximum score was necessary to explain correctly where the light is focused in a myopic eye (and also for an hyperopic eye), explain, in a conceptual way, that a nearsighted eye has difficulties to see far away objects (in the same way, students should explain that the contrary happens for farsighted eyes) and complete their answer pointing out which kind of lens should wear a myopic and an hyperopic person to have a normal vision. In the following table the exam results corresponding to a group of students of the academic years 2010-2011 and 2012-2013 are collected.

Table 1 shows notable improved results. The number of students that proved to have understood correctly the eye operation (students scoring between 0.75 and 1) has increased from 42% to 77% or, in other words, the percentage has almost duplicated its value. The teachers consulted considered that this improvement could not have happened without using the interface given that, thanks to it, it has been possible to spark the student interest at the same time that an even higher level of commitment of the teachers has been obtained.

Table 1.

Scores obtained by the students in the question related to the eye operation in the academic years 2010-2011 and 2012-2013.

ScoreAcademic year 2010-2011Academic year 2012-2013



In this paper, the design of a graphical user interface for explaining the basis of human eye operation and the most common refractive errors to secondary school students, using a simplified model of the eye, is presented. The interface has been realized with the MATLAB GUIDE environment, which provides user-friendly interfaces. The GUI introduced in this work represents the ray tracing corresponding to emmetropic, myopic and hyperopic eyes as well as a comparative example of how the same image would be seen in each case. The interface gives the option to the users to correct the refractive errors by adding corrective lenses and also displays the ray tracing corresponding to converging and diverging lenses. From the analysis of the results obtained in the exams we can conclude that this teaching tool helped the students to have a better understanding of the topic. Likewise, as can be deduced from the survey, the students are satisfied with this resource and show clear readiness to the incorporation of this kind of tools to the classes. Finally, it has to be emphasized that the teachers become enthusiastic about this GUI and with the obtained results by their students. For this reason, they have demonstrated their interest to continue to collaborate for improving this application and in the development of new interfaces to explain others topics of the matter they are in charge of.


This work has been supported by the Ministerio de Ciencia e Innovación (MAT2010-18519). Authors acknowledge the collaborative efforts of the Colegio Hogar de Santa Margarita (A Coruña, Spain). Besides, Ana I. Gómez-Varela wants to acknowledge the financial support from the FPU (Formatión de Profesorado Universitario) grant (Ministerio de Educación, Cultura y Deporte, Spain).



Frances, J., M. Perez-Molina, Bleda, S., Fernandez, E., Neipp, C. and Belendez, A., “Educational Software for Interference and Optical Diffraction Analysis in Fresnel and Fraunhofer Regions Based on MATLAB GUIs and the FDTD Method,” IEEE Transactions on Education, 55 (1), 118 –125 (2012). Google Scholar


Ali H. Assi, Maitha H. Al Shamisi and Hassan A. N. Hejase, MATLAB GUI Application for Teaching Electronics, Engineering Education and Research Using MATLAB, 2011). Google Scholar


Andreatos, A.S. and Michalareas, G., “Engineering education e-assessment with Matlab; Case study in electronic design,” in Proc. of the 5th WSEAS /IASME Int. Conf. on ENGINEERING EDUCATION (EE‘08), 172 –177 Google Scholar


Marchand, P. and Holland, O. T., Graphics and GUIs with Matlab, Chapman & Hall/CRC(2002). Google Scholar


Handbook, Ciencias da Natureza. BLOQUE I: A MATERIA E A ENERXÍA, Rodeira(2012). Google Scholar
© (2014) COPYRIGHT Society of Photo-Optical Instrumentation Engineers (SPIE). Downloading of the abstract is permitted for personal use only.
A. I. Gómez-Varela, F. Salvado-Vara, and C. Bao-Varela "A teaching resource using the GUIDE environment: simplified model of the eye for secondary school students", Proc. SPIE 9289, 12th Education and Training in Optics and Photonics Conference, 928920 (17 July 2014);


Modeling and simulation of the human eye
Proceedings of SPIE (March 05 2007)
Human retina imaging: anisoplanatism considerations
Proceedings of SPIE (September 01 2005)
Anisoplanatism in human retina imaging
Proceedings of SPIE (August 22 2005)
Refractive power maps of the anterior surface of the cornea...
Proceedings of SPIE (September 07 2010)

Back to Top