News for hackers. Stuff that matters.
Re:Equations for Organic Motion by tlb on Tuesday November 27, 2012 @12:20PM (#4837706)
None of these look organic to me. I spent some time trying to get robot movements to look organic, and motion-capturing human movement. I believe no simple trig formula can generate plausible animal movements.
Re:Equations for Organic Motion by dljsjr on Tuesday November 27, 2012 @05:53PM (#4839755)
Simple is the operative word. I work for a robotics lab specializing in bipedal locomotion and we're developing a robot that exploits the periodic, superpositioned waveform nature of passive dynamics to produce a stable gait at varying speeds while only actuating at the hip. The mechanics behind the project involve tuning the sinusoid that governs the hip joint pitch in conjunction with the up/down motion at the knee. This tuning is done using a fairly neat tendon network since we only introduce mechanical power at the hip joint. The resultant behavior is clearly a non-linear controls problem, but at it's heart it's still trig. Just not simple trig.

The robot is modeled after an ostrich. You can read more about it on our organization's website if you want: http://www.ihmc.us/groups/fastrunner/

Re:Equations for Organic Motion by yolesaber on Tuesday November 27, 2012 @05:21PM (#4839520)
Do you have any algorithms or tips for writing algorithms that try to simulate animalistic movement? I've been looking for something along those lines for a project I'm doing in my robotics class.
Re:Equations for Organic Motion by lutusp on Tuesday November 27, 2012 @11:10AM (#4837545)
Yes, if periodic = organic. Otherwise these are generic trig equations with no particular relation to "organic" motion.

Are the orbital paths of planets "organic" or just interesting physics?

To me, a truly "organic motion" would be a differential equation that describes an organic process as a function of time, like the logistic function:

http://en.wikipedia.org/wiki/Logistic_function

This has the advantage of possessing an actual relation to organic processes, rather than being a member of a large class of functions that have no specific connection to life.

Re:Equations for Organic Motion by jessedhillon on Tuesday November 27, 2012 @04:52AM (#4836428)
Curious, this may be more of a philosophical question: what is the reason why these organic-seeming movements can be modeled mathematically, specifically with trigonometric functions? Why do biological processes seem to obey trig like so?
Re:Equations for Organic Motion by tolmasky on Tuesday November 27, 2012 @05:15AM (#4836497)
> what is the reason why these organic-seeming movements can be modeled mathematically, specifically with trigonometric functions?

Any motion can be modeled mathematically. There are probably infinite equations that provide "organic looking motion". I could make one that made really good looking motion but was really long and complex and you could have a parallel person asking "why is nature so messy and not giving us simple motion?". The insight here is to not attach any special significance just because "it looks organic". In reality what we are probably saying is that it "looks smooth". (In fact you could look at Bezier curves which are often used for animations to see non-trigonemtric examples, which while easy to define are relatively complex to actually run through http://en.wikipedia.org/wiki/Bézier_curve . All of iOS's built-in famous smooth animations use these.)

So let's break these down. All of these examples are periodic. So for starters we need a good periodic function. We could have started with y = |(x%2) - 1| ( http://tolmasky.com/letmeshowyou/notsmooth.png ). That would give us the back and forth motion we want, but would have not looked smooth, since we linearly increase, then linearly decrease, and in the middle abruptly change. Your eye would catch that abruptness and that's what would give it the "inorganic feel" (despite the fact that there are plenty of things in biology that are super abrupt).

So what we want instead is the same kind of back and forth, but rounding off the edges. You could imagine forming a function by taking a normal parabola (y=x^2) and an inverted one (y=-x^2), and putting them together to get the rounded bottom and top corners ( http://tolmasky.com/letmeshowyou/twoparabolas.png ).

Luckily for us, we've already discovered a class of functions that give us something similar in the form of sine and cosine. Now, the reason why these are smooth and periodic is simply because the values of these functions are derived from tracing along a circle ( http://www.galaxygoo.org/math/sineCurve.html ). Now that you know this, you have a "tool" for your mathematical bag of tricks: every time you want to do something smooth and periodic, you are probably going to reach for sine or cosine. Similarly, if you want to now tweak this and have things ramp up in speed or down, you could try using exponents, etc.

Hopefully this sheds a little light on what's going on here.

Re:Equations for Organic Motion by dietrichepp on Tuesday November 27, 2012 @05:04AM (#4836464)
Biological processes are composed of chemical processes, and chemical processes are often modeled with differential equations. The trig functions (sine and cosine) and the exponential function are all solutions to the simplest second and first order linear differential equations, respectively. You might equally ask why the planets follow the trig functions so closely when they orbit the sun, or why the shape of the Earth is close to a sphere, or why the first digit of the amount of money in your pocket has a roughly 30% chance of being 1, but only an 18% chance of being 2.
Re:Equations for Organic Motion by rodh on Tuesday November 27, 2012 @05:17AM (#4836503)
Would second order differentials imply linear acceleration?

Would we then always get better approximations the higher the order?

EDIT: I ask this because linear acceleration doesn't seem like something which might readily occur in nature.

Re:Equations for Organic Motion by dietrichepp on Tuesday November 27, 2012 @06:49AM (#4836728)
You can get constant (not linear) acceleration with a second order differential equation. Here is an example:

    d^2 x
    ----- = -g
    dt^2
Solving this gives us the parabola we are all familiar with, when an object falls under constant acceleration:

    x = -1/2 g t^2 + v_0 t x + x_0
This is a second order differential equation, but it is too trivial an example. Here is a more interesting differential equation:

    d^2 x
    ----- = -x
    dt^2
All solutions to this equation take the form:

    x = a sin t + b cos t
There are a lot of physical materials in nature which produce this kind of relationship between force and position. Basically, anything that is kind of like a spring. Reach over and flick a glass on your desk with your fingernail. Hear it ring? The sine wave that it's ringing with is predicted by the relationship between force and position that we understand. Every tuned musical instrument in the world, with one exception, generates notes that can be modeled by some differential equation. Pianos, violins, and horns are relatively easy; drums are much harder but still tractable.

The chemical and physical systems in living tissue are much more complicated. Our best models for them often incorporate nonlinear elements (the sine wave example is linear) or a large number of variables. But periodic behavior is still quite common, and the sine wave is in some senses the simplest function that is smooth and periodic.

Note: The one musical instrument for which differential equations are not the best model is the digital synthesizer.

Re:Equations for Organic Motion by arethuza on Tuesday November 27, 2012 @06:30AM (#4836681)
"Why do biological processes seem to obey trig like so?"

I'm not sure I would say that biological processes obey anything - merely that we can find it useful to describe real world behaviour in terms of these abstract mathematical functions. Of course, it's interesting to speculate if there is a link between the level of maths required to usefully model the real world and the level of maths we are happy working with - i.e. if the real world was much more complex would we also have developed a much more richer natural ability for mathematics.

Re:Equations for Organic Motion by xfs on Tuesday November 27, 2012 @05:00AM (#4836450)
Organic-seeming movements can be modeled with a sum of a set of sines and cosines. Are you talking about Fourier series?
Re:Equations for Organic Motion by andrewcooke on Tuesday November 27, 2012 @08:14AM (#4836968)
are you asking a reasonable question? do you have a clear idea of some regular change in size that would not "appear organic"? because i suspect that almost any smooth, repeating change would be acceptable... and if that's so, then your question is largely meaningless.
Re:Equations for Organic Motion by VMG on Tuesday November 27, 2012 @01:32PM (#4838021)
They are not organic, they are just smooth. Any other smooth motion probably would do.
Re:Equations for Organic Motion by scotty79 on Tuesday November 27, 2012 @04:07AM (#4836319)
I'm curious what equation would approximate best the human limb movement such as when I'm moving my hand in front of me from left to right.

I'm not sure why but for me even motioncaptured movements seem unnatural and give no illusion of life.

Re:Equations for Organic Motion by delinka on Tuesday November 27, 2012 @08:54AM (#4837079)
"...even motioncaptured movements seem unnatural and give no illusion of life."

I often agree with this. When digging deeper into the details of why this is the case, it's often because the motion captured data is played back on a model of different proportions than the actor. I think I first noticed this when a magazine article did a writeup on The Polar Express movie. There's a photo of Tom Hanks in a mocap suit beside a rendering of the train conductor in the same pose. The conductor's proportions were completely different from the real Mr. Hanks. I've also noticed this problem when ballet is mocapped and applied to computer models.

My opinion, since I'm no CGI expert nor hobbyist, is that actual natural movement has no place in a cartoon. You'll notice that each of Pixar's worlds maintains its own naturalness - Mr. Incredible moves the right way with respect to the 3D model in his own universe as do the other characters. Although they modeled Syndrome's swagger on a Pixar employee (or at least a real human if not a fellow Pixarite), that doesn't mean they applied an actual mocap session's data to the character model. Every time I've seen anything "behind the scenes" of a Pixar film, they're animating movement 'manually' and maintaining a 'natural' feeling within the context if the current project.

Re:Equations for Organic Motion by scotty79 on Tuesday November 27, 2012 @09:12AM (#4837157)
I agree about cartoons. The creation of movement is essential part of the uniqueness of given art piece. But I'm talking about endeavors that aim to create virtual version of reality, some games, movie fx etc.
Re:Equations for Organic Motion by malux85 on Tuesday November 27, 2012 @04:40AM (#4836403)
Maybe simply sin(x) and cos(x) with some limitations on how much it can flex.

If you look at your arm joint from the elbow up, keep your elbow in a fixed point you move your arm in a circular motion on a plane. The same applies for your hand on your wrist joint.

Extending that your arm moves in 3 dimensions so fixed point elbow means you can move your arm in a sphere.

But you cant reach every point on the sphere, because of the way the muscles work, which is why you need to limit it. It's really hard to get those limits right, which is why the artificial characters dont look natural .. if their hand moves to a point where your subconscious mind see's that position would be painful or impossible, then it looks unnatural.

My old calculus teacher used to always tell us to flip the paper around when you're drawing a curve, so the curve you're trying to draw moves naturally with the arc of your arm .. you get a much sexier curve that way.

Re:Equations for Organic Motion by modernerd on Tuesday November 27, 2012 @04:47AM (#4836414)
It depends how you move your hand, of course, but 'easeInOutQuint' from Robert Penner's easing equations[1] is a fairly good approximation of a hand, finger, or cursor moving quite quickly from one point to another in a straight line.

The movement is almost linear, except for the rapid acceleration when you hand begins to move and the rapid deceleration as it slows to focus on a point.

[1]: Example, with onion skinning: http://gizma.com/easing/ [requires Flash] (Check x and y under the "Qnt" column on the bottom row, then click anywhere in the box to move the ball.

Re:Equations for Organic Motion by graue on Wednesday November 28, 2012 @01:42AM (#4841330)
The demo for this jQuery easing plugin also allows testing the easeInOutQuint equation:

http://gsgd.co.uk/sandbox/jquery/easing/

Re:Equations for Organic Motion by joeyo on Wednesday November 28, 2012 @05:36AM (#4841866)
There are several ways to approach this, but one of the more common ones is to use minimum-jerk trajectories:

http://www.shadmehrlab.org/book/minimum_jerk/minimumjerk.htm

Re:Equations for Organic Motion by xfs on Tuesday November 27, 2012 @04:52AM (#4836427)
http://en.wikipedia.org/wiki/Fitts%27s_law

Movement time = Start/stop time + Speed * log (1 + Distance / Width of target)

Re:Equations for Organic Motion by wtracy on Tuesday November 27, 2012 @07:08AM (#4836779)
I get a mostly-blank page on Firefox 17. What browsers does this support?
Re:Equations for Organic Motion by nshepperd on Tuesday November 27, 2012 @07:57AM (#4836907)
Firefox 17 here. Mostly blank page, even after allowing whatever wanted to run in Noscript. But the page started working (although, without colours for some reason) when I disabled Noscript and restarted firefox.
Re:Equations for Organic Motion by wtracy on Tuesday November 27, 2012 @09:14AM (#4837174)
Huh. I'm a NoScript user, so that might be it. Thanks.
Re:Equations for Organic Motion by jobigoud on Tuesday November 27, 2012 @08:21AM (#4836988)
For me the animations work on Firefox 19 (Aurora) on Windows, but no colors.
Re:Equations for Organic Motion by chanux on Tuesday November 27, 2012 @07:34AM (#4836842)
Firefox 17 on Ubuntu 12.04. Works fine for me.
Re:Equations for Organic Motion by dbaupp on Tuesday November 27, 2012 @07:23AM (#4836817)
Doesn't work for me on Firefox nightly either.
Re:Equations for Organic Motion by zyb09 on Tuesday November 27, 2012 @06:58AM (#4836756)
nice, you can use these to get some really nice polishing in iOS apps. Thanks for sharing.
Re:Equations for Organic Motion by herdrick on Sunday December 02, 2012 @09:03PM (#4863531)
Those aren't right. There should be an abs() around each trigonometric function.
Re:Equations for Organic Motion by huhtenberg on Tuesday November 27, 2012 @05:02AM (#4836455)
This is very hypnotoad-ish.
Re:Equations for Organic Motion by twiceaday on Tuesday November 27, 2012 @02:48AM (#4836116)
Wouldn't it be both more robust and more efficient to use B-splines?
Re:Equations for Organic Motion by caster_cp on Tuesday November 27, 2012 @03:48AM (#4836275)
It would be certainly more efficient to actually simplify many of the obviously overly complicated "formulas" there. Just for the sake of argument, you achieve the same "effect" of sin(t)cos(t) with a simple sin(2t) (ignoring the 0.5 multiplying the sin that made the amplitude of the movement unnecessarily small).
Re:Equations for Organic Motion by worldsayshi on Tuesday November 27, 2012 @03:05AM (#4836158)
How would you substitute one for the other?