Over a million developers have joined DZone.

JavaFX Library for Inverse Kinematics 2.0

DZone's Guide to

JavaFX Library for Inverse Kinematics 2.0

· Java Zone
Free Resource

The single app analytics solutions to take your web and mobile apps to the next level.  Try today!  Brought to you in partnership with CA Technologies

Last week I had to stay sick at home for a couple of days. On the positive side, I finally found some time to look into my old library for inverse kinematics. I wrote it a couple of years ago for JavaFX 1.x. And I decided to port it to JavaFX 2. The initial version is ready for download.

Screenshot Caterpillar

Fig. 1: Screenshot Caterpillar

The original library was written in JavaFX Script and looking at the code created some cozy nostalgic feelings. :) What a beautiful language! Doing the port was pretty interesting, because even though Java and JavaFX Script had many similarities, some of the concepts were extremely different. Definitely it was a fun exercise.

An initial version is ready and can be used. I plan to add more features later, which means the API may change at some point. There is no documentation ready right now except for some basic comments in the source code. But I added two examples, which are probably a good starting point. JavaFX veterans might remember these samples, because they are direct ports from the samples of the first version of the library.

Screenshot Dummy

Fig. 2: Screenshot Dummy

First there is the Caterpillar Demo. You can click anywhere in the window and the caterpillar will move there. Only the head is actually animated directly, the rest of the body is moved automatically using inverse kinematics.

The second example is a little dummy figure. You can drag the parts of its body and the rest will follow.

I also found the text of a tutorial I had written. Rewriting it to match the new Java API should not be a problem, but unfortunately I could not find the images that belong to the tutorial yet. I keep searching! :)

And finally, the most important part: the link. You can find the sources of the library including the code of the two samples on GitHub. Sources of javafx-ik.


CA App Experience Analytics, a whole new level of visibility. Learn more. Brought to you in partnership with CA Technologies.


Published at DZone with permission of Michael Heinrichs. See the original article here.

Opinions expressed by DZone contributors are their own.


Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.


{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}