#### Archived

This topic is now archived and is closed to further replies.

# Help needed w/ sphere deforrmation

This topic is 5985 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hello, I am writing a "bouncy-ball" program that outputs renderman code to be rendered. I can get the ball to bounce fine, but there are no deformations. There are three parameters of a sphere centered around (0,0,0)that I have complete control of: it''s radius, the positive height, and the negative height. In my program now, I have a velocity vector (where the ball is going) which is affected by gravity. The ball is bouncing off of the floor, so for collision detection, I check if the ball is below a certain point--if it is, I get the inverse of the velocity vector about the y-axis (y is up in my program) I also have a coefficient of restitution, which is basically how much energy the ball loses as it hits the ground. Anyway, I am looking for help with making the ball deform as it hits the ground, any ideas? Thanks! -Pete

##### Share on other sites
You might consider modelling the internal pressure of the ball in small internal volume elements. If external pressures applied to the ball (like a reaction force distributed over a small surface patch) are greater than the internal pressure on that patch, then the balls surface will deform to balance the pressures. If you simulate this well enough, the result is that the ball bounces upward away from the surface as the pressure distribution on the inside and outside of the ball is different at all points that aren''t in contact with the ground. You''d also need to model the surface of the ball as an elastic medium... perhaps a set of 2D patches connected by springs?

Good luck with whatever you decide...

Timkin

##### Share on other sites
It depends on what your goals are. If you want to use this in a fast realtime environment, you're probably better off just scaling the ball in the direction of the hitnormal. This makes the ball squeeze a little bit, and gives the impression of a rubber ball. You might want to control the scaling factors in each direction and make them a little 'springy' so that the ball keeps deforming for a while after the collision.

If you want more realistic movement (for a simulation for example), the idea TimKin presented sounds ok.

Hmm i just read that your goals are to render it in renderman. I guess Timkin's Idea would be better than.. sorry..

Cheers!
Nick

[edited by - NickWaanders on June 2, 2002 5:39:36 PM]

1. 1
Rutin
37
2. 2
3. 3
4. 4
5. 5

• 11
• 10
• 13
• 101
• 11
• ### Forum Statistics

• Total Topics
632975
• Total Posts
3009666
• ### Who's Online (See full list)

There are no registered users currently online

×