|
-
Trainee coder
[HELP] Spring physics
...Well, it's not that kind of spring physics you’re probably thinking of, but I have no idea what else to call it.
Basically, I'm trying to replicate the effect of bending a flexible line (kind of like bending a fishing rod), but I'm having trouble with how to code it. Now, moving the line up and down with a set length should be fine (it'd just follow the physics behind a 'spring-board' effect), but I can’t wrap my head around the math needed when the 'radius' changes meaning the line should bend (because I want it to retain a set length - so it would have to bend to compensate for the change in distance from the origin).
I'm having a hard time explaining what I need help with let alone solving this myself, so I've made a quick diagram to illustrate the desired effect:

I realise this isn't a very simple task. I'd be REALLY grateful if anyone could share a link containing pseudo-code or the math needed for this kind of thing - I'm happy to learn it myself, I just don't know where to start. 
Viza.
-
Script kiddie
http://www.birchlabs.co.uk/ropephysics.swf
This the kind of thing you're looking for? My coding mentor, Namzorg, wrote that. Don't have the fla, but it's just an experiment so I'm sure he won't mind you decompiling it (would ask for permission but he mysteriously disappeared from the internet several years ago).
-
Elvis...who tha f**k is Elvis?
I think we are talking bezier curves here:
http://lab.andre-michelle.com/tag/bezier/
-
FK founder & general loiterer
its a normalised ik chain basically.
There is a tutorial on gotoandplay.it by milgra that will head you in the right direction.... basically you set an angular contraint on each segment have a read it should get you in the right direction
http://gotoandplay.it/_articles/2004...Kinematics.php
-
Trainee coder
Thanks a lot guys! 
You've all given me some nice advice. I think I'll go for inverse kinematics though.. I've always been interested in it, and there seems to be plenty of information/tutorials on the subject so I wont resort to pestering anyone here. 
Viza.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|