inverse kinematics

yair reshef's icon

hi all, been dabbling with inverse ik for fun.
cant get it, i believe its something with my transform order in opengl.
any help would be excellent.
there are some resources on the net. the one i've followed.
www.friendsofed.com/samples/1590595181.pdf

i guess OO would be a better approach but i'd like to tackle this in plain
max.

Max Patch
Copy patch and select New From Clipboard in Max.

Bas van der Graaff's icon

I don't know a second thing about IK, but it sure is a fun patch to play around with.

What exactly should the red arrow be doing, just follow the gray one?

Max Patch
Copy patch and select New From Clipboard in Max.

Matthew Lewis's icon

On Apr 15, 2007, at 10:34 AM, yair reshef wrote:

> hi all, been dabbling with inverse ik for fun.
> cant get it, i believe its something with my transform order in
> opengl.
> any help would be excellent.

quick fix: swap sin and cos and it'll work (i.e. x=sin, y=cos)
or... they did dy/dx in the pdf, and you did dx/dy in the patch...

--
Matthew Lewis
Advanced Computing Center for the Arts and Design (ACCAD)
The Ohio State University
http://accad.osu.edu/~mlewis

lists@lowfrequency.or's icon

that patch is fun.

on a side note, I've been meaning to make a GUI widget that turns
circular mouse movements into rotation information... so here it is
based in part off of your patch. It's probably not the most
efficient or correct way to do it, but it works!

Called "Spinner.pat" - http://lowfrequency.org/interactivity/wiki/
index.php?title=User:EvanR

cheers
evan

On Apr 16, 2007, at 7:58 PM, Matthew Lewis wrote:

> On Apr 15, 2007, at 10:34 AM, yair reshef wrote:
>
>> hi all, been dabbling with inverse ik for fun.
>> cant get it, i believe its something with my transform order in
>> opengl.
>> any help would be excellent.
>
> quick fix: swap sin and cos and it'll work (i.e. x=sin, y=cos)
> or... they did dy/dx in the pdf, and you did dx/dy in the patch...
>
> --
> Matthew Lewis
> Advanced Computing Center for the Arts and Design (ACCAD)
> The Ohio State University
> http://accad.osu.edu/~mlewis
>

yair reshef's icon

thanks Matthew, i had a few problems with my syntax, and of course your fixes were in need.
here is a revised patch. most of this stuff can be subpatched...

Max Patch
Copy patch and select New From Clipboard in Max.

nesa's icon

fantastic!

thanks for sharing,
nesa

On Apr 17, 2007, at 5:45 PM, yair reshef wrote:

> #P

Wetterberg's icon

yeah, it's really a sexy little bit of Jitter code - yair, I might be
crazy, but I seem to recall a youtube video of you controlling a jitter
object with an accelerometer of sorts?!? - it looked like a red kite
with a long tail, and using this code to build on that would be awesome.

Andreas.

nesa skrev:
> fantastic!
>
> thanks for sharing,
> nesa
>
> On Apr 17, 2007, at 5:45 PM, yair reshef wrote:
>
>> #P
>
> .
>

yair reshef's icon

i posted an update but the forum rejected it, mybe the list also.
first, thanks for the kind words guys.

Andreas, the method i used in the video was getting the position of the tracker and pushing the previous positions down a matrix, then used wes line2quad to opengl it.
here it is, cuz watching is fun.
http://www.youtube.com/watch?v=FvWerivk3UE -this is a bit rough
http://www.youtube.com/watch?v=EsPtW59Ozac -better

i tracked a conductor baton and made a nice simple polygon trail of his motion, it turned out nice.
at the end i didn't use the accelerometer (sensetive) but 2 position-synced unibrain cameras , one with an IR filter and the other without.
the first for tracking the ir led and the other for color video

yair reshef's icon

and this is a poly~ version for the ik patch.
i had a problem with poly,
taking the output of a poly and sending it into the next poly.
used sprintf, thispoly~, and forward - but i would be happy to hear of a better way.

d17e's icon

>
> here is the footage+patch
> http://art2please.com/upload/max/tracker/
>

This appears to be down...

yair reshef's icon

i followed thru with the code, previous was still forward kinematics, reel
ik is this.
it works bbut more work is needed before i can make the number of limbs
dynamic.
its hard to "loop backwards" in max, as is called for this to work.

Max Patch
Copy patch and select New From Clipboard in Max.

btw. david, its on my home server, please try again.

On 4/18/07, david vandenbogaerde wrote:
>
> here is the footage+patch
> > http://art2please.com/upload/max/tracker/
> >
>
> This appears to be down...
>
>
>
>

tim_thompson@mac.com's icon
Nadav Assor's icon

great work man, very elegant. imagine what this could do when attached to the end of a certain conductors wand...
-n

yair reshef's icon

nadav, you owe the list a certain patch dont u? ;)