Geometry, Loop

Think outside the tesseract… what’s a tesseract?

My new game, loop, is almost here! Loop features an interesting mathematical concept called the “tesseract,” and today I wanted to share what that’s all about. It’s math, but certainly not the most technical post I’ve written on this blog.

A tesseract is simply a special name for a 4-dimensional cube. Just as when you take a square and “pull” it upward to produce a cube, you could “pull” a cube along an axis that we can’t see to produce a tesseract. But a problem arises when you try to visualize these shapes. When you look at a cube top-down, all you might see is a square, right? Similarly, if you were to look at a tesseract in the 3-D world, all you would see was a cube. There has to be some way to project the rest of the tesseract into the world we can see.

Carl Sagan has a great video explaining how to understand shapes in another dimension. Essentially the crux of the matter is that although you can’t see the tesseract in its full 4-dimensional glory, you can calculate what its “shadow” on the 3-dimensional world would look like.

tesseract projection
A simple projection of the tesseract into 3-D space (and a lot of fun to calculate!).

As you can see, the tesseract looks like two nested, connected cubes. Why is one cube smaller than the other? Well, it appears smaller because the other end of the tesseract is far away on the axis we can’t see—just as an object farther away in a picture appears smaller. And in animations of a tesseract rotating, which you can see briefly in the preview video for loop, the cubes appear to change size with respect to each other as the “ends” of the tesseract move closer to and farther from the camera.

Of course, loop is a video game, not a math lesson—so the mathematical rules of the tesseract may be a bit warped as they make their way into the animations. After all, a tesseract is simply a cubelike shape, nothing more. But in the game, the tesseract is more than a geometric object; it is a vehicle for transportation across the levels. That idea was impressed upon me by Madeleine L’Engle’s classic 1963 novel A Wrinkle in Time, with which I have been fascinated since elementary school.

Scannable Document on Aug 10, 2016, 4_32_29 PM
The diagram from A Wrinkle in Time explaining travel through the tesseract.

According to A Wrinkle in Time, the tesseract is actually a 5-dimensional entity that allows you to jump across the fourth dimension, which is often said to be time. Based on the conventional definition of a tesseract above, L’Engle seems to have been taking some liberties with the math—but of course, that’s the nature of science fiction.

Regardless of its factual blips, the notion of using another dimension to travel through space is inspiring. The tesseract in loop draws from that idea, which is especially appropriate since (spoiler alert) the Institute within the game exists in another dimension. As an analogy, think of a multistory building: at any given point, you only know the floor you’re on—the x-axis. But when you get on an elevator, that transports you across the y-axis, taking you to another floor. The tesseract is basically a multidimensional elevator.

elevator diagram
The tesseract transports you through another dimension, just like an elevator.

Loop has two kinds of tesseracts—strictly speaking, 4-dimensional polytopes—that you’ll see in the various levels. One is the hypercube, which is mathematically classified as a tesseract. The other is a 16-cell, or hexadecachoron if you’re feeling pretentious; it’s like an octahedron translated into four dimensions. To read more about the different types of 4-D shapes (regular 4-polytopes), check out Wikipedia if you dare.

I find these multidimensional ideas really interesting! Let me know what you think in the comments.

Apps, Loop

loop: recording an original, acoustic soundtrack

Developing my new puzzle game, loop, was much more intricate than any of my other apps. The coding, as it turned out, was much easier; there were much fewer algorithms, iCloud document shuffling strategies, or gnarly PDF functions to work with. Rather, I soon realized that the challenge facing me was an artistic one. I had to create an audiovisual experience unique to my game—while working within the bounds of what one person can do over the course of one summer. I guess that would be something like, say, trying to build a piece of furniture by yourself. You could be perfectly good at designing, sawing, and painting, and still come out with a table that screams “I made this myself.”

