JSci Examples

Chaos Applets

This collection of applets plots the orbits of some well known 2D chaotic maps. All use the chaos package.

Gingerbread Man and source code
Standard and source code
Henon and source code
Cat and source code (plot,transform)

Then, there is the obligatory Mandelbrot applet:
Mandelbrot and source code

CurveFitter

Uses the LinearMath.leastSquaresFit method to fit a polynomial to a user-drawn curve. The LineTrace graph component is used to input the curve.

java CurveFitter
Source code

Denoise

Denoises the astronomical spectrum of a faint galaxy. Uses the wavelet package.

java Denoise
Source code

DistributionGenerator

Generates random numbers from a probability distribution. Uses the statistics package.

java DistributionGenerator
Source code

FourierDisplay

The Fourier transform of a selected function is calculated using the FourierMath class. A LineGraph component is used to display both the real and imaginary parts of the result.

java FourierDisplay
Source code

GraphDemo

A simple program that demonstrates how to use the Swing/AWT graph components.

java GraphDemo
Source code

HEPsimulator

Works out all the possible two particle products from either a two particle collision (particle accelerator) or a single particle decay (bubble chamber). This is a good example of how the particle package can be applied.

java HEPsimulator
Source code

Mechanics

Collision
Two-body collision simulator. The ClassicalParticle2D class is used to calculate the outcome of a collision between two particles.

java Collision
Source code

Rotation
Hit the bar by dragging the mouse! Uses the RigidBody2D class.

java Rotation
Source code

MonteCarlo

Calculates the ground state energy of the Helium atom using variational quantum Monte Carlo. It displays the results on the screen and also writes them to a file using the JSci.io package.

java MonteCarlo <number of iterations>
Source code

PeriodicTable

A basic periodic table program. It demonstrates the usage of the chemistry package. It will even run under the J2ME Personal Profile.

java PeriodicTable
Source code

Quasicrystal

Calculates the phonon modes of a one-dimensional Fibonacci quasicrystal. It also saves the results to a file using the JSci.io package.

java Quasicrystal <length of chain> <mass of atom 1> <mass of atom 2>
Source code

Wavefunction

Numerically solves the Schrödinger equation for the anharmonic potential. The eigenvalue problem is solved using the LinearMath class and the LineGraph class provides the means to display the results.

java Wavefunction
Source code


Return to the Developer's Guide contents.