Introduction to 3D graphics through Excel

. The article presents a method of explaining the principles of 3D graphics through making a revolvable and sizable orthographic parallel projection of cuboid in Excel. No programming is used. The method was tried in fourteen 90 minute lessons with 181 participants, which were Informatics teachers, undergraduates of Applied Informatics and gymnasium (grammar school) students. Questionnaire surveys were conducted. The results are being discussed.


Introduction
Virtual reality technology applies to environments that can simulate physical presence in the real as well as imaginary worlds.The technology is used in computer games, simulators, documentary and animated films, etc., and also in educational software ("Cabri 3D",n. d.) to develop spatial skills (Shah and Miyake, 2005).3D computer graphics constitutes the basics of virtual reality.Traditionally, virtual reality environments are developed by using programming.However, the equations that govern the transformation from 3D to 2D can easily be evaluated in spreadsheets (Benacka, 2008(Benacka, , 2012)).Creating a revolvable and sizeable projection of a 3D figure in Excel can be an interesting introduction to 3D graphics without any need for programming.
This article presents a method of explaining the principles of 3D graphics through making revolvable and sizable projections of cuboid in ExcelTM.The orthographic parallel projection is used.The principles and the transformation equations are explained in section 2. In section 3, the Excel application is developed.In section 4, a sample 90 minute lesson is given in which the teaching strategy of scaffolding is applied.Scaffolding can be specified as high challenge and high support teaching where the teacher sets up tasks that challenge students to perform beyond their current capacity and provides them with carefully structured support to reach the goal (Wood, Brunet and Ross, 1976;Hogan and Pressley, 1997;Gibbons, 2009;an overview is in Ferreira and Lacerda dos Santos, 2009).The lesson, aids, activities, timing and pacing, and the anticipated problems must be carefully planned.The key point is to prepare a learner centred lesson with conceptbased pedagogical approach (Hadjerrouit, 2008(Hadjerrouit, , 2009)).The author has taught 14 such lessons to three groups of participants: (1) 95 in-service and 11 pre-service informatics teachers in Informatics Didactics, (2) 41 undergraduates of Applied Informatics in Introduction to Modelling and Simulation, (3) 34 gymnasium (grammar school) students in informatics lessons.The participants were given questionnaires to find out if the lessons were interesting and if the teaching was effective.The questionnaires and the results are in sections 5 and 6.The method presented can be easily adapted to depicting 3D scenes within science (Tambade, 2011) and mathematics (Benacka, 2011a(Benacka, , 2011b)).

Orthographic parallel projection
Let 0xyz be an orthonormal right-handed coordinate system.Let ρ be a plane defined in the 0xyz coordinate system.Let n be the normal vector to the plane.Let vector n be given by angles ϕ and θ according to Fig. 1.If θ = 0 and ϕ = 0, then plane ρ is parallel to coordinate plane yz and vector n merges with axis x.Now, let the intersection point of plane ρ and axis x be labelled 0ʹ, the intersection line of plane ρ and plane xy be labelled xʹ, and the intersection line of plane ρ and plane xz be labelled yʹ.Let lines xʹ and yʹ be scaled from point 0ʹ by the unit of axes x and y.Then, the orthonormal coordinate system 0ʹxʹyʹ is defined in plane ρ.Let A(x, y, z) be a point in space.Let a line be parallel to vector n and going through point A. The intersection point Aʹ(xʹ, yʹ) of the line and plane ρ is the orthographic parallel projection of point A onto plane ρ and it holds that (Benacka, 2008) xʹ = -x sin ϕ + y cos ϕ, (1) yʹ = -x sin θ cos ϕ - y sin θ sin ϕ + z cos θ, (2) where -180° ≤ ϕ ≤ 180° and -90° ≤ θ ≤ 90°.The transition is independent of the distance between plane ρ and point 0. Plane ρ is the projection plane and vector n is the projection vector.

Projecting a cuboid in Excel
Let ABCDEFGH be a cuboid of edge lengths a, b and c.Let its centre be at origin 0 of the xyz coordinate system, and faces parallel to the coordinate planes (Fig. 2a).The application that projects the cuboid in Excel is in Fig. 3.The edge lengths are in cells C4:C6.Angles ϕ and θ are in cells C2 and C3 in degrees and converted to radians in cells R2 and R3.The x, y, z coordinates of the vertices are calculated in range C10:E17 referring to cell C4:C6, which makes the projection sizable.They are C6/2, -C6/2, -C6/2 for point A. The xʹ and yʹ coordinates of the vertices are calculated in range F10:G17.Each edge is drawn as a two-point xy line graph.There are 12 graphs for 12 edges.If an edge becomes invisible when the real cuboid is rotated, the  user can double-click the edge in the chart and change it to dashed or white to make it invisible.The minimum and maximum of axes xʹ, yʹ are set to -3 and 3 to avoid automatic adjusting when angles ϕ and θ are changed which may result in a deformed projection.
For the first one, the property LinkedCell is R2, Min is 0, Max is 360, SmallChange is 1, and LargeChange is 5. Cell C2 is rewritten by the formula = R2 -180, which makes ϕ go from -180° to 180° by 1° or 5°.For the other scrollbar, LinkedCell is R3, Min is 0, Max is 180, SmallChange is 1, LargeChange is 5. C3 contains the formula = R3 -90.That makes θ go from -90° to 90° by 1° or 5°.The spinbutton next to cell C4 changes edge length a by -0.1 through the following VBA code (not necessary but effective; similarly for spinning a up and for changing lengths b and c)