And one of the attitudes I had to challenge when developing Loop was precisely that: at first I was limiting myself to things I could only do solo. For most game soundtracks, you could probably do it by yourself if you were writing electronic music. Just buy Logic or some comparable DAW and synthesize away. (Not that it doesn’t take talent and effort, but it’s possible.)

On the other hand, from the beginning of Loop’s life in development I knew that I wanted its soundtrack to be acoustic. I wanted to use my years of learning piano to produce something that would touch the ears of hundreds, hopefully thousands of people. I had a Samson Q2U microphone at home, and I thought, Why don’t I get my friend Patrick to play the violin, and record the whole soundtrack at my house?

There are several reasons why that approach doesn’t work, and as soon as I started the real recording I knew why:

  1. The Samson Q2U microphone is not at all geared toward piano recording, and one microphone cannot possibly be enough for both a piano and a violin.
  2. Home acoustics are really bad.
  3. I wouldn’t be able to manage a DAW and record myself and Patrick simultaneously.
  4. The cost of buying Logic would be comparable to hiring an audio engineer.

All of these reasons added up in such a way that the logical way to approach this soundtrack would be to get a professional audio engineer to set up and manage the recording. And wow, what a difference it made. Check out the (improvised) soundtrack for Loop’s main menu

We had seven mics trained on us while we recorded this soundtrack. (To think that I would have gone ahead with one on the cheap…) The piano was the hardest to get right; we ended up putting two cardioid mics under its belly and two pointing into the strings from a few inches outside. The underside mics give the sound warmth, and the upper ones lend it clarity… Of course, the fact that we used a 7-foot Steinway in the recital hall at Capital University doesn’t hurt the sound quality either.

After all the recording was finished, I went back and added strings from the Sonatina Symphony Orchestra sample library, as well as a few soundscape synths to add noise in the background. (You can hear those strings in the app preview video I released last week.) For this, GarageBand was perfectly sufficient. Once you have good recordings, GarageBand is surprisingly effective at the nitty-gritty of putting them together.

So I can’t say it’s a fully acoustic soundtrack, but with the help of Patrick McBride and Chad Loughrige, the awesome recording engineer at Capital, I was able to create a sound to which most iOS games can’t come close. It’s the sound of real people playing real instruments, and that creates a vibe that simply can’t be substituted.

Loop is coming soon to the App Store! I’d love to hear your comments and experiences about video game soundtracks.

Apps, Loop

A new puzzle game for iOS: “loop”

It’s the summer before I head off to MIT, and of course I couldn’t sit around and do nothing. I dabbled for a while in creating virtual reality animations for Google Cardboard (a teapot that rings like a phone was as far as I got), and I even thought for a while about building my own OS. 

But around a month ago, I came across an idea that I couldn’t put down. It was a concept for a puzzle game, something that had been brewing in the back of my mind ever since I made my first app, My Grapher, back in 2011. 

It took being freed of school, really, to become capable of working on this idea! Because game development requires so many different kinds of art, a daunting challenge for a solo developer. From coding to story development to art design to music composition, I knew I would be on my own for the whole gamut. What I didn’t realize was just how time-intensive the whole process would be.

Well, a month of solid work later, I’m happy to tell you that the product of my efforts will be available soon on the App Store. It’s called “loop : a game of rotation,” and it centers on a one-eyed robot who is captured by a mysterious Institute. You have to rotate Loop into the tesseract (inspired by Madeleine L’Engle, of course) through the clever use of energy pods.

Here’s a video preview, featuring a snippet of the soundtrack I composed and performed alongside my friend Patrick McBride on violin:

I’ll be keeping you posted over the next week or so, as the game gets closer to its release. Reactions, suggestions? Please comment below!

Apps, Geometry, Isosceles

Isosceles for Mac is now available!

I am so excited to announce that Isosceles, the flagship app for Base 12 Innovations, is now available on your Mac!

