## Introduction: Lettering With Math

This instructable was inspired by the old "All you need is MATH (LOVE)" picture, which is old as math itself :) OK, if I remember correctly, I have seen it first more then ten years ago, so in IT world, it is old.

I have used the knowledge of equations to form the solution flag into one of a CTF (capture the flag) game, and now I show you how you can do this as well.

My pictures were made with the online math tool from Wolfram - the Wolfram Alpha.

## Step 1: Know Your Basic Forms - Straight Line

Here I will show you some of the basics, they are the bricks we are building from. Sometimes we search for "x", but sometimes the "y" value in the Descartes coordinate system. So let the fun begin!

Let's draw a line...

We have some options here (a and b are constants):

- For a horizontal line: y=a
- For a vertical line: x=a
- For a slope line y=a*x+b

The constants will tell you where and how to draw your line. On the pictures you can see a few examples. For drawing purposes you have to know which constant in the equation does what. The first two are simple, you draw the line at the given position. But the third…

The "a" tells you the angle of your line and "b" tells you how far you have to move your line at the vertical direction (or if you want to think a bit more - that moves your line at the horizontal direction with -b/a). This piece of information will be helpful when you want to draw your letters into a strict position.

## Step 2: Basic Forms - Curved Lines

If you plot some functions, they become nice curved line(s).

Just to mention a few:

- Logarithmic function: log(x)
- Power function: x^n or x*x*...*x n times
- Inverse function: 1/x
- Sine or cosine function: sin(x)
- Tangent or cotangent function: tan(x)

These can be used to form our letters as well, just think about where does they get a value. For example if you want to get an "U" shape, just plot the y=x^6 function (and move it to the right position as you can see in later steps).

## Step 3: Basic Modificators - Mirroring

Mirroring is easy to the horizontal axis. You have to multiply by -1 your values. However, if you want to mirror your shape to the vertical axis, you can do that as well. It is a multiplication with -1 as well, but this time you have to move that multiplication inside your equation.

Of course there are a lot of examples, when these two are the same...

## Step 4: Basic Modificators - Non Negative Values

The absolute function. It simply mirrors everything below the horizontal zero line to the zero line. If you have a line with negative values, they will be all positive. This forms the most simple "V" letter. You can mark the absolute function with two vertical lines: |all these things will be positive|. (Or you can use the abs() function as well.)

## Step 5: Basic Modificators - Moving

To move your lines, you have to calculate a little bit. There are two directions (staying at the 2D system) which you can use. The horizontal and the vertical. To move your image at the vertical direction, simply add a constant value to the very end of the calculation.

But what if you want to move in the horizontal direction? That is a bit tricky - you have to put your constant inside the equation! And that is not all… You have to put it in the right place and everywhere. Oh, and almost forget to mention - this constant will move it in the opposite direction you would think :)

To be clear - let's use a new variant instead of "x", call it "z". z=x+constant value. If we put this inside for example the power function, the whole thing will move into the left with the constant value we choose.

## Step 6: Basic Modificators - Rotate by 90 Degree

This modification is not so basic as would you think. So far we plot our function by searching for "y" based the "x" value. To "rotate" a function, we don't rotate the function's plot itself, but we search for the "x" now.

Let me explain:

Lets plot the function y=sin(x). This gives us a nice sine wave plot. Ok, but if we want this wave "rotated", we have to plot x=sin(y) on the same coordinate system.

## Step 7: Advanced Shapes - Sphere/Ellipse

If you want to draw a sphere, you can do it, it has a nice equation:

r^2=x^2+y^2, where the "r" means the radius of the sphere.

This equation is the direct meaning of the sphere, which is the points equidistant from the centre point. You can check this by selecting a point on the circle line and calculate with Pythagorean theorem.

But we now just using these things for drawing, so let's play with our sphere a little bit.

Let's stretch it along the "x" axis and make an ellipse, but how? Just modify the equation's "x" part a little: r^2=(x/a)^2+y^2

The same works on the other axis as well.

## Step 8: Combine Them - Let's Form a "W"

We already know that a simple "V" letter can be drawn with the absolute equation. Now try to form a "W" with the same procedure.

- Draw a simple "V" in the desired position y=|a*x+b|
- Move our "V" a bit lower y=|a*x+b|-c (now the breakpoint is at the negative "c" value)
- Make a "W" from the "V" with another absolute equation y=||a*x+b|-c|

Of course this method looks fine only in a specific range (just try looking the y=||2x+2|-2| at the -100..100 range, you will not see the middle rippling, but in the -3..3 range it looks great).

## Step 9: Make It Harder for a Competition...

With the basic knowledge we can draw almost anything we want, but when there is a competition where we want our contestants to think and our solution should not be obvious - we have to make it hard. How can we use some facts to complicate our math?

Let me show you with the simplest formula.

- 1=1
- 1=sin^2(x)+cos^2(x)
- -
**i**^2=sin^2(x)+cos^2(x) - -
**i**^2+log(1)=sin^2(x)+cos^2(x) - ...

So when we write down to our contestants the formula y=5*ln^x(e), they won't be happy and they have to think a little bit to see this is just a horizontal line :)

Participated in the

Made with Math Contest

## 6 Comments

1 year ago

Thanks ! Great instructable. It inspirés me to generate waveforms for signal processing testing.

Reply 1 year ago

I am happy to inspire you :)

1 year ago

When I awoke this morning, I thought I may have been a bit confused.

After reading through your Instructable, I have no doubt that I am.

Nicely done!

I had never been to Wolfram Alpha, very interesting site.

Thanks for the introduction.

Reply 1 year ago

Thank you for the kind words. Wolfram is a big company with history in the math world. Their site WolframAlpha was the biggest deal when they introduced it. When I was using their software Wolfram Mathematica at the university at 2001, I could not dream of a thing like this :)

1 year ago

That's pretty clever :)

Reply 1 year ago

Thank you. It was fun to do it.