Submitted by Dan on Fri, 08/19/2011 - 14:25
Posted in
still early days but follow the link to have a play
http://danthompsonsblog.blogspot.com/2011/08/my-first-animation-editor-with-bezier.html

still early days but follow the link to have a play
http://danthompsonsblog.blogspot.com/2011/08/my-first-animation-editor-with-bezier.html

Hey Dan, I saw this the other
Hey Dan, I saw this the other day - it's pretty awesome, I like what you've done. I'm wondering if it could be used to generate motion profiles for the new nanomoco? That would be pretty sweet =)
!c
Hey Chris, What do you mean
Hey Chris,
What do you mean by profiles? Do you mean, a text file that can be read into nanomoco? I guess it all comes down to how you want to lookup the curve at your end. For instance, I you thinking of a sample of the curve per time unit in a text file? or are you thinking of reconstructing the whole formula for bezier curve lookup in the arduino engine and just sending it the cv positions?
I guess it's all possible but I would think doing all the math in the Arduino could get quite cumbersome.
Well, the new engine being
Well, the new engine being worked will accept a number of pre-set positions (I'm shooting for 32) in a movement, and I'm thinking that from a most simple perspective, either communicating those positions directly to the nanomoco, or generating the Slim commands to output those positions.
I am game on other ideas on how to implement it, however.
I agree that doing the bezier curves directly in the arduino could be problematic, especially with the lack of a true division function and no floating-point co-processor in the Atmega chip results in serious issues with precision on fine calculations.
!c
So are all the preset
So are all the preset positions gonna be smoothstep interpolations like this? http://www.youtube.com/watch?v=vD_VCBO1lw4&feature=mfu_in_order&list=UL
I guess a you will need to make a decision at some point on how you plan on interpolating more than two set positions. If it's for timelapse I guess you can send as many positions as you want to. One for every playback frame. You could send a position and then send a click to serial buffer and then clear it ready to send the next position again and again for every playback frame of the final animation curve.
As you can imagine, things get a whole lot harder when you want to send that kind of data in real-time to an Arduino. For faster playback I would imagine you would need a big buffer or cache of some sort to store each frame position.
One day I hope to try this all out with a propeller chip. But for now I'm focusing on tinkering with the software.
Maybe you could extract velocity info from the curves and just send speed and direction info to the motors instead of position info. It's just a thought and might be a dead end. But might be worth a look.
Anyways keep up the awesome work!
Dan.
Dan, Sending speed and
Dan,
Sending speed and direction is no issue, and may be easier - nm firmware supports continuous motion with real-time speed change, so one could start at an extremely low speed (1 step/second), and then modulate speed and direction in real-time.
I have a Qt library in the works that takes care of all of this for you. (Simple calls like: axis->setSpeed(speed), etc.) Alas, porting it to Java will be a bit harder, but not impossible, as it relies on the signal/slots multi-threaded mechanism to manage serial communications, but this allows for up to hundreds of nodes on dozens of USB ports to be managed transparently within the software.
!c