NTNUJAVA Virtual Physics Laboratory
Enjoy the fun of physics with simulations!
July 24, 2014, 05:38:36 pm *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register  
"That their main business was not put into the mind knowledge which was not there before, but to turn the mind's eye towards light so that it might see for itself." ...Plato's advice to educators(429-347BC)
Google Bookmarks Yahoo My Web MSN Live Netscape Del.icio.us FURL Stumble Upon Delirious Ask FaceBook

Pages: [1]   Go Down
  Print  
Author Topic: Ejs Open source Newton's Cradle java Applet by Paco customized by lookang  (Read 13805 times)
0 Members and 1 Guest are viewing this topic. Click to toggle author information(expand message area).
lookang
Moderator
Hero Member
*****
Offline Offline

Posts: 1728


http://weelookang.blogspot.com


WWW
«
Embed this message
on: December 17, 2008, 04:37:00 pm » posted from:Singapore,,Singapore

http://home.phy.ntnu.edu.tw/~lookang/EJS_4.1_090115/NewtonsCradlewee_Simulation.html
Open source Newton's Cradle Applet by found in EJS 4.1 user/murcia/fem/mechanics
Ejs Open source Newton's Cradle java Applet by Paco customized by lookang

http://www.egglescliffe.org.uk/physics/physicists/newton/nlaws/collision.html
Collision Analysis
Assumptions:
  * Spheres are perfectly smooth
  * Collisions are head on.
  * Energy is purely translational and not rotational or vibrational

Embed a running copy of this simulation

Embed a running copy link(show simulation in a popuped window)
Full screen applet or Problem viewing java?Add http://www.phy.ntnu.edu.tw/ to exception site list
Press the Alt key and the left mouse button to drag the applet off the browser and onto the desktop. This work is licensed under a Creative Commons Attribution 2.5 Taiwan License
  • Please feel free to post your ideas about how to use the simulation for better teaching and learning.
  • Post questions to be asked to help students to think, to explore.
  • Upload worksheets as attached files to share with more users.
Let's work together. We can help more users understand physics conceptually and enjoy the fun of learning physics!


alternative 2 versions here
http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=1976.0 by Fu-Kwun Hwang !! Grin


* Open source Newton's Cradle Applet by found in EJS 4.1.PNG (55.68 KB, 1024x768 - viewed 167 times.)

*** There are 1 more attached files. You need to login to acces it!
« Last Edit: May 17, 2011, 02:12:35 am by lookang » Logged
Fu-Kwun Hwang
Administrator
Hero Member
*****
Offline Offline

Posts: 3053



WWW
«
Embed this message
Reply #1 on: December 17, 2008, 09:04:33 pm »

Paco is a Professor at Universidad de Murcia in Spain.

