# Linear Splines and Pokemons

Splines are mathematical functions used for interpolations (connecting points) in the plane.

If we want to connect the points by smooth curves, we can use cubic splines, which are polynomial functions of degree 3. This will calculate a sequence of functions that connect the points defined by polynomials of degree 3 so that the intersection at the points does not form spikes.

But if we want to connect the points by straight line segments, the process is much simpler, we can use linear splines, which are nothing more than linear functions defined starting from one point and ending at the other.

However my history with linear splines and Pokemons started a little before I got to know the concept of splines. It was early 2012 when I was working for the second semester at PIBID (Institutional Program for Teaching Initiation Scholarships) in Mathematics, I was researching about connecting the dots games and thinking about how I could insert mathematics in these structures.

The initial idea was to tinker with the numerical sequence that we should follow to connect the dots, but even if it was an unusual arithmetic progression, figuring out the next dot was always very simple. Then I realized something more “fun” than connecting dots on the plane…finding dots on the plane!

The idea was still simple, but a little laborious to be carried out, after all, we would have available a list of coordinates (x, y) referring to the horizontal and vertical position in the plane to locate. At this point, the need for a “purpose” arose at the end of all the effort. Hence the incentive to “draw a Pokemon” from the union of points found in the plan.

Finding the points on the plane that best matched the original Pokemons drawings was a very rudimentary process, basically I printed a checkered mesh over the image of the Pokemons and with a pen I would mark points on the mesh so as to preserve the contours of the mesh as much as possible. original form. After that, I identified the positions of these points and assembled the list of coordinates.

This was one of the most replicated activities in the period I worked at PIBID (2011 – 2015), not only for me, but for many colleagues, as we could easily distribute sheets and pencils to any number of students, for them to solve in their own times and in order to draw the Pokemons that chose among the initial options. In the end, the drawings stayed with the students, which was an extra motivation for carrying out the activity.

The story already seems cool by itself, but it has a sequel… because in 2015 I was taking the last undergraduate course that I needed to graduate (I was taking Numerical Calculus II for the 3rd time). Amidst a lot of struggle, I was trying to pass, but there was very little to go, I went to the teacher’s room to talk, in an attempt to convince him that any of the five tests had an exercise that, if considered half right, would give 0.2 on the average. missing to pass. It was a long conversation, a lot of discussion, until he asked about the subject’s work.

The course work involved programming in Octave, linear and cubic splines (and also writing reports about it). While I was programming (or rather, racking my brain to program) I arrived at the end of work, everything ready and perfect to deliver… then I realized that I would give time to do something a little “special”. I took the coordinates I already had ready from the activity of drawing Pokemons and implemented them in the report, making the linear and cubic splines on top of these coordinates. The work got a maximum score, which was 1.5 on average, which was already quite difficult to obtain.

But amidst the discussion with the teacher, he highly praised the work, especially for having performed the splines with the Pokemons coordinates, so he agreed to consider an exercise in one of the tests as half-right, which gave the missing point to graduate 😀

This is still one of my favorite activities today, as it allows us to discuss many interesting concepts, from splines, to the idea of plane transformations, for example, if we invert the horizontal coordinate with the vertical, what happens to drawing?

I highly recommend to anyone who wants to try to draw their Pokemons by locating the points on the plane, it’s a relaxing and satisfying experience, you’ll see the drawing forming and you know you did it for your own abilities (mathematics in this case).

The coordinates and some more instructions to help in this process can be found at the following link: