## Bridges 2017 in Waterloo, Canada!

Bridges 2017 was in full swing last weekend, so now it’s time to share some of the highlights of the conference.  Seems like they keep getting better each year!

The artwork was, as usual, quite spectacular.  I’ll share a few favorites here, but you can go to the Bridges 2017 Gallery to see all the pieces in the exhibitions, along with descriptions by the artists.

My favorite painting was Prime numbers and cylinders by Stephen Campbell.

What is even more amazing than the piece itself is that Stephen makes his own paint!  So each piece involves an incredible amount of work – and the results are worth it.  Visit Stephen’s website to see more of his work and learn a bit more about his artistic process.

I also liked these open tilings of space by Frank Gould.

Although they are simple in design, the overall effect is quite appealing.  I often find that the fewer elements in a piece, the more difficult it is to coax them into interacting in a meaningful way.  It is challenging to be a minimalist.

This lantern, Variations on Colourwave 17 — Mod 2, designed by Eva Knoll, shows a pattern created using modular arithmetic.

The plenary talks this year were almost certainly the best I have ever experienced at any conference.  Opening the conference was a talk by Damian Kulash of the band OK Go.  He described his creative process and gave some insight to how he makes his unbelievable videos.

They really cannot be described in words – one example he talked about was this video filmed in zero gravity in an airplane!  There are no tricks here — just unbridled creativity and cleverness.

Another favorite was the talk by John Edmark.  Many of his ideas had a spiral theme, like the piece you see below.

But what is fascinating about his work is how it moves.  When this structure is folded inward, it actually stretches out.  This is difficult to describe in words, but you can see a video of this phenomenon on John’s website.  What made his talk really interesting is that he discussed the mathematics behind the design of his work.

Stephen Orlando talked about his motion exposure photography.

Although seemingly impossible, this image is just one long-exposure photograph — the colors you see were not added later.  Stephen’s technique is to put programmable LED lights on a paddle and photograph a kayaker paddling across the water.

But where is the kayaker?  Notice the background — it’s almost dark.  It turns out that if the kayaker moves at a fast enough rate, the darkness does not allow enough time for an image of the kayaker to be captured.  Simply amazing.  Visit Stephen’s website for more examples of his motion exposure photographs.

There were also many other interesting talks given by Bridges participants, but there is not enough room to talk about them all.  You can always go to the Bridges 2017 website and download any of the papers you’re interested in reading.

But Bridges is also more than just art and talks.  Bridges participants are truly a community of like-minded people, so social and cultural events are also an important aspect of any Bridges conference.

I shared an AirBnB with Nick and his parents a short walk from campus — the house was spacious and comfortable, and really enhanced the Bridges experience.  Sandy (Nick’s mother) wanted to host a gathering, so I invited several friends and colleagues over the Friday night of the conference for an informal get-together.

It was truly an inspiring evening!  There were about fifteen of us, mostly from around the Bay area.  Everyone was talking about mathematics and art — we were so engrossed, it turns out that no one even remembered to take any pictures!  One recurring topic of discussion was the possibility of having some informal gatherings throughout the year where we could share our current thoughts and ideas.  I think it may be possible to use space at the University of San Francisco — I’ve already begun looking into it.

Lunch each day was always from 12:00–2:00, so there was never any need to rush back.  This left plenty of time for conversation, and often allowed time to admire the art exhibitions.  It seems that you always noticed something new every time you walked through the displays.

On Saturday evening of the conference was a choir concert featuring a cappella voices singing a wide range of pieces spanning from the 15th century to the present day.  It was a very enjoyable performance; you can read more about it here.

The evening of Sunday, July 30th, was the last evening of the conference for us.  Many participants were going to Niagara Falls the next day, but we were all flying out on Monday.  We decided to find a group and go out for dinner — and about a dozen of us ended up at a wonderful place for pizza called Famoso.

We chatted for quite some time, and then split up — some wanted to attend an informal music night/talent show on campus, but others (including me and the Mendlers) went to shoot some pool at a local pool hall.  Again, a good time was had by all.

While the first day of the conference seemed a little slow, the rest just flew by.  Another successful Bridges conference!  Nick and I both had artwork exhibited and gave talks, caught up with friends and colleagues from all around the globe, enjoyed many good meals, and got our fill of mathematical art.

Although the location for the next Bridges conference is usually announced at the end of the last plenary talk, these is still some uncertainty about who will be hosting the conference next year.  But regardless of where it is, you can expect that Nick and I will certainly be there!

## Still more on: What is…Inversive Geometry?

Now for the final post on inversive geometry!  I’ve been generating some fascinating images, and I’d like to share a bit about how I make them.