The lesson
The following teaching aids were used: an A3 size sheet of firm transparent plastic for the projection plane, six pieces of firm wire of 40 cm length for axes x, y, z and projection lines, and a carton cuboid of edge length of about 5 cm, 10 cm and 15 cm, perforated in the centres of the faces so that the wires for axes x, y, z could be inserted through it (Fig. 2a).
At the beginning, a house depicted in the orthographic parallel (Benacka, 2008) and central projection (Benacka, 2012) was shown to the student.The main difference was pointed out, which is how the lines that are parallel in reality are depicted.In the central projection, they are intersecting in the distance, which is the way how humans see the world, and that is why central projection is used in advertisements, games, and films.In the parallel projection, the parallel lines are depicted as parallels, and that is why it is used in STEM (science, technology, engineering and mathematics) disciplines.
The principles of the projections were shown.The transparent sheet was placed in front of the cuboid, and lines imitated by pieces of wire were lead through the cuboid vertices to the sheet so that, for the central projection, they were intersecting at a point -the projection centre, and, for the parallel projection, they were parallel.The intersection points of the lines and the sheet were marked with a felt-tip and joined properly, which gave the projection of the cuboid.It was pointed out that the simplest projection is the orthographic parallel projection in which the projection lines are perpendicular to the projection plane.The application in Fig. 3 was shown and said to be developed in the lesson.
The principle of "rotating" the cuboid was explained as follows: A model of the 0xyz system was created by using three pieces of wire.Coordinate system 0ʹxʹyʹ was drew onto the plastic sheet so that 0ʹ was in the centre and axes xʹ, yʹ were parallel to the sides.A piece of wire was put perpendicular to the sheet at point 0ʹ for the normal vector, and the system was put in the 0xyz system so that the other end of the wire was at point 0 (Fig. 1).The system was turned into the position ϕ=0 and θ=0.Then, it was turned slowly to the right so that point 0ʹ moved from half axis x + towards y + along a circular arc into the position about ϕ ≈ 30°.Then, the system was turned upwards so that point 0ʹ moved towards half axis z + along a circular arc into the position about θ ≈ 20° (Fig. 1).It was emphasized that: 1) Angles ϕ and θ give the direction of the normal vector and, through it, the orientation of the projection plane in the 0xyz system; 2) The projection is independent of the distance between the projection plane and point 0 because the projecting lines are parallel; 3) Changing ϕ from -180° to 180° and θ from -90° to 90° enables one to move the projection plane around the figure, which seems as if the figure was being rotated.
Then, the cuboid was put in the wire model of the Oxyz system (Fig. 2a).The sheet with the normal vector was put in the position ϕ = 30° and θ = 20° (Fig. 1).A vertex of the cuboid was projected onto the sheet using a piece of wire, and the projection and its xʹ, yʹ coordinates were marked.Angles ϕ and θ were changed a little, which caused the xʹ, yʹ coordinates of the projection to change a bit, from which it was deduced that the transition from (x, y, z) to (xʹ, yʹ) depends on angles ϕ and θ.Equations ( 1) and ( 2) were shown and the parameters were explained.The participants downloaded the sheet depicted in Fig. 4 and created the projection with author's support.The problems were discussed.
It was pointed out after creating the application that the problem of overlapping of the faces is not solved in the application, that is, all edges are depicted, which corresponds to depicting a mesh model of the cuboid, with no faces.If there are faces and ϕ or θ has been changed, then the edge that became invisible in the real cuboid has to be doubleclicked in the chart and changed to dashed or white, and the edge that became visible in the real cuboid has to be changed to full in the chart.As a motivation for further study, the applications in Fig. 5 were shown, in which the problem of overlapping of the faces is resolved, that is, the faces appear or disappear automatically when angles ϕ or θ are being changed.The participants were informed that vectors, and scalar and vector products have to be used.

