Posts Tagged ‘CGI’


MathsPig MathsPig MathsPig MathsPig MathsPig MathsPig MathsPig MathsPig MathsPig MathsPig MathsPig MathsPig MathsPig MathsPig MathsPig MathsPig MathsPig MathsPig MathsPig …………………………………………………. with Kerry Cue

May 21, 2015

Mathspig Hairy

Hellooooo My Little Hairy Creatures,

This week we have hairy maths coming out our ears, my friends. Not only will you find some  interesting hairy facts and figures below, you will find plenty of hairy math activities for hair crazy middle school students:

Hair Maths 1: The curly problem with curly hair

Hair Maths 2: Why CGI needs maths

Hair Maths 3: How OLD is your hair?

Hair Maths 4: The Great SHAMPOO rip off



Mathspig hair maths punishment

Mathspig has always had a THING about hair maths. And here are some funny, outrageous and challenging maths problems involving hair:

Eurovision Hair Math: When will Jedward’s hair be as tall as Jedward?

 Really Weird Geometric hair

How weird are maths teachers haircuts?

Mass Murderer or Maths teacher?



HOW MANY BAD HAIR DAYS in your life?

According to The Manchester Confidential a consumer survey found that the average British female will endure 7,332 bad hair days in a lifetime!!!!

How many years is that? Do the maths.

7,332/365 = 20.09 years 

0.09 x 365 = 32.85 = 33 days

O MY GOODNESS, 20 years and 33 days of BAD HAIR. 

Makes you wanna go back to bed or shave your head.

Hoo Roo




Hair Maths 1: The curly problem with curly hair

May 6, 2015

pic 0 mathspig hair maths 2


pic 1 Mathspig the curly Q

More about Troy’s $million hair here. Hair statistics including how many hairs a human has on their head here.

Mathspig studied hair chemistry at uni. Tricky stuff. Put simply, hair is made of long strands of protein called keratin held together by sulphur (and some hydrogen) bonds. To curl hair, the keratin strands in the outer curve of each hair has to be stretched with curling tongs or hair curlers, heated and dried. The bonds in each hair reform with one side longer than the other … Hence, the hair curls like gift-wrap ribbon. But high humidity allows hair to reabsorb water and straightened hair just goes psycho curly again!

pic 2 mathspig Hair PermThis excellent hair diagram comes from The Chemistry of Shampoo and Conditioner, in an article by EMMA Dux for the Royal Australian Chemical Institute

Some people are born with hair follicles that produce keratin at different rates across the follicle. They have curly hair. Hair perms chemically break and reform the sulphur bonds while the hair is held in small curlers (curly hair) or a very big curlers(relatively straight hair.) thus permanently curling the hair.

Here’s the Maths:

Curly hair looks like a 3D Helix.

pic 3 Helix Graph and Equation MathspigMore on 3D helix maths here

But, in fact, one strand of curled hair looks more like a spiral staircase.

The outer edge of the staircase is longer than the inner edge.

pic 5 HELIX spiral staircase

 pic 6 formula for curly hair

 More helix maths here.


Mathspig doesn’t expect Middle School students to plot a 3D Helix. But if they have started TRIGONOMETRY then they can see that the maths they are studying is used in CGIs for films and computer games in this case to generate realistic curly hair!!!! That’s cool. This maths was needed to model Merida’s curly hair in  BRAVE.

pic 7 Merida's Curly hair


Some middle school students could calculate some points on the helix.

Now students must be introduced to radians.

Simple EXPLANATION: Angles eg. 300 are not useful in calculations but fractions are very useful.

Eg. The circumference of a circle:

C = 2πr

Now imagine if you scan with a floodlight set at a radius of 1 km. So:

C = 2π

So the circumference is 2π.

You scan ¼ of a circle, the distance the light moves is ¼(2π)

or ½ π or 1.57 km (see below)

This measurement of an angle is in RADIANS.

00     = 0 circle = 0

450   = 1/8 circle = 2π/ 8 = 2 (3.14) /8 = 0. 79

900   = 1/4 circle = ½ π = ½ (3.14) = 1.57

