Progress is impossible without change; and those who cannot change their minds cannot change anything.
..."George Bernard Shaw(1865-1950, Irish dramatist, essayist and critic, Nobel Prize for Literature 1925)"

on: June 11, 2010, 11:42:50 pm » posted from:SAO PAULO,SAO PAULO,BRAZIL

This following applet Vertical Spring Created by prof Hwang Modified by Ahmed Original project Vertical Spring This is an applet related to a spring subject to gravitation force.

Reply #1 on: June 11, 2010, 11:56:10 pm » posted from:SAO PAULO,SAO PAULO,BRAZIL

This following applet is Mathematic function F(x), F(y) plot Created by prof Hwang Modified by Ahmed Original project Mathematic function F(x), F(y) plot

You can change different mathematic function for x or y coordinate, i.e. Fx(t), Fy(t) This simulation will plot it for you. For example: if you enter fx(t)=A*sin(w1*t), fy(t)=B*cos(w2*t) It will draw Lissajous pattern for you. The default setting is for someone who want to study variation of Lissajous pattern due to some other noise C*sin(w2*t).

This simulation display how air density, air pressure and temperature vary with altitude. h=44.3308 - 4.94654 P^{0.190263} where h = geopotential altitude (km), p=actual air pressure, Pascals However, pressure is convert to atm (1 atm= 101325 Pa).

h=44.3308 -42.2665 D^{0.234969} were used to calculate density from altitude h (km). The unit for density D is

The temperature is estimated with

You can drag the dot shown in the curve to change the altitude h (or drag the slider vertically up/down)

A ball bouncing back on the ground under gravitation force. This example shows you how to use event in EJS to take care of the bounding conditiion. (Check out event on evolution page under Model tab)

Reply #8 on: June 12, 2010, 01:40:57 am » posted from:SAO PAULO,SAO PAULO,BRAZIL

This following applet is A simple wave (moving concentric circles) Created by prof Hwang Modified by Ahmed Original project A simple wave (moving concentric circles)

Fond out how easy to create concentric circles with EJS. Please click "load ejs as signed applet". You will need to give permission for browser to load ejs. And you will find out how this applet was created with EJS. You can modify it and generate new simulation,too!

This is a simple model created with EJS. The mass for two particles are the same initially. Use mouse to drag the slider to change the velocity for one of the particle. You will find the velocity exchanged when collision occurred. Then, drag the slider to modify the mass for the particles, the situation getting complicated. However, the momentum is always conserved.

The following is an examples to include a quicktime movie in the simulation. User is asked to adjust the parameter so that the simulation can re-product the same period of pendulum motion as the background movie.

P.S. This applet need to be signed to be able to view correctly (due to restriction in quicktime movie). Please download it and run it as an application (and it will be fine).

Reply #12 on: June 14, 2010, 07:07:21 pm » posted from:SAO PAULO,SAO PAULO,BRAZIL

This following applet is Fall and Rebound Created by prof Hwang Modified by Ahmed Original project Fall and Rebound

Fall and Rebound How do we simulate a (free) falling object? Well, the answer, in principle, is rather simple: just solve the equation y'' = -g, where g is gravity. And this works, perfectly well... except when the object reaches the ground. Then, we would expect the object to rebound. When rebounding, the object changes instantly its velocity from downwards (negative) to upwards (positive). If the rebounding is perfectly elastic, then the object's velocity remains constant in modulus. But, how would you implement this in a simulation? This example shows two possible approaches to solve this problem. The first one uses the closed form solution of the equations for the movement. It is fast, clean and efficient. But implies that we know the solution. In other, more complicated situations, we might not be able to solve these equations. For instance, if there is an external variable force applied to the falling object. The second approach implies fine-tuning the way we solve numerically the second order differential equation at every moment. When the object comes closer to the ground, we ask the method to use a smaller time step. This provides a more accurate computation of the velocity the object had when reaching the ground. The disadvantage is that the simulation seems to run slower at the critical moment. We try to compensate this, by asking Ejs to run faster! Author : Francisco Esquembre

From an original idea from Taiwan Workshop on Ejs Date : March 2002

Reply #13 on: June 15, 2010, 06:55:05 pm » posted from:SAO PAULO,SAO PAULO,BRAZIL

Predators and preys The historical introduction to the problem of predator and preys can be found in the other example with a similar name (which you should see first). In that example, the classical approach of Lotka and Volterra was introduced. In this simulation, we will try to really simulate how predators and preys coexist in a reduced piece of land. We need to describe how preys reproduce and feed predators (so to say), and how predators reproduce accordingly. To make it a bit more realistic, both, predators and pres move in each evolution step, and it is only if they meet that a predator can find its lunch! The goal is to be able to produce a setting in which both species coexist with their respective population showing a (more or less) stable alternating behaviour.

There are plenty of activities that can be done here. Although you are presented with three slighty different solutions for this problem which give reasonable results, perhaps the most interesting activity is to clear the corresponding evolution pages and ask your students to provide their own specification for what the mutual interaction of these two species should be. This can be presented to your students as a kind of team competition game. The team which produces a more stable final solution wins!

1. Even if you give them the solution included in the example, you can ask them to find appropriate values for the parameters. It took me a lot of time to get to find the ones I include here. If you look closer at them, they look more parameters for an infection than parameters for tigers and rabbits. There is a reason for this. Simple models (like Lotka-Volterra) are suitable for simple situations only. 2. Try to improve the haunting scheme (make it more intelligent, let predators smell food from longer distances,...) and see if you can improve the result. 3. Implement a reservoir of preys, where predators can not get in and see if you can improve the result.

Reply #14 on: June 18, 2010, 06:46:43 pm » posted from:SAO PAULO,SAO PAULO,BRAZIL

Earth and Moon This is a simulation of a reduced two-body problem. I have used data for the Earth and the Moon just to make it more attractive . The rotation is simulated using animated gifs. However, in slow machines, this can unnecesarily waste some computer resources. Hence, if the simulation behaves strangely, substitute the animated gifs for the static ones you will find in the data directory. The difficult part is certainly to set up initial conditions so that the elliptical orbit has a period that approximates the real one of the Moon around the Earth. As an exercise for your students, delete the initialConditions initialization page and ask your students to reproduce it!

Author : Francisco Esquembre Original project Earth and Moon

Reply #15 on: September 20, 2010, 05:56:37 pm » posted from:SAO PAULO,SAO PAULO,BRAZIL

This applet is Particles 3D Design by Francisco Esquembre. Particles 3D: This is a simulation of a set of particles moving freely inside a 3D cube and colliding with a moveable floor. The state it is now, the example is just a show-off of the 3D capabilities of Ejs, but... can you think of an application to gas dynamics?

Progress is impossible without change; and those who cannot change their minds cannot change anything.
..."George Bernard Shaw(1865-1950, Irish dramatist, essayist and critic, Nobel Prize for Literature 1925)"