Survey with teachers and university students
Nine 90 minute lessons were taught to 59 in-service Informatics teachers in a development course, 36 in-service teachers within a 2.5 year retraining program to become Informatics teachers, 11 pre-service Informatics teachers in master level, all in tutorials on The result of the questionnaire is in Table 1.The numbers of the participants in each group are in column Number.The numbers in columns 1-6 give % for the answer "Yes".
It results from the questionnaire that: Just about a half of the participants in each group did understand the principles of 1) projecting before the lesson.That is a surprisingly low number, especially for the in-service informatics teachers and the undergraduates of applied informatics.Apart from one participant, all of those who did not understand the principles of 2) projecting before the lesson learnt them in the lesson, which is 98.5%.That implies that the teaching method was effective and the teaching was successful even if the number represent just student feeling not confirmed with a test.All participants found the lesson interesting.That shows that the topic has been of 3) great interest to them and, thanks to the detailed plan of the lesson and scaffolding used, the teacher was able to keep the participants' attention and interest during the lesson by challenging them, providing them with as much support as necessary, and involving them into the teaching process in the notion of constructionism "learning by doing".Almost all participants would like to continue with solving the problem of overlap-4) ping, and a significant number would like to continue with projecting more complicated figures.That shows that the problem of overlapping has a great potential in developing computational thinking and popularising computer graphics and mathematics as resolving is an example of using secondary vector algebra in practice (Benacka, 2008).

Survey with gymnasium students
Five 90 minute lessons were taught to 34 gymnasium students.The groups are listed in At the end of the lesson, the students were asked for feedback -to mark the option that meets best their opinion of the lesson in the following statements: The lesson was (1:very; 2:quite; 3:little; 4:not) interesting.A) I understood (1:all; 2:majority; 3:minority; 4:nothing) of the principles of the projection.B) I learned (1:very much; 2:quite much; 3: little; 4:no) new in Excel.C) I would like to continue with the cuboid with solved overlapping: 1: yes; 2: no.D) The result of the questionnaire is in Table 2.The numbers in columns A, B, C, D give the average of the answers to questions A, B, C, D. The relative frequencies of the answers for each group are graphed in Fig. 6.There were four answers of 3 and no answers of 4 out of the 102 ones.The relative frequencies of the answers for all groups, which are the main outcomes of the questionnaire, are graphed in Fig. 7.
It holds that: (A) 100% of the students found the lesson interesting (79% very, 21% quite); (B) 50% understood everything, 47% understood the majority and 3% understood little of the principles of the projection; (C) 92% of the students learned much (18% very, 74% quite) new in Excel and 8% learned little; (D) 82% would like to continue with the application with the cuboid with solved overlapping; it is 92% of the students of groups 3a and 3b, who had optional Informatics.The findings accord with those in section 5.

Conclusion
A method of explaining the principles of 3D graphics through making revolvable and sizable orthographic parallel projection of a cuboid in Excel without using programming was presented in this article.The method was demonstrated in a model 90 minute lesson  in which the teaching strategy of scaffolding was applied.Fourteen such lessons were taught and two questionnaire surveys were conducted.The first survey was lead in nine lessons with 106 in-and pre-service teachers and 41 undergraduates of applied informatics.It was found that 100% of the participants found the lesson interesting, 98.5% of those who did not understand the principles of projecting before the lesson learnt them in the lesson, and 95% of the participants would like to continue with the application with the cuboid with solved face overlapping.The second survey was lead in five lessons with 34 gymnasium students.It was found that 100% of the students found the lesson interesting and 82% would like to continue with the application with the cuboid with solved face overlapping; it was 92% of those who had optional Informatics.Relaying on these findings it can be concluded that: The problem of depicting 3D figures on computer screen, including face overlap-1) ping, is of great interest to informatics teachers and informatics students at university as well as gymnasium level and has a big potential in improving and exercising computational thinking.
The combination of the topic, scaffolding, and "learning by doing" resulted in 2) a successful lesson.
Excel is a convenient and suitable tool for computer modelling at secondary level.

3)
Its capability for developing such applications without using programming with giving immediate feedback to changing data, formulas and graphs, which are available on the screen at once, promotes exploration and discovery and enables prompt verifying ideas and concepts.

Fig. 1 .
Fig. 1.Projection plane in the 0xyz coordinate system (a) and the orthographic parallel projection Aʹ(xʹ, yʹ) of point A(x, y, z) in the 0ʹxʹyʹ coordinate system (b).

Fig. 5 .
Fig. 5. Orthographic parallel projection of a cube (a) and a house (b) with solved face overlapping.

Fig. 6 .
Fig. 6.Relative frequency of the answers for each group of the gymnasium students in %.

Fig. 7 .
Fig. 7. Relative frequency of the answers of the gymnasium students in %.

Table 1
Result of the questionnaire for teachers and university students in % for "Yes"

Table 2 .
Groups 2A and 6 are 2 nd year students of class 2A of 4 year gymnasium and 6 th year students of class Sexta of 8 year gymnasium at Gymnasium Parovska in Nitra (age 16-17).Groups 3a and 3b are mixtures of 3 rd year students of 4 year gymnasium and 7 th year students of class Septima of 8 year gymnasium at Gymnasium Parovska in Nitra (age 17-18).Group CMC is a mixture of 3 th and 4 th year students of 4 year gymnasium at Gymnasium in Nove Zamky (age 18-19), members of the Computer modelling club that the author runs at the school.The number of students is in column Number.The type of the gymnasium is in column Gymnasium.C/O means compulsory/optional Informatics.

Table 2
Result of the questionnaire for gymnasium students