Pages

Tuesday, September 4, 2012

Guess the Details

Here are some pictures I took. See if you can guess some things about the photos:
  1. Approximately what time of day the photo was taken at, or if it's computer-generated
  2. Which parts of the photo were computer-generated, if any
  3. The season (for outdoor photos)
To view the images better, click on one. I'll give answers later.

House

Crayons

Calendar Blue Moon
Weeds and Grass

Saturday, September 1, 2012

Mathematically Diving

Diving can be done well or poorly, depending on how good the diver is. Sometimes, beginning divers will do "belly flops", smacking the water horizontally instead of cutting into it like a needle. Whether a dive is a good one usually depends on whether the diver went straight into the water or not. Experienced divers can do this without thinking much about it, as if it were like walking; beginners, however, have a lot more trouble.

In time, people get used to diving; machines, however, can't learn, and are always just as clumsy. If the machine contained a computer, it would need a computer program to help it dive. The program would need to use a math formula. Here's what we'll start out with: v1= v2 tan θ, where v1 and v2 represent forward and downward velocities, and θ is the vertical angle in degrees.

 

Here's how it works: the forward and downward velocities of a good dive have the same ratio as the sine and cosine of the vertical angle of the diver (represented by θ. See picture), so the formula is v1 / v2 = sin θ / cos θ. Since sin/cos = tan, the formula becomes v1 / v2 = tan θ; multiply both sides by v2, and you get v1 = v2 tan θ.

To use the formula, you figure out what angle you'll be diving at and how fast you'll be falling when you hit the water (the downward velocity, v2). When you put those numbers into the equation, you can do the math and get your forward velocity (v1), so you know how fast you have to run off the diving board.

However, you might not know how fast you'll be falling (v2) when you hit the water, so let's calculate it now. If you fell h feet in s seconds, your average speed in the time you fell was h ft per s sec, which is the same speed as h/s ft per sec. Since acceleration while falling is as good as a constant (ignoring air resistance), and you start at zero, your final speed is twice your average speed: 2h/s ft per sec. Insert that into the equation and you get:

Now we have another problem: s, the amount of time before you hit the water. To get rid of s, we just need to state it in terms of another variable. After falling for 1 second, your speed will be 32 ft per sec. After s seconds, your speed will be 32s ft per sec. We also know that your speed will be 2h/s ft per sec. Therefore, 2h/s = 32s. Work it out and you get s = √h / 4. The very complicated equation you see to the right is what we have now. And if we simplify it, we get the final equation you see below.




Saturday, August 25, 2012

"Flipping Quarters" Solution

A couple of pieces of good news: First, in this post will be the answer to the problem I gave called Flipping Quarters; and second, I'll even work through the solution!

Friday, August 17, 2012

How I Got Blender


In a couple of my posts, you may notice some computer generated images or animations. They were created with Blender. In this post, I'll explain how I got it and started using it.

A long time ago, I wrote a BASIC program that drew a circle; the user would give the program a number, and it would draw a circle that size. There was a problem, though: the circle had a lot of holes in it. I solved the problem by filling the circle, but that was like cheating. I told my dad about the problem, and he showed me a book about graphics.

I looked through the book, but didn't find anything about my problem. I did find a section with nice, colorful computer-generated images, however - and some were so good they looked like photos! At one point, there was a series showing the construction of a photo-realistic image of a room, starting with the edges, then moving on to the surfaces, texturing, lighting, etc. Here's a similar series I made using Blender (but not photo-realistic):
Edges
Surfaces
Color
Lighting
Bump-Mapping, Reflections, Specularity, and Compositing
It looked so simple, I was hooked. I had to make my own computer-generated image that looked like a photo. I asked my dad to get me some software for 3D animations, so he searched on Google and found Blender. It looked like fun, and it was free, so we got it.

I followed some video tutorials I found on blender.org to make some nice images, and then I started making my own stuff. It was a lot of fun. I raved about it to my sister, but she just got sick of it and hated to even hear the name "Blender." Eventually, though, I convinced her to take a tutorial and make some balloons, and now she uses it to create images, like me. She uses it for art, but I also use it to show people how things work.

So that's how I got Blender. If you're interested in trying it out, just go to the download page on blender.org, and download it. Maybe you'll find it as fun and useful as I do.

Tuesday, August 7, 2012

Flipping Quarters

Here's an interesting puzzle involving chance:

A man in a park asks you to play a game with him. It's a form of gambling. To play, you must pay the man $5, then flip a coin repeatedly until you get heads. As soon as you get heads, you stop flipping. If you only flipped the quarter once, he'll give you $1. If you flipped it twice, you get $2. Three times, $4. Four times, $8. Each extra flip gets you twice as much money, so the longer it takes before you get tails, the more money you get.

Should you play, if you have a lot of time and the man will play as many games as you want? How much money, on average, would you gain (subtracting the $5 fee)?

I will give the solution in a later post.