The time is ripe for your favorite geometry app to come to OS X: 100,000 people around the world have now downloaded Isosceles on their iPhones and iPads. But especially when it comes to the classroom, many people rely on the Mac to create and absorb educational content. That’s why over several months of development, I’ve brought all the features you love from the iOS version into an elegant Mac user interface. Check it out:

Screen Shot 2016-01-10 at 11.34.29 AM.png

Isosceles integrates seamlessly with iCloud, so you can instantly begin editing all the sketches you’ve created on your iOS devices. You’ll be instantly familiar with the sketch interface, and pan and zoom gestures work on your trackpad just as they do on your iPad.

When you draw a figure in Isosceles, it’ll be a breeze to export it into your Keynote presentation or your note-taking app of choice. You may even enjoy creating art with Isosceles on your Mac!

Isosceles is available on the Mac App Store for $9.99 USD. From now until January 19, get it at 50% off as an introductory sale.

Do you like Isosceles? Let me know what you think in the comments!


Daily Quiz #6: March 27, 2014

I hope that after all of you finish Mathcounts, you keep up with what you learned here. You’re all really excited about how cool math is, and that’s something I really enjoy seeing. Because believe it or not, it is the frantic studying, the voracious scrambling for problems, it is that kind of math that really makes you good at it. It’s getting engaged with every problem that meets your eyes. That’s why I’m giving you these problems and going over them with you. And if you have any questions, I would love to discuss them with you in the comments ad nauseam.

This will be the last daily quiz before the competition. Try to get as high a score as you can on it (both the quiz and the competition) – the problems might be hard, but remember that you can always think of a way to make sure your answer is right! Good luck, and have fun at state!

The scores as of this morning are as follows:

Solutions to yesterday’s quiz.

21. A useful tidbit to know before solving this problem is that only perfect squares have an odd number of factors. This is quite simply because factors come in pairs, but in a perfect square one factor is repeated. So by listing the factors of the first several perfect squares, we find that the answer is 144.

22. As you know, the area of a parallelogram is the product of the base and height. We’re given the base, but the height has to be calculated from the other side length of the parallelogram. If you draw the picture, you can see that the 2-inch side is a hypotenuse of a 30-60-90 triangle. Therefore, the height is \sqrt{3} inches. Now we can find the area, 6\sqrt{3} square inches. (Everyone missed this problem, but I think for most of you it was the special right triangle triangle that screwed things up. Remember, 1-2-square root of 3).

23. Like we solved #9 earlier, we need to write an expression that represents the combined rates of both cores. The rate of the first core is 1.6 million computations per second, while the second’s is 1.5 million computations per second. They add up to 3.1 million computations per second. Writing an equation using the desired 8 million computations, 3.1 = \frac{8}{x}, we find that the answer is 2.6 seconds.

24. Let x be the width of the pool, and x + 4 the length of the pool. We need to write an equation representing the area of the pool and deck area: (x + 10)(x + 4 + 10) = 1440. Honestly, at this point you can choose whether you want to solve a quadratic or not. If you don’t, you could list factors of 1440 that have a difference of 4. You’ll come up with 36 and 40, or x = 26. If you do write a quadratic, you’ll get x2 + 24x – 1300 = 0. Then you’ll look for factors of 1300 that have a difference of 24, and come up with 50 and 26. Either way, the side lengths of the pool are 26 and 30, and the perimeter is 112.

25. I sincerely apologize for not doing this before with you guys, I just assumed you knew how to do it. You need to fill out a table with rows for the solution before and after diluting. The first column will represent the percent of hydrochloric acid (HCl), the next the size of the solution, and the next the amount of HCl. Remember that the unknown is the amount of solution that we need of the concentrated HCl.

Substance Percent HCl Solution (mL) Amt. HCl
Input Solution 0.80 x 0.80x
Output Solution 0.20 250 50

Now, we know that the amount of HCl has to be the same before and after, since Ms. Clements just added water. So setting the two expressions equal to each other, 0.80x = 50 and x = 62.5.

