changes made with learning:

1. rename the file to car.xml because of Ejs has a character restriction, else it will not run.

2. verify the physics of rolling down a ramp

// derivation by lookang

// F + TM*g*sin(angle) -f = ma N2L

// R*f = I*alpha N2L circular motion

// s = R*angle angular motion

// v = R*omega

// a = R*alpha

// therefore

// assume car = 4 wheels 2*fw and 2*rw

// F + TM*g*sin(angle) -2*Ifw/fwR*(a/fwR)- 2*Irw/rwR*(a/rwR) = TM.a

// since Ifw = 0.5*fwMass*fwR*fwR ;moment of inertia disc

// since Irw = 0.5*rwMass*rwR*rwR ;moment of inertia disc

// F + TM*g*sin(angle) = (TM+fwMass*fwR*fwR/(fwR*fwR)+rwMass*rwR*rwR/(rwR*rwR) )a

// therefore

// MI = (TM+fwMass+rwMass )

// or in general

// MI = (TM+k*TM) where k is the constant of I = k*TM*R^2

3. added slider L to control the length of ramp

4. allow the car to move beyond the range of Xinit to Lmin.

5. added angledegree

6 redesign the field to sliders, for consistent look

7 move thrust to bottom panel

8 move media player button to bottom right corner

9 autoscale true and square ==true for maximum view

10 move velocity into top panel

11 resize width = 600

12 added an axis to show the direction of down he slope as x' and y'. idea from

http://www.compadre.org/osp/items/detail.cfm?ID=824213 made bummer y height follow the carSize for better view

14 debug the event for ODE evolution to be more precise to account for the position of the car as well for both top and bottom bummer.

zero condition

if(v>=0) return 1;

if(x-carSize/2>=xbumpertop) return 1;

return x+carSize/2;

action

v = Math.abs(v)*e;

15 added provision for e coefficient of restitution

24 June 2010

16 made the mass of car, mass of rear wheel and mass of front wheel variables and controllable through fixed relationship

17 added options for physics of solid ball like a marble, a shell like a football, a cylindrical disc like a coin in addition to the 4 wheel car already made for simpler experiments in lower secondary.

18 debug the event to return 0 so as to allow the simulation to not end after v =0 resting on the bottom bumper if it is placed above the lowest point, for students to explore average speeds concept as in some real life activity. read the bottom posts for help from the master of applets FKH

19 added new codes to _pause() only if the bottom bumper is at the lowest point

20 added graphics of football

http://commons.wikimedia.org/wiki/File:Football_(soccer_ball).svg21 resize crop into a perfect square

22 graphics of marble

http://www.flickr.com/photos/cclau2003/3832161365/23 added transparent background, crop to a perfect square using gimp

http://www.gimp.org/downloads/24 made slider to appear with the selected objects

11 July 2011

fixed bugs

mainly

// derivation by lookang

// F + TM*g*sin(angle) -f = ma N2L

// R*f = I*alpha N2L circular motion

// s = R*angle angular motion

// v = R*omega

// a = R*alpha

// therefore

// assume car = 4 wheels 2*fw and 2*rw

// F + TM*g*sin(angle) -2*Ifw/fwR*(a/fwR)- 2*Irw/rwR*(a/rwR) = TM.a

// since Ifw = 0.5*fwMass*fwR*fwR ;moment of inertia disc

// since Irw = 0.5*rwMass*rwR*rwR ;moment of inertia disc

// F + TM*g*sin(angle) = (TM+fwMass*fwR*fwR/(fwR*fwR)+rwMass*rwR*rwR/(rwR*rwR) )a

// therefore

// MI = (TM+fwMass+rwMass )

// or in general

// MI = (TM+k*TM) where k is the constant of I = k*TM*R^2

fixed all the rest of the objects bug

added x graph as well

moved to the right side panel

added field and slider to all controls for finer control of values to investigate

added yellow hotspot to drag the slope up and down from

http://www.compadre.org/osp/items/detail.cfm?ID=11236 Sliding Down an Inclined Plane Model written by Wolfgang Christian

check outcome of simulations runs with Sliding Down an Inclined Plane Model written by Wolfgang Christian with the box, solid ball, car

check outcome of simulations runs with Rocket Car on an Inclined Plane Model written by Wolfgang Christian, Francisco Esquembre, and Mario Belloni

http://www.compadre.org/osp/items/detail.cfm?ID=8243 seems all values are similar now.

made v editable for angle = 0 case else there is no motion

done!