1350   = 3/8 circle = ¾ π = ¾ (3.14) = 2.36

1800= 1/2 circle = π = 3.14

2250   = 5/8 circle = 5/4 π = 5/4(3.14) = 3.93

2700 = 3/4 circle = 3/2 π = 4.71

3150   = 7/8 circle = 7/4 π = 7/4 (3.14) = 5.50

3600 = 1 circle = 2π = 6.28


You will find Cos  tables at NASA Sine tables at Mathhelp

 Mathspig 3D helix table

Answer here: Answers- 3D Helix Table

 Advanced students may want to look at what the Uber Geek 3D Helix generating program at the free graph website PLOTLY here.


Hair Maths 2: Why CGI needs maths

May 6, 2015

Pic 0 mathspig hair maths 2a

 The challenge is to make CGI hair look real. This isn’t easy. Some CGI hair doesn’t need maths because it doesn’t move. Some CGI is just ugly. Eg.

pic 1 world's Worst CGI hair

More from the worst video game hair cuts ever here and here.

In the world of CGI hair, curly hair is the challenge. It is difficult to model.

According to Pixar animators:

Hair curls due to the way it is grown. Curly hair is almost like a ribbon, while straight hair is more tubular.

(Mike Seymour,Brave New Hair Fxguide)

pic 7 brave  hair

 You will find detailed maths used by Pixar to model Merida’s hair here.

pic 8 Merida's Hair Graphics

So straight hair swishes and curly hair springs or bobs.

pic 9 Ariel-the-little-mermaid

Ariel, the Little Mermaid, was meant to have curly hair, but animators stuck with a ‘flowing block’ of hair. Before Ariel Disney Princess often had up-dos.

pic 10 disney pricess dilemaProgress was made with Merida’s hair in the Disney/Pixar animation BRAVE. See BRAVE NEW HAIR WIRED and fxguide.

According to Rachel Gross of Wired Magazine in 2009 Chung’s team designed a new simulator named Taz, after the wild Looney Tunes character. It forms individual coils around computer-generated cylinders of varying lengths and diameters. The resulting locks stretch out when Merida runs but snap back into place as soon as she stops. Add a little randomness, some gravity, and more than 1,500 hand-placed corkscrews and flyaway wisps and voilà: hair with depth and texture viewers have never seen before. The result may look wild, but it’s not. “It’s very stylized, very controlled,” Chung says. No hair spray required.

Rachel Newar explained last year in the Scientific American that physicists have modeled the movement of a single curly hair.

pic 11 graph of single strand

But, co-author Pedro Reis, an assistant professor of mechanical engineering and of civil and environmental engineering at MIT noted. “ the geometry of a curly hair is highly nonlinear— a word we often use for something complicated.”

The model could also calculate curvature of steel pipes or other spooled material. “We were engineers trying to solve practical, useful problems from the start,” Reis says. “I’m not a professional hairstylist—I’m bald, actually.”

More @ Mashable Video here.

And, from Stanford, if you’ve ever been curious this is what a curly hair algorithm looks like ie. It is a computer program for curling graphic hair.

So you don’t have to eat your crusts after all.

What were mothers thinking!!!!


8. Create Awesome CGI for Harry Potter Films

September 16, 2013

Death Eaters Harry Potter

CGI of Death Eaters in Harry Potter and the Half-blood Prince

An article in The Guardian, UK, explained the link between Harry Potter and the Maths of fluid dynamics or flow (See pic below):

HarryPotter mathspig

‘(Alex)Hope, managing director of the visual effects firm Double Negative said:

“In Harry Potter [and the Half Blood Prince],

the opening sequence has Death Eaters flying across the river Thames, destroying the (Millennium) Bridge between St Paul’s and the Tate Modern.’

“The way you create that is people who understand computational fluid dynamics, they know how water moves. They take the physics that’s used in modelling rivers and the flow of water and apply that in our world. People doing it need an artistic sensibility as well.

alex-hope-double-negativeAn understanding of maths and science

is fundamental to many of the

disciplines in our industry.”

Now there is motivation, mathpiggies. To create Computer Generated Images for movies you need maths!!!!!!

More on Harry Potter Maths here.