Today’s quiz.

26. Blaise wrote each factor in the prime factorization of 10! on an index card (separately, so two factors of 3 would be written on two index cards). If Caroline selects a card from this deck, what is the probability that she will choose a 3? (10 pts.)

27. Srikhar wants to get from building A to building B in New York City, and the way to get there is through roads that are arranged in a grid pattern. Building B is five blocks east and two blocks north of building A. Provided that the shortest distance to walk is 7 blocks, how many routes can Srikhar take that will be the shortest distance possible? (10 pts.)

28. You just lost all your financial records! Imagine that you have $15,000 in a CD that has been earning 6.1% interest, compounded annually since 2001. (Your parents deposited the money for you at your birth, presumably.) Use your math skills to figure out much money they deposited back then without your financial records. Don’t worry about inflation, by the way.

29. Bonus. This is a rerun of problem 25, since I didn’t teach you guys this before. So Ms. Clements is back at the lab, and she’s using silver nitrate this time. She has a bottle of concentrated silver nitrate (80%) and dilute silver nitrate (10%). How much of the 80% solution does she have to put into the volumetric flask (along with the 10% solution) to get 500 mL of a 40% solution? Express your answer to the nearest tenth of a milliliter. (Hint: fill in the below table using the information you know, and follow the general way we did #25.) (20 pts.)

Substance Percent AgNO3 Solution (mL) Amt. AgNO3
80% Solution x
10% 500 – x
Output Solution

30. Bonus. The product of one less than four times a number and three more than the number is 17. What is the sum of the two possible values for the number? Express your answer as a common fraction. (20 pts.)


Daily Quiz #5: March 26, 2014

The scores as of this morning are as follows: Srikhar, 130 points; Caroline, 180 points. Johnum is starting off with us at 20 points. Again, keep up the good work and have fun with today’s quiz!

Solution to yesterday’s quiz.

16. We write an equation representing the new class average after the 7 students make up the test: \frac{1638+7x}{25} = 93. Solving this equation, we find that x = 98.1.

17. To find the lowest common multiple of the three expressions, all we need to do is list the factors and include the greatest number of each that exists in any one factor. For example, a factor of 2 appears once, x appears up to twice, 3 appears once, and y appears up to twice. Multiplying these together, we get 6x2y2.

18. The number of possible magnets that could have fallen on the floor is 10 x 9 = 90. I know we didn’t account for reversed arrangements, but it’s okay because we’ll also not account for them in the numerator of the probability. The numerator, then, is 4 x 3 = 12 vowel arrangements. So the answer is 12/90 or 2/15.

19. To solve this problem, we can write an equation that represents all the students in the class. Let x represent the number of students with freckles: x + 2x + x + 4 – 7 – 3 = 30. We subtracted 7 and 3 because, like in #12, those were repeats in the hat of names. The solution is 9.

20. Using Pascal’s triangle, we can immediately tell that the coefficients of the expansion of (a + b)6 are 1, 6, 15, 20, 15, 6, 1. The probability of selecting an odd number from this list is 4/7.

Today’s quiz.

21. What is the smallest integer with exactly 15 distinct factors? (10 pts.)

22. The new iPad has a screen shaped like a parallelogram with side lengths 6 in and 2 in and angle measures 60° and 120°. What is the area of this screen? Express your answer in simplest radical form. (10 pts.)

23. The new MacBook Pro uses multiple cores to achieve the most performance; however, due to strikes in their factory in China, the cores don’t all work at the same speed. One core processes 1.6 million floating point operations in a second, and the other processes 3 million computations in two seconds. If Call of Duty requires 8 million floating point operations to load on your computer, how long will it take the computer when both cores work together? Express your answer as a decimal to the nearest tenth. (10 pts.)

24. Bonus. Each pool at the Hyperbola Hotel is planned to have a 5-foot wide sunbathing deck surrounding it. The pool will be 4 feet longer than it is wide. If 1,440 square feet of floor space have been set aside for both the pool and deck, what is the perimeter of the pool? (20 pts.)

25. Bonus. Ms. Clements, the chemistry teacher at Magnet, needs 250 mL of 20% hydrochloric acid for a Chem I lab. Her chemical cabinet has a bottle of 80% hydrochloric acid. How many mL of the stronger hydrochloric acid should she put in the volumetric flask, which she will then fill with water to the 250 mL mark? Express your answer as a decimal to the nearest tenth. (20 pts.)


Daily Quiz #4: March 25, 2014

Here are the scores as of this morning: Srikhar, 100 points; Caroline, 140 points. Keep up the good work, and don’t forget to check your answers!

Solutions to yesterday’s quiz.

11. We simply write an equation, \sqrt{3\cdot x^\frac{3}{5}} = 9 and solve. Remember to raise both sides to the reciprocal power when you have a fractional exponent. The answer is 243.

12. Drawing a Venn diagram to help you visualize the problem is a good idea. Let’s also think of the ninth graders as a hat with names in it. We know there are 408 different names in the hat, but there are actually 164 + 208 + 99 = 471 slips of paper in it. That means there are 471 – 408 = 63 names that are repeated at least once. Also remember that 11 names are in the hat three times, so we can subtract that from the number of repeated names to get 52 names that are in the hat at least twice. The answer, then, is 52/408 or 13/102.

13. To solve this problem, we need to know the area of the circle that Polly can reach and the area of the hexagonal yard. The area of the circle is \pi(30)^2, or 900\pi square feet. We know the yard has an apothem of 30 feet, so imagine that as the height of the six equilateral triangles that make up a hexagon. Since equilateral triangles can be divided into two 30-60-90 triangles, we can use that special right triangle rule to determine that the side length of the hexagon is 20\sqrt{3} feet. That means the area of each triangle is \frac{1}{2}20\sqrt{3}(30) = 300\sqrt{3}, and the area of the entire hexagon is 6 times that. Dividing the two areas, we get an answer of 90.7%. Be sure to round properly, it might be counted wrong otherwise.

14. Like Srikhar observed the other day with Robert’s college math problem, sometimes the best way to solve these boggling problems is to start with smaller examples. By listing the remainders of various powers of 2 when divided by 7, you’ll find a pattern of 2, 4, 1, 2, 4, 1,… This way, it’s easy to see that the 2014th term of this sequence is 2.

15. The intersection of the four red circles with the blue square together comprise one red circle. Since the radius of the red circles is 1/4 the large circle, we know that the area will be 1/16 of the total area. Then, we must consider the area of the one green circle, whose radius is 1/8 the large circle. Therefore, its area is 1/64 of the large circle. Adding 1/16 and 1/64, we get 5/64.

Today’s quiz.

16. Today, Madame Mathematique told her French students that if their class average was 93 or above on their last test, they would get a creme glacee party. The 18 students who have already taken the test had an average of 91, but 7 students still have to make up the test. What is the minimum average score those 7 students must make to bring the class average to a 93? Express your answer as a decimal to the nearest tenth. (10 pts.)

17. What is the lowest common multiple of 2x, x2y, and 3xy2? Write your answer as an algebraic expression in terms of x and y. (10 pts.)

18. The word CALCULATOR is spelled out on a refrigerator using magnets. If two letters fall off, what is the probability that they are both vowels? Express your answer as a common fraction. (10 pts.)
19. Bonus. Look at #12’s solution for help with this one. The 30 students in Mrs. Matrice’s class all have either dark hair, green eyes, or freckles. 7 of them have at least two of those traits, and 3 have all three traits. If there are twice as many students with green eyes as students with freckles, and there are four more brown-haired students than freckled students, how many students have freckles? (20 pts.)

20. Bonus. If a term is selected at random from the expansion of (a + b)6, what is the probability that its coefficient is odd? (20 pts.)