In order to create such images in Mathematica, you need to go beyond the geometrical definition of inversion and use coordinate geometry.  Let’s take a moment to see how to do this.

Recall that P′, the inverse point of P, is that point on a ray drawn from the origin through P such that

$[OP]\cdot[OP']=1,$

where $[AB]$ denotes the distance from A to B.  Feel free to reread the previous two posts on inversive geometry for a refresher (here are links to the first post and the second post).

Now suppose that the point P has Cartesian coordinates $(x,y).$  Points on a ray drawn from the origin through P will then have coordinates $(kx, ky),$ where $k>0.$  Thus, we just need to find the right $k$ so that the point $P'=(kx,ky)$ satisfies the definition of an inverse point.

This is just a matter of a little algebra; the result is

$P'=\left(\dfrac{x}{x^2+y^2},\dfrac{y}{x^2+y^2}\right).$

What this means is that if you have an equation of a curve in terms of $x$ and $y,$ if you substitute $x/(x^2+y^2)$ everywhere you see $x,$ and substitute $y/(x^2+y^2)$ everywhere you see $y,$ you’ll get an equation for the inverse curve.

Let’s illustrate with a simple example — in general, the computer will be doing all the work, so we won’t need to actually do the algebra in practice.  We’ll look at the line $x=1.$  From our previous work, we know that the inverse curve must be a circle going through the origin.

Making the substitution just discussed, we get the equation

$\dfrac x{x^2+y^2}=1,$

which may be written (after completing the square) in the form

$\left(x-\dfrac12\right)^2+y^2=\dfrac14.$

It is not hard to see that this is in fact a circle which passes through the point $(0,0).$

Now we need to add one more step.  In the definition of an inverse point, we had the point $O$ being the origin with coordinates $(0,0).$  What if $O$ were some other point, say with coordinates $(a,b)$?

Let’s proceed incrementally.  Beginning with a point $(x,y),$ translate to the point $(x-a,y-b)$ so that the point $(a,b)$ now acts like the origin.  Now use the previous formula to invert:

$\left(\dfrac{x-a}{(x-a)^2+(y-b)^2},\dfrac{y-b}{(x-a)^2+(y-b)^2}\right).$

Finally, translate back:

$\left(a+\dfrac{x-a}{(x-a)^2+(y-b)^2},b+\dfrac{y-b}{(x-a)^2+(y-b)^2}\right).$

This is now the inverse of the point $(x,y)$ about the point $(a,b).$

So what you see in the above image is several copies of the parabola $y=x^2$ inverted about a series of equally spaced points along the line segment with endpoints $(1/2,-1/2)$ and $(3/2,1/2).$  This might seem a little arbitrary, but it takes quite a bit of experimentation to find a set of points to invert about in order to create an aesthetically pleasing image.

Of course there is another perspective on accomplishing the same task — just shift the parabolas first, invert about the origin, and then shift back.  This is geometrically equivalent (and the algebra is the same); it just depends on how you want to look at it.

Here is another image creating by inverting the parabola $y=x^2$ about points which lie on a circle.

And while we’re on the subject of inverting parabolas, let’s take a moment to discuss the cardioid example we looked at in our last conversation about inversion:

To prove that this construction of circles actually yields a cardioid, the trick is to take the inverse of a parabola about its focus.  If you do this, the tangent lines of the parabola will then invert to circles tangent to a cardioid.  I won’t go into all the details here, but I’ll outline how the proof goes using the following diagram.

Draw a line (shown in black) tangent to the blue parabola at its vertex; the inverse curves are shown in the same color, but dashed.  Note that the black circle must be tangent to the blue cardioid since the inverse black line is tangent to the inverse parabola.

The small red disk is the focus of the parabola.  Key to the proof is the property of the parabola that if you draw a line from the focus to a point on the black line and then bounce off at a right angle (the red lines), the resulting line is tangent to the parabola.  So the inverse of this line — the red dashed circle — must be tangent to the cardioid.

Since perpendicularity is preserved and the line from the focus inverts to itself (since we’re inverting about the focus), the red circle must be perpendicular to this line — meaning that the line from the focus in fact contains a diameter, and hence the center, of the red circle.  Then using properties of circles, you can show that all centers of circles formed in this way lie on a circle (shown dotted in purple) which is half the size of the black circle.  I’ll leave the details to you….

Finally, I’d like to show a few examples of using the other conic sections.  Here is an image with 80 inversions of an ellipse around centers which lie on a line segment.

And here is an example of 100 hyperbolas inverted around centers which lie on a line segment.  Since the tails of the branches of a hyperbola all go to infinity, they all meet at the same point when inverted.

So now you know how to work with geometrical inversion from an algebraic standpoint.  I hope seeing some of the fascinating images you can create will inspire you to try creating some yourself!

## Imagifractalous! 7: Fractal Binary Trees IV

Bridges 2017 is next week in Waterloo, Ontario, Canada!  We’re all looking forward to it…Nick and his parents are also going, and I’ll get to see a lot of new friends I met last year in Finland.

In preparation, I’ve been creating a portfolio of binary and ternary trees.  I’ve been coloring and highlighting the branches to make them easier to understand, so I thought I’d take the opportunity to share several of them.  Mathematics just as it’s happening….

Here is an example of what I’m talking about.

Recall that we’re generalizing the idea of “left” and “right” branches of a binary tree — rather that just rotating left or right (and possibly scaling), we’re allowing any affine transformation to correspond to “left” and “right.”  In order to avoid any confusion, let’s refer to the transformations as “0” and “1.”

In the tree above, the 0 branches are shown in black, and the 1 branches in red.  Notice that sometimes, the 0 branches seem to go to the right, other times, to the left.  This is a common occurrence when you allow the branching to be determined by more general transformations.

Here, you’ll notice that 0 and 11 take you to the same place — beginning with the trunk (the vertical black line at the right), if you follow one black branch, you’ll end up at the same blue node as you would if you followed two red branches.  In fact, no matter what blue node you start at, following one black branch will always take you to the same place as following two red branches.

Here is not the place to go into too many details, but let me give you the gist of what we’re studying.  If you denote the transformation which generates the black branches by $B_0$ and that which generate the red branches by $B_1,$ you will observe behavior like that in the above tree if

$B_0=B_1+B_1^2.$

Right now, most of the work I’m doing revolves around saying that I want to generate a tree with a certain property (like 0 and 11 going to the same node), and then solving the corresponding matrix equation to find interesting examples of trees with this property.  Usually the linear algebra involved is fairly complicated — feel free to comment if you’d like to know more.  As I said, this blog is not the place for all the details….

Below is another interesting example.

In this tree, 0 and 00 go to the same node.  What this means in terms of branching is that there can never be two consecutive black branches (again, 0 is black and 1 is red) — taking the additional 0 branch leaves you in exactly the same place.

Note that for this property to hold, there is no restriction on what the 1 transformation can be.  Above, the transformation $B_1$ is a scaled rotation by 60°.  This is what produces the spirals of red branches emanating from the nodes of the tree.

In this example, 0 and 01 go to the same node (0 is black, 1 is red).  Implications for the tree are that the red branches zigzag back and forth, getting shorter with each iteration.  Moreover, there aren’t any red branches drawn after a black branch (except the first time, off the end of the trunk of the tree).  This is because 01 — taking a red branch after a black branch — takes you to the same place as 0, which is taking a black branch.  In other words, the red branch doesn’t take you any further.

Here, 01 and 10 take you to the same node (again, 0 is black and 1 is red).  This is easy to see — there are many quadrilaterals in the tree formed by alternating red and black branches.  In addition, the iterations of this tree move progressively higher each time — so, for example, all the nodes at the top are at a depth of 4.

If you look at the number of new nodes at each level, you get a sequence which begins

2, 3, 6, 12, 24, 48, 96, 192, 384, 768, ….

After the second level, it seems that the number of new nodes doubles with each iteration.  I say “seems” since it is generally very difficult to prove that such a relationship continues up arbitrarily many levels.  Although it is easy to find the sequence of numbers of nodes for any tree using Mathematica, I have rigorous proofs of correctness for only three cases so far.

What makes the proofs so difficult?  The following tree is another example of a case where 01 and 10 go to the same node.

But the sequence of new nodes at each level is just 2, 3, 4, 5, 6, ….  (This is one case I’ve rigorously proved.)  The transformations $B_0$ and $B_1$ used to make this tree, in addition to forcing 01 and 10 to go to the same node, also have additional properties which force any two strings of the same length with the same number of 0’s (and therefore the same number of 1’s as well) to go to the same node.  So to prove the sequence of nodes in the previous case is 2, 3, 6, 12, 24, 48, …, you need to say which strings take you to the same nodes, and prove that this pattern continues no matter how far you go up — and that there are no “surprise” coincidences of other nodes as you proceed.

It is also possible to look at infinite strings going to the same node, as shown below.  The linear algebra gets quite a bit more involved in these cases.

Here, 0 and 1 do in fact correspond to going left and right, respectively.  The thicker black path corresponds to the string 011111…, that is, going left once, and then going to the right infinitely often, creating the spiral you see above.  The thicker green path corresponds to alternating 10101010… infinitely often, creating a zigzag path which approaches exactly the same point as the black spiral does.

Here is another example, where the spiral 011111… (in black) approaches the same point as the infinite zigzag 100100100100… (in purple).

These are some of my favorite examples.  But I should remark that once you know how to mathematically find transformations which produce trees with a desired property, it takes a lot of fiddling around to find aesthetically pleasing examples.

I hope these examples give you a better idea of the nature of our research.  I’ll update you on Bridges when I get back, and let you know about any interesting comments other participants make about our trees.  I leave on Wednesday, and will post pictures daily on my Twitter @cre8math if you’d like a daily dose of mathematical art!

## More on: What is…Projective Geometry?

This week, I thought I’d go a little deeper into the subject of projective geometry (feel free to reread last week’s post for a refresher).  Why? I think this is a good opportunity to discuss the idea of an algebraic model of a geometry.  Certainly using Cartesian coordinates in the Euclidean plane makes many geometrical problems easier to approach.

So what would a coordinate system in projective geometry look like?  The most commonly used system is homogeneous coordinates.  Let’s see how they work.

The difficulty with adding the line at infinity is that we need infinitely many points in addition to those already in the plane.  Perhaps you might imagine that adding an “infinite” coordinate might do the trick, but there is an alternative — and algebraically simpler — approach.

First, think of the Euclidean plane as being the plane z = 1 in three-dimensional Cartesian coordinates, so that every Euclidean point (xy) is given homogeneous coordinates (xy, 1).  But we don’t want to make the z-coordinate special — we want all the homogeneous coordinates to have similar interpretations.  We accomplish this by giving each point infinitely many names — specifically, for any k ≠ 0, the coordinates (kxkyk) describe the same point as (xy, 1).  Geometrically, you might think of this as saying that the line through  (xy, 1) (except the origin) is, in some sense, the point (xy, 1).

So if z ≠ 0, the point (xyz) in homogeneous coordinates is another name for the Euclidean point (x/zy/z).  But why would you want to do this?

The punch line is that we can now use z = 0 to indicate that a point is on the line at infinity!  We still keep the convention that if k ≠ 0, the homogeneous coordinates (kxky, 0) describe the same point as (xy, 0), as long as x and y are not both 0.

So our system of homogenous coordinates contains all points (xyz) such that not all three coordinates are 0.  Any point with z ≠ 0 corresponds to a Euclidean point, and any point with z = 0 corresponds to a point on the line at infinity.

Is it really worth all this trouble?  There are many interesting features of such a coordinate system — and I’d like to mention a few of them here, omitting the proofs.  There are many resources online that include all the details — one example is the classic Projective Geometry by Veblen and Young available free as an ebook.

Let’s start be looking at equations of lines in projective geometry.  In the Cartesian plane, we may represent a line in the form Ax + By + C = 0, where A, B, and C are not all zero.  In the projective plane, a line has the form form Ax + By + Cz = 0, where A, B, and C are not all zero.  Nice, isn’t it?  This form is also consistent with our system of having many names for a point:  if Ax + By + Cz = 0 and k ≠ 0, then also A(kx) + B(ky) + C(kz) = 0 as well. So no problems there.

But the really neat aspect of this representation is how you can use linear algebra in three dimensions to solve many problems in projective geometry.  This isn’t a post about linear algebra — so I’ll limit myself to just one example.  But in case you do know something about linear algebra, I think you should see how it can be used in projective geometry when homogeneous coordinate are used.

We’ll consider the problem of finding the intersection of two lines, say Ax + By + Cz = 0 and Dx + Ey + Fz = 0.  The form of these expressions should remind you of taking the dot product, so that we can rewrite these expressions as

$(A,B,C)\cdot(x,y,z)=(D,E,F)\cdot(x,y,z)=0.$

Interpreting these coordinates and coefficients as vectors in three-dimensional space, we observe that the common point (xyz) is simultaneously perpendicular to both (A, B, C) and (D, E, F), since both dot products are zero.  So (xyz) can be found using the cross-product

$(x,y,z)=(A,B,C)\times(D,E,F).$

Very nice!  Again, there are many such examples, but this is not the place to discuss them….

This algebraic model also suggests another geometric model for the projective plane besides adding a line at infinity to the Euclidean plane.  Begin with the surface of a sphere centered at the origin in three-dimensional Cartesian space, and observe that opposite points on the sphere have homogeneous coordinates that are different names for the same point in the projective plane.

So, in some sense, we have exactly twice as many points as we need — so we identify opposite points on this sphere, so that they are in fact the same point.  (You might recall a similar discussion about points in the post on spherical geometry.)  Thinking about it in another way, we might just consider the top hemisphere of the sphere with only half of the equator, including just one of the endpoints of the semicircle.

And while this model is fairly simple geometrically, it is important to point out that this does not mean that the projective plane lies inside three-dimensional space.  Once we have our hemisphere and semicircle, we have to think about it without any of the surrounding space.  This is not easy to do, but this type of thinking is necessary all the time when studying differential geometry, a topic for another time….

One last benefit to using homogenous coordinates:  it can easily be abstracted to any number of dimensions.  Do you want a projective space?  Just add a plane at infinity to three-dimensional Euclidean space!  Coordinates are easy — all points (x, y, z, w), with not all coordinates equal to 0.  When w ≠ 0, the point (x, y, z, w) corresponds to the Euclidean point (x/w, y/w, z/w), and when w = 0, the point is on the plane at infinity.

And clearly, there would be no need to stop at three dimensions — it is just as easy to create a projective space of four or more dimensions.

Finding a workable system of coordinates for a particular geometry is not always a simple matter — but finding a system that allows problems to be solved easily is often a key step to studying any type of geometry.  I hope this gives you some insight to yet another aspect of the diverse universe of so many different Geometries….

## What is…Projective Geometry?

The last type of geometry I discussed was inversive geometry, which is obtained by adding a point at infinity to the Euclidean plane.  Recall that as long as we had a consistent, useful model of this extended plane, it made perfect sense to define this new type of geometry.

Today, we’re going to add a line at infinity — creating what is called a projective geometry.  There are in fact many different types of projective geometries, but let’s just try to understand one at a time….

You might remember one important property of ω, the point at infinity in inversive geometry:  it was on every unbounded curve, and in particular, on every line. We need to be a bit more specific with our projective geometry, in the following sense.  Every line will intersect the line at infinity — denoted by λ — but not every line will intersect at the same point.

Consider all lines with some given slope m.  We then add one point to λ which lies on these lines, but no other lines.  In other words, each point on λ corresponds to an infinite family of parallel Euclidean lines — since now, with the addition of λ, there are no parallel lines in the projective plane.  The point at which two parallel (in the Euclidean sense) lines intersect is determined by their slope.

How does this differ from inversive geometry?  Well, in inversive geometry, if two lines had different slopes, they intersected in two points:  the usual finite point of intersection you learned about in algebra class, as well as ω.  But in projective geometry, two lines with different slopes intersect in only one point, since they intersect the line at infinity in two different points.

What this means is that any two distinct lines always intersect in exactly one point.  See the difference?  Parallel lines (in the Euclidean sense) intersect in a point on λ, and nonparallel (in the Euclidean sense) lines intersect in the same point they did in Euclidean geometry.

Now let’s look at the dual question (recall the discussion of duality, an important concept in spherical geometry):  what about a line between two points?  Two finite points generate a line, as usual.  If one point is finite and one lies on λ, the line generated is that line through the finite point with the slope corresponding to the point on λ.  And if both points are infinite, then the line through them is just λ.

Thus we have the following duality:  two distinct lines determine a unique point, and two distinct points determine a unique line.  Again, duality is an extremely powerful concept in geometry, so the fact that points and lines are dual concepts really is a legitimate justification for thinking about projective geometry.

Projective plane geometry is a broad subject — but some of my favorite objects to look at in projective geometry are the conic sections:  ellipses, parabolas, and hyperbolas.  This is because from the point of view of projective geometry, they are, in a sense which we’ll look at right now, all the same.

This sounds odd at first reading, but follow along.  The first question we need to consider is what points on λ lie on unbounded curves.  For lines, it’s easy — it’s just the point on λ corresponding to the slope of the line.

You can see from the image that as points on the parabola move further away from its vertex, the tangents have slopes of ever-increasing magnitude.  Determining the precise slopes is an easy exercise in calculus — but what is important is that the tangent lines approach, in slope, the axis of the parabola.  In this case the axis is vertical, but of course the parabola may be rotated.

What this means is that the parabola intersects the line at infinity in the point corresponding to the slope of its axis.  Again, the tangent lines on either side approach this slope, but from two directions — from above and from below.

Now hold this thought while we look at a hyperbola.

Let’s see how we travel along the hyperbola.  As we move to the upper right toward the open red circle, we are moving closer to the red dashed asymptote — meaning we approach the point on λ corresponding to the slope of the red asymptote.  But here is where it becomes interesting:  as we cross the line at infinity, we come back along the asymptote toward the filled red circle on the other branch of the hyperbola!

Then we continue moving along the left branch, getting continually closer to the blue asymptote, approaching that point on λ corresponding to the slope of the blue asymptote as we pass through the blue filled circle.  Then we cross the line at infinity again, and jump to the right branch of the hyperbola toward the open blue circle.

Can you see what this means?  In projective geometry, a hyperbola does not have two separate branches.  Adding the line at infinity allows us a means to jump between the two branches.

Let’s look at these scenarios from a slightly different perspective.  Suppose that somehow, we can actually draw the line at infinity.  It’s the blue dashed line in the figure below.  Easy.

Can you see where we’re going with this?  The left circle represents an ellipse, since it is a bounded curve and cannot intersect λ.  The middle circle represents a parabola — it’s a curve which intersects the line at infinity at exactly one point, and so is actually tangent to λ.  The right circle represents a hyperbola, since it intersects the line at infinity at two points.  It may look strange from this perspective, but this right circle really does represent the hyperbola illustrated above.

To summarize:  if a conic does not intersect the line at infinity, we call it a Euclidean ellipse, if it is tangent to λ, we call it a Euclidean parabola, and if it intersects λ in two points, we call it a Euclidean hyperbola.

Because you see, in projective geometry, there is no distinguished line.  Every line is just like any other.  So, in some sense, these is just one conic section in projective geometry!

What we have looked at today is what would be called an embedding of the Euclidean plane in the projective plane.  We saw how we could just add a line at infinity with certain properties, and our plane would behave “projectively.”  But from the perspective of projective geometry, you’ve just got conic sections and lines, with possibly 0, 1, or 2 intersection points as illustrated above.  A little mind-blowing, but absolutely true.

Of course we’ve only been able to scratch the surface of this really amazing geometrical world today.  Hopefully you will be inspired to learn a little bit more about it….

## 100 Posts!

Can you believe it?  I have been waiting to be able to finally tag “Day1xx”, and that day is finally here!

I could say something momentous on this occasion.  But I’m not sure that’s really necessary — you can imagine that keeping a blog running for 100 weeks with (hopefully!) interesting posts on mathematics, creativity, and art is momentous emough.

But I have been running into a problem:  my blog is getting harder to search.  For example, I just got five pages of results by searching for “fractal”!  So I thought I’d put together an index of all my blog posts, organized by category.

I hope this is of use to newer followers — you might like certain topics better than others, and this way you can easily look at older posts related to the ones you like.

The category a post is listed under is what I consider its primary category — but rarely does a single post only address on topic.  But surely this index is a step in the right direction.

And lastly, I would like to thank all my followers for encouraging to keep me going.  I get an email every time someone likes or comments — and I appreciate each one. Thanks again!

A.  Introduction

1. Day001, What Is Mathematics?

B.  Mathematical and Digital Art

1. Day002, Josef Albers and Interaction of Color.
2. Day011, Evaporation I.
3. Day012, Evaporation II.
4. Day015, Geometrical Dissections II: Four to One.
5. Day022, Envelopes III:  Art and Randomness
6. Day029, The Joy of Ink I.
7. Day030, The Joy of Ink II.
8. Day054, Color I: Opacity and Josef Albers.
9. Day055, Color II: Opacity and Josef Albers.

C.  Mathematical Puzzles

1. Day003, CrossNumber Puzzles.
2. Day005, Cryptarithms.
3. Day010, ColorSlide Puzzles.
4. Day018, Roman Numeral Puzzles.
5. Day024, Logic Puzzles I.
6. Day025, Logic Puzzles II.
7. Day031, Number Searches I.
8. Day032, Number Searches II.

D.  Two-Dimensional Geometry

1. Day004, Hexominoes and Cube Nets.
2. Day014, Geometrical Dissections I.
3. Day020, Envelopes I.
4. Day021, Envelopes II:  Making Spirals.
5. Day074, The Ravioli Equation.

E.  Pedagogy

1. Day006, The Problem with Calculus Textbooks.
2. Day013, Writing Original Problems.
3. Day023Day093 (reprise), The Problem with Grades.
5. Day028, International Dodecahedron Day 2016!

F.  Koch Curves and Related Topics

1. Day007, Creating Fractals.
2. Day008, Creating Fractals II: Recursion vs. Iteration.
3. Day009, Creating Fractals III: Making Your Own.
4. Day027, Creating Fractals IV:  Results!
5. Day033, New Koch Snowflakes.
6. Day062, Koch Curves and Canopies.
7. Day065, p-adic Numbers I: When Big is Small.
8. Day067, p-adic Numbers II: When Big is Small.

G.  Essays

1. Day016, On Mathematical Creativity I.
2. Day017, On Mathematical Creativity II.
3. Day019, Writing a Math Blog.

H.  Iterated Function Systems

1. Day034, Creating Fractals V:  Iterated Function Systems I.
2. Day035, Creating Fractals VI:  Iterated Function Systems II.
3. Day036, Creating Fractals VII:  Iterated Function Systems III.

I.  Programming and Coding

1. Day037, Creating Fractals VIII:  PostScript Programming.
2. Day058, On Coding I.
3. Day060, On Coding II: LISP.
4. Day064, On Coding III: LISP to Mathematica.
5. Day068, On Coding IV: Mathematica.
6. Day075, On Coding V: Postscript.
7. Day078, On Coding VI: HTML.
8. Day082, On Coding VII: LaTeX I.
9. Day085, On Coding VIII: LaTeX II.
10. Day092, On Coding IX: Computer Graphics I.
11. Day099, On Coding X: Computer Graphics II.

J.  Mathematics and Art Conferences

1. Day038, Bridges:  Mathematics and Art I.
2. Day049, Bridges:  Mathematics and Art II.
3. Day050, Vienna!  (Symmetry Conference 2016).
4. Day053, Bridges: Mathematics and Art III. Jyvaskyla, Finland!
5. Day083, Art Exhibition: Golden Section 2017.

K.  Processing

1. Day039, Making Movies with Processing I.
2. Day040, Making Movies with Processing II.
3. Day041, Making Movies with Processing III.
4. Day042, Making Movies with Processing IV.
5. Day043, Making Movies with Processing V.
6. Day044, Making Movies with Processing VI.

L.  Mathematics and Digital Art Course

1. Day045, Mathematics and Digital Art I.
2. Day046, Mathematics and Digital Art II.
3. Day047, Mathematics and Digital Art III.
4. Day048, Mathematics and Digital Art IV.
5. Day057, Digital Art I: End of Week 2 (Fall 2016).
6. Day059, Digital Art II: End of Week 4 (Fall 2016).
7. Day061, Digital Art III: End of Week 6 (Fall 2016).
8. Day063, Digital Art IV: End of Week 8 (Fall 2016).
9. Day066, Digital Art V: End of Week 11 (Fall 2016).
10. Day069, Digital Art VI: End of Week 14 (Fall 2016).
11. Day071, Digital Art VII: Final Projects! (Fall 2016).
12. Day072, Digital Art VIII: The End (Fall 2016).
13. Day081, Mathematics and Digital Art: Update 1 (Spring 2017).
14. Day086, Mathematics and Digital Art: Update 2 (Spring 2017).
15. Day090, Mathematics and Digital Art: Update 3 (Spring 2017).
16. Day094, Mathematics and Digital Art: Final Update (Spring 2017).

M.  Guest Bloggers

1. Day051, Guest Blogger:  Geoffrey Owen Miller, I.
2. Day052, Guest Blogger:  Geoffrey Owen Miller, II.
3. Day096, Guest Blogger: Percival Q. Plumtwiddle, I.
4. Day097, Guest Blogger: Percival Q. Plumtwiddle, II.

N.  Milestones

1. Day056, Celebrating One Year!

O.  Imagifractalous!

1. Day070, Imagifractalous! 1: How it all began.
2. Day073, Imagifractalous! 2: p-adic sequences.
3. Day077, Imagifractalous! 3: Fractal Binary Trees.
4. Day087, Imagifractalous! 4: Fractal Binary Trees II.
5. Day088, Imagifractalous! 5: Fractal Binary Trees III.
6. Day089, Imagifractalous! 6: Imagifractalous!

P.  What is a Geometry?

1. Day076, What is a Geometry?
2. Day079, What is…Taxicab Geometry?
3. Day084, What is…Spherical Geometry?
4. Day091, What is…Inversive Geometry?
5. Day095, More on: What is…Inversive Geometry?

Q.  Miscellaneous Mathematics

1. Day080, A New Cantor Set?
2. Day098, The One Four Conjecture.

## On Coding X: Computer Graphics II

Now that I’ve talked about what I use computer graphics for in my last installment of On Coding, I’d like to talk about the most useful graphics package I’ve come across for writing mathematics:  TikZ.

First a word about the name, TikZ.  It’s an example of a recursive acronym, like GOD used in Douglas Hofstadter’s Gödel, Escher, Bach, which stands for “GOD Over Djinn.”  (By the way, read Gödel, Escher, Bach if you haven’t already — it’s an amazing book about Gödel’s Incompleteness Theorem.)

So TikZ stands for “TikZ ist kein Zeichenprogramm,” which is German for “TikZ is not a drawing program.”  According to its creator, Till Tantau, this indicates that TikZ is not a way to draw pictures with your mouse or tablet, but is more like a computer graphics language.  It is designed for use in LaTeX, and is built with a lower-level language called PGF, which stands for “portable graphics format.”

So enough history — you can read more in the TikZ manual.  But a word of caution — it’s over 1000 pages long, so there’s a lot there!  I’ll only be able to scratch the surface today.

The two most important features of TikZ, in my opinion, are (1) you can draw very precise graphics because you’re writing in a high-level langauge, not using a WYSIWYG environment, and (2) you can use it in LaTeX, including putting any LaTeX symbols in your graphics.  This second point is extremely important, since it means when you’re labelling a diagram, the labels (usually involving mathematical symbols) look exactly the same way as the do in your text.

I use TikZ almost exclusively for two-dimensional mathematical graphics.  In a recent paper, for example, I created the following image.

Note how precisely all the elements are rendered — this is because you give precise coordinates for all the individual graphics elements.

Let’s take a look at another, somewhat simpler example from this paper.

I chose this example for a few reasons.  First, it requires using a lot of the basic TikZ commands.  Second, it illustrates the practical side of drawing computer graphics.  No, I’m not going to submit this image to a Bridges art exhibition any time soon — but if I need to make an image for a paper, I want it to look good.

So I thought I’d take some time to explain various aspects of the code which creates this image.  Maybe not the most glamorous graphic — but you’re welcome to look at the 1000+ page manual for hundreds of neat examples.  Here is a diagram for a finite-state automaton from page 179, for example.

Here’s what you’d need to type in LaTeX to get the simple graph I mentioned a moment ago.

Let’s look at several different excerpts from this example.  The first line opens your TikZ environment, and scales the image.  The default unit is 1 cm, so you need to set the scale to get your image the right size.

The next line is just a comment — I don’t use comments much for simple images.  But for more complex images, they’re important.  Just as important as commenting computer code.

The next line draws a set of axes.  What’s important here is that I defined my own “\axes” command — so you can include user-defined functions as well.  The advantages of being able to do this are huge.  You can use any command you define in LaTeX in a TikZ image.

Another great feature is the looping construct, “\foreach.”  The red segments above are one unit long, and so the only difference is the starting points.  Also important here is that you can use mathematical expressions inside TikZ, like the “{(\x^2+9)/6}” expression in the curly brackets.

Note the directives “[thick, red]” after the “draw” command.  You have control over every aspect of the drawing routines in TikZ — and there are lots of them.  For example, there is the “dashed” directive in line 10.  But not only can you draw a dashed line, but you can also specify the lengths of the dash marks and the spaces between them, too!  Further, you can create user-defined styles if you use the same set of directives over and over again.  This is helpful if you are creating several related images, and you want to tweak the color, for example.  You only have to change the color specification in the style, and every image which uses that style will be rendered using the new color.

Notice the “\filldraw” command in line 6.  I wanted open circles, so I drew the circles in red, and filled them with white.  If I wanted to, I could have also specified precisely how thick I wanted the circles to be drawn, but the default thickness looked just fine to me.

Notice the use of “node” and “\node” throughout.  In line 9, for example, the “3” is centered at coordinates (3, -0.5).  Also note the placement of nodes at the end of line segments, as shown in lines 7 and 8.  Again, it is significant that you can include any text you can create in LaTeX in your diagram.

I hope this is enough to give you the feel of using TikZ.  As I mentioned in the last installment, I also use TikZ to create slideshow presentations since there is so much you can do.  Remember, there are over 1000 pages of examples of things you can do in TikZ in the manual.

I would like to mention one caveat, however.  I do sometimes use Mathematica to create images with mathematically intensive equations and calculations.  TikZ is closer to a markup language in its usage, as I see it — so any image that requires significant coding to produce is a bit too cumbersome syntactically.  Here is an example of an image I used Mathematica to create.

But another nice TikZ feature is that you can import images into your environment — so I can draw complex images in Mathematica, include them in my TikZ picture, and then overlay LaTeX symbols on top of the image.  With this capability, the possibilities are quite literally endless.

A final comment:  TikZ and LaTeX are both open source, so if you’re interested, you can just download them and start experimenting!  The learning curve is a little steep, admittedly, but once you’ve climbed up, you’ll be able to create astonishingly beautiful graphical images for any purpose you have in mind.  Try it!