Sunday, April 11, 2010

Some math for gravity effect of hairstrands

Many thanks to Manuel who installed watchmath in our Blogger site so I could type in some math about hairs :)

In hair_properties.py, hairstrands are first created with a fixed length along normal of the head. We may denote the length as $l$. When gravity is applied the strand should fall, the shape of this fall looks like the graph of (for simplicity we consider our curves in 2 dimensions) \[y = -cx^4\]

where $c$ is a positive constant dependent on the gravity factor. It has the formula (I got this after working out some equations on Young's elasticity formula, considering hairstrand an elastic material)
\[
c=\frac{{2^{2g/3}}}{2^6}
\]

But this is only half of the complexity. We need to keep the hairlength as $l$, whatever our gravity factor is. We basically need to calculate $x$ and $y$'s for a given length $l$ and a given gravity factor g. Getting arc-lengths of $y=-cx^4$ is a brachistrochrone problem. Using the equation of the arc-length we want to know $x_0$ such that 
\[
\int_0^{x_0} \sqrt{ 1 + 16c^2x^6}dx = l
\]

The above integral can be converted to an elliptic integral of the first kind. And the answer to our question is the "inverse" of the above integral, meaning we need Jacobi elliptic functions .. (more to come)

6 comments:

  1. Thanks. This confirms my belief that mathematics is a horrible subject one should stay away from as long as possible. :)

    ReplyDelete
  2. looks complicated, but what with computer programing isn't? Keep up the great work.

    ReplyDelete
  3. Strange. I only see the raw Tex code on both my computers (running Firefox with various plugins), but on another computer the formulas are rendered, with both IE and Firefox. Not that I have any trouble reading raw TeX, but anyway.

    ReplyDelete
  4. must be a javascript problem. The TeX in blogspot works thru javascript from a third party site. If you disable javascript in any browser you will only see the TeX code. Maybe your two computers either disable javascript (which I doubt because posting requires javascript) or has some plugins that conflict with watchmath js.

    ReplyDelete
  5. http://chart.apis.google.com/chart?cht=tx&chl=\int_0^{x_0}%20\sqrt{1%2B16c^2x^6}dx=l

    works everywhere, since it's server side :D.

    ReplyDelete
  6. Yup, it was the NoScript plugin. I had instructed it to enable all scripts here, but for some reason only 7/8 scripts were allowed. Things look good after enabling everything again.

    ReplyDelete

© MHteam 2001-2010