Some Java applets written by Jeffrey Rosenthal

Hi there! Click on the names below to view the corresponding applet. And please e-mail me with any feedback that you may have. Remember, "An applet a day keeps the doctor away!" :-)

See also the Markov chain applets below, my cartoon series, and some related JavaScript pages.

NOTE: Most browsers no longer support Java applets properly; see my notes about that. Fortunately, I have recently managed to embed the CheerpJ runner directly into applets. I have thus gotten soccer and tennismatch and spacetag and other applets below working well again -- try them!


Games: soccer, tennismatch, and spacetag.

My soccer applet simulates a one-on-one (or three-on-three) soccer (football) match. At what level can you beat the computer?

My tennismatch applet lets you interactively play tennis against a computer opponent.

My spacetag applet (my favourite, including a cash prize!) is a space game, where you fly around in a green ship and come across planets, space stations, bad guys, etc. See also the instructions.

Science simulations: evolution, manymoons, random walk, frogwalk, ehrenfest, buckets, uncunx, poisson, voting.

My evolution applet simulates the evolution of four amoebas into more powerful amoebas, in a "survival of the fittest" scenario.

My manymoons applet simulates a (randomly initialized) collection of N moons, circling each other under the influence of gravity. (Here is the corresponding source code.) Also available are a (periodic) two-body version and a (rather unstable) three-body version.

My random walk applet illustrates simple random walk, together with the famous "gambler's ruin" problem of classical probability.

My buckets applet illustrates the pouring of water into a triangular array of buckets -- sort of like Pascal's Triangle, but trickier.

My frogwalk applet simulates a 1/3,1/3,1/3 random walk on a discrete circle.

My uncunx applet illustrates that generalised quincunx device described in this paper.

My poisson applet illustrates that even if dots are placed uniformly at random, various "patterns" will seem to appear ("Poisson clumping").

Markov chain Monte Carlo (MCMC) simulations: exp, unif, slice, cftp, metropolis, pointproc, and option.

My first Markov chain simulation applet is "exp", which simulates a one-dimensional independence sampler Markov chain with exponential target distribution. This Markov chain was used as an example in a research paper, and is related to my research.

A second Markov chain applet is "unif". It simulates a one-dimensional Metropolis sampler Markov chain with exponential target distribution and uniform proposal distributions. Would you trust this sampler's results?

A third Markov chain applet, "slice", simulates a one-dimensional slice sampler. See how the chain's convergence properties depend on the nature of the target distribution.

A fourth Markov chain applet, "cftp", simulates a "coupling from the past" algorithm. See how to obtain an exact sample from a distribution, using only a Markov chain for which the distribution is stationary.

My fifth and most useful Markov chain applet, "metropolis", shows a simple random-walk Metropolis MCMC algorithm, including an adaptive option. Also available as a jar file, or as a related JavaScript version.

Another Markov chain applet, "pointproc", runs a Metropolis-within-Gibbs algorithm on a spatial point process.

See also my finance-related applet "option", which uses a Monte Carlo algorithm to estimate the maximum of a stock price over a time interval.

Computer Vision

I briefly got interested in problems in Computer Vision. See my "faces" computer vision applet and the related research paper.


Animation: The Space Adventures of Dr. J

I've also created a Java animation series, The Space Adventures of Dr. J. Enjoy!


There is also a Java applet of my Galactic Peace interactive fiction game.


[Boucing baton]

Animated Gifs   [Rotating maple leaf]

I have also experimented with creating animated gifs. I created the above rotating maple leaf with the help of the software whirlgif, which I installed on utstat.toronto.edu as /u/jeff/bin/whirlgif (with documentation at /u/jeff/bin/whirlgif.doc). To create the bouncing baton on the right, I also used the C package gd1.2.

[Bonus.com editor's choice award] Many thanks to Alan Rosenthal for helping me to get started with Java programming. Thanks to Gamelan, Bonus.com, TSN, Rochester's Jungle, zeeks.com, a Greek site, a Mexican site, a Japanese site, another Japanese site, The Valley, The Football Links, Web Arena, and the MCMC Preprint Service for linking to my applets in the past (they've mostly stopped now). See also my policy regarding the use of my applets on your web site.
[contact me / Computing Page / Nonwork Page / Home Page]