The following is the offical address (http://www.um.es/)
Universidad de Murcia. Avda. Teniente Flomesta, nº 5 - 30003 - Murcia · Teléfono
Logged
lookang
Moderator
Hero Member
*****
Offline Offline

Posts: 1728


http://weelookang.blogspot.com


WWW
«
Embed this message
Reply #2 on: December 18, 2008, 07:33:48 am » posted from:-,-,SINGAPORE

Yes! think the xml originally made by prof. paco, the tags and descriptions did not clearly state so i can't attribute future derived works.

i can only guess from the folder names.

thanks!

EJS 4.1 has a lot of improvements over EJS 3.47, everyone should get the latest version to try Wink

a cool Newton's Cradle applet that i always wanted to know how to make it a learning tool.

murcia is the name of the person? or is it Prof paco ? University of Murcia fem@um.es ?


My contributions are
1. changes made to sync top rectangle to appear directly above the string and mass for changing number of mass, n
2. input panel on the left
3. create a custom function drag() so that can read the codes clearly in a bigger view
4. added m"[j]"
5. add graph of ketotal, petotal tetotal
6. add angular momentum
7. added sound in collision
8. added dw[j]/dt = -g/l*Math.sin(alpha[j])-k*l*omega[j] for air resistance simulation
9. redesign the look and feel of the sliders bar etc
13May2011
added better controls
fix bug of KE = 0.5*m*l^2*omega^2
fix error by changing method back to BISECTION
made view more zoom in for increase in size


My learning journey for interactive balls mass, the codes i was looking for,
note: element is assigned variable name "ballMoved"

Code:
// Compute new angle and freeze the ball
alpha[ballMoved] = Math.atan2(x[ballMoved]-xTop[ballMoved],yTop-y[ballMoved]);
omega[ballMoved] = 0;

// Limit the motion
double maxAngle = Math.PI/2;
if (alpha[ballMoved]> maxAngle) alpha[ballMoved] = maxAngle;
if (alpha[ballMoved]<-maxAngle) alpha[ballMoved] = -maxAngle;

// Check for one ball moving the others
for (int i=ballMoved+1; i  if (alpha[ballMoved]>alpha[i]) { alpha[i] = alpha[ballMoved]; omega[i] = 0; }
}
for (int i=0; i  if (alpha[ballMoved]}

// Force constant rod length
for (int i=0; i  x[i] = xTop[i] + l*Math.sin(alpha[i]);
  y[i] = yTop - l*Math.cos(alpha[i]);
}
please note the codes has missing ++ symbols, due to forum's modified php?
so if you want to copy the codes go into the source xml files


source code
download the *.jar for using the applet on standalone without internet connection.
« Last Edit: May 13, 2011, 10:26:44 pm by lookang » Logged
aidooon
Newbie
*
Offline Offline

Posts: 1

«
Embed this message
Reply #3 on: October 10, 2010, 04:53:39 am » posted from:Slobozia,Ialomita,Romania

hello ppl. .
i am working on a simulation for this newton's cradle. .
i want to make the simulation myself
but i like to get use of this cute simulation in here. .
so may u please put here a full physical study for newton's cradle. . so that i can start working on the simulation. .
thanx alot . .
Logged
lookang
Moderator
Hero Member
*****
Offline Offline

Posts: 1728


http://weelookang.blogspot.com


WWW
«
Embed this message
Reply #4 on: October 10, 2010, 06:56:19 am »

The physical model is
. Var. = t      Increment   = dt
alpha=   omega
omega=   -g/l*Math.sin(alpha)-k*l*omega

All ejs models in this forum are open sourced.
Try to use ejs to read the codes.

Good luck!
Logged
ahmedelshfie
Ahmed
Hero Member
*
Offline Offline

Posts: 954



«
Embed this message
Reply #5 on: October 10, 2010, 07:00:15 am » posted from:Uberaba,Minas Gerais,Brazil

A good applet, i didn't see this applet before.
I have a comment about one thing the sound of applet seem fast more than movement.
May wrong in my browser Huh
  
Logged
lookang
Moderator
Hero Member
*****
Offline Offline

Posts: 1728


http://weelookang.blogspot.com


WWW
«
Embed this message
Reply #6 on: October 10, 2010, 07:51:45 am »

The code for the sound play and off is not good enough to handle multiple hits in very close time.
I don't know how to make it better.

But you are right ahmed, the problem is the code not powerful for the sound.
« Last Edit: October 10, 2010, 07:54:12 am by lookang » Logged
lookang
Moderator
Hero Member
*****
Offline Offline

Posts: 1728


http://weelookang.blogspot.com


WWW
«
Embed this message
Reply #7 on: October 11, 2010, 10:35:46 pm » posted from:Singapore,,Singapore

hello ppl. .
i am working on a simulation for this newton's cradle. .
i want to make the simulation myself
but i like to get use of this cute simulation in here. .
so may u please put here a full physical study for newton's cradle. . so that i can start working on the simulation. .
thanx alot . .
http://www.phy.ntnu.edu.tw/ntnujava/ntnujavazip.php?ejsuserjar=3114
Download the jar
Unzipped it
Inside the folders there should be the java file.
Can find?

I think you should be able to figure out the equations from the open sourced xml or java, do your own homework Wink

In a Newton's Cradle , hard steel spheres hang at rest side by side. If one or more of the spheres is displaced and released , near elastic collisions ensue. http://www.egglescliffe.org.uk/physics/physicists/newton/nlaws/collision.html

Collision Analysis
Assumptions:
   * Spheres are perfectly smooth
   * Collisions are head on.
   * Energy is purely translational and not rotational or vibrational
   * Collisions are perfectly elastic


alternative 2 versions here
http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=1976.0 by Fu-Kwun Hwang
« Last Edit: October 11, 2010, 10:46:29 pm by lookang » Logged
lookang
Moderator
Hero Member
*****
Offline Offline

Posts: 1728


http://weelookang.blogspot.com


WWW
«
Embed this message
Reply #8 on: October 12, 2010, 10:06:18 pm » posted from:Singapore,,Singapore

trying to make sound in array format.

but the sound still don't sound very realistic due to lack of intensity of hits proportional to sound loudness.

currently it just play the wav file


*** There are 1 more attached files. You need to login to acces it!
Logged
lookang
Moderator
Hero Member
*****
Offline Offline

Posts: 1728


http://weelookang.blogspot.com


WWW
«
Embed this message
Reply #9 on: May 13, 2011, 10:27:54 pm » posted from:Singapore,,Singapore

13May2011
added better controls
fix bug of KE = 0.5*m*l^2*omega^2
fix error by changing method back to BISECTION
made view more zoom in for increase in size

enjoy!


*** There are 1 more attached files. You need to login to acces it!
« Last Edit: May 16, 2011, 11:17:02 am by lookang » Logged
lookang
Moderator
Hero Member
*****
Offline Offline

Posts: 1728


http://weelookang.blogspot.com


WWW
«
Embed this message
Reply #10 on: May 15, 2011, 11:18:40 pm » posted from:Singapore,,Singapore

added 3D
work in progress!

Embed a running copy of this simulation

Embed a running copy link(show simulation in a popuped window)
Full screen applet or Problem viewing java?Add http://www.phy.ntnu.edu.tw/ to exception site list
Press the Alt key and the left mouse button to drag the applet off the browser and onto the desktop. This work is licensed under a Creative Commons Attribution 2.5 Taiwan License
  • Please feel free to post your ideas about how to use the simulation for better teaching and learning.
  • Post questions to be asked to help students to think, to explore.
  • Upload worksheets as attached files to share with more users.
Let's work together. We can help more users understand physics conceptually and enjoy the fun of learning physics!
Logged
lookang
Moderator
Hero Member
*****
Offline Offline

Posts: 1728


http://weelookang.blogspot.com


WWW
«
Embed this message
Reply #11 on: May 17, 2011, 02:53:45 am » posted from:Singapore,,Singapore

this simulation version has been replaced by Ejs Open Source Newton's Cradle Java Applet by Fu-Kwun & lookang http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=2195.0
enjoy!

my blog to make my Ejs simulations more searchable on the internet for open educational resource OER Smiley
http://weelookang.blogspot.com/2011/05/ejs-open-source-newtons-cradle-java.html



Logged
Pages: [1]   Go Up
  Print  
"That their main business was not put into the mind knowledge which was not there before, but to turn the mind's eye towards light so that it might see for itself." ...Plato's advice to educators(429-347BC)
 
Jump to:  


Related Topics
Subject Started by Replies Views Last post
Open Source Ejs Newton's First Law java applet
Collaborative Community of EJS
lookang 1 8820 Last post November 25, 2008, 04:50:03 pm
by lookang
Ejs Open Source Brownian Motion Gas Model Java Applet by Professor Paco & Hwang
Collaborative Community of EJS
lookang 7 9743 Last post April 19, 2012, 11:49:18 pm
by frodo
Newton's Cradle by lookang
Simulations from other web sites
ahmedelshfie 2 2466 Last post April 07, 2010, 07:37:34 pm
by ahmedelshfie
Ejs Open Source Newton's Cradle Java Applet by Fu-Kwun & lookang
Collaborative Community of EJS
lookang 6 10302 Last post July 26, 2011, 07:57:42 pm
by lookang
Ejs Open Source Newton's Mountain Projectile Orbits Model java applet
Collaborative Community of EJS
lookang 5 8473 Last post June 17, 2013, 07:34:00 am
by lookang
Powered by MySQL Powered by PHP Powered by SMF 1.1.13 | SMF © 2006-2011, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 0.077 seconds with 23 queries.since 2011/06/15