Modeling a trampoline

Official forum for the Chipmunk2D Physics Library.
Post Reply
blachman
Posts: 4
Joined: Thu Jan 08, 2009 12:23 pm
Contact:

Modeling a trampoline

Post by blachman »

I'm trying to model a trampoline. I've tried a bunch of different approaches, some working better than other's but nothing be very "real" feeling.

The model that's looked best so far is a chain of small circles attached to eachother with pivot joints and a spring at each end of the chain. the problems with this is that as it's stretched it allows objects to fall through it. Also it seems really hard to tune to get the correct "bounciness" (the relation of the springs k to the falling objects mass seems wrong). In addition the use of circles sometimes gives a weird bounce trajectory.

I've also tried chains of objects (circles, polys, segments) connected to eachother with springs (this yields very jittery, slow, inaccurate results). My most recent attempt was a set of segments connected by slide joints with each segment having a spring to a static object that returns the segment to a resting position.

Anyone have any thoughts on another approach or tweaks to something I've already tried to get better results?

Thanks.

->Ben
User avatar
slembcke
Site Admin
Posts: 4166
Joined: Tue Aug 14, 2007 7:13 pm
Contact:

Re: Modeling a trampoline

Post by slembcke »

Trying to simulate the actual trampoline is going to be difficult, slow and error prone.

Fake the physics of the trampoline. Treat it like a spring where the force is based on the penetration depth. If you want it to draw all fancy as well, fake that too. Use Jakobsen style particle physics for an inexpensive rope simulation for the trampoline surface.
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
blachman
Posts: 4
Joined: Thu Jan 08, 2009 12:23 pm
Contact:

Re: Modeling a trampoline

Post by blachman »

Hmm. Interesting thought. How would you implement the "spring" force in chipmunk? It seems like a simple spring would just reflect the ball back on its approach trajectory instead of the not quite bounce you should get off a trampoline. I guess you'd also have to change the stiffness of the spring based on the location on the trampoline since the outside edges aren't as bouncy as the center.

Thanks for the response.

->Ben
User avatar
slembcke
Site Admin
Posts: 4166
Joined: Tue Aug 14, 2007 7:13 pm
Contact:

Re: Modeling a trampoline

Post by slembcke »

Calculate and apply the force yourself. Only apply it in the direction the trampoline is facing, and fade the force out based on how close to the center you are. It would be pretty easy.
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
Post Reply

Who is online

Users browsing this forum: No registered users and 16 guests