Report as inappropriate.
This demo exhibits the differences between standard movement and two different smooth mover classes.
Three sub-worlds were created, one for each helper class. The 3 classes are:
Non-helper: a class with no code to assist in movement;
SmoothMover: provided with greenfoot to assist actors in moving more accurately;
QActor: provided by me to assist actor in moving and turning more accurately;
All worlds have 6000 balls move toward a stationary ball to bounce off it. About 5400 balls actually bounce in each instance. All balls attempt to approach the still one at different y-coordinate values, all different by 1/100th of the size of one pixel. The important thing to look at are what reflected angles are taken. A trail is left by all balls after bouncing for inspection.
KEYS: 1-5 to change ball speed
MOUSE: on drop-down menu to change helper class
Source is given so that any questions about "fudging" (intentional) can be dismissed.
3524 views / 1298 in the last 7 days
4 votes | 1 in the last 7 days
This scenario is a member of: Demos by danpost
To embed this scenario in a web page, copy the following HTML code:
Want to leave a comment? You must first log in.