Enjoy the fun of physics with simulations!

Backup site http://enjoy.phy.ntnu.edu.tw/ntnujava/

Title: Open Source Ejs Newton's First Law java applet Post by: lookang on November 25, 2008, 04:45:08 pm
Open Source Ejs Newton's First Law java applet
Newton's First Law EJS applet by lookang First law "A body continues to maintain its state of rest or of uniform motion unless acted upon by an external unbalanced force." This law is known as the law of inertia. http://en.wikipedia.org/wiki/Newton%27s_laws_of_motion This has a lot of potential of students doing by modifying equations in EJS. simple enough i hope! PS: press "Enter" on the keyboard when keying in new values? The input field need to be white (registered by applet), if it is still yellow (unregistered), press "enter" on the keyboard Title: Re: Newton's First LawPost by: lookang on November 25, 2008, 04:50:03 pm
adapted from F:\EasyJavaSimulation\EJS_4.1_081121\EJS_4.1\workspace\source\users\davidson\wochristian\newton_law
Newton's First Law Lex I: Corpus omne perseverare in statu suo quiescendi vel movendi uniformiter in directum, nisi quatenus a viribus impressis cogitur statum illum mutare. (Isaac Newton 1687) In 1687 Isaac Newton wrote in the Principia Mathematica "An object at rest will remain at rest unless acted upon by an external and unbalanced force. An object in motion will remain in motion unless acted upon by an external and unbalanced force." This law implies that it is possible to select a reference frame, called an inertial reference frame, in which a free particle moves without any change in velocity. The First Law is often simplified as follows: An object in motion will remain in motion unless acted upon by another force. What is interesting about this Ejs model is that dragging the on-screen ball or the arrow automatically change the model's variables. Double click on the green arrow in the Launcher table of contents tree to run the First Law model. You can drag the particle to set its position and you can drag the arrow to set the particle's velocity. The Ejs implementation of Newton's first law is very simple. The Evolution workpanel merely advances the position and time. x = x + vx*dt; y = y + vy*dt; t = t + dt; Note that the equals sign does not represent mathematical equality when used in Java code. The equals sign is a replacement operation that says: "Replace the value on the left hand side with the value of the expression on the right hand side." References: The First Laws model is a designed to teach Ejs modeling. Right click within the simulation to examine this model in the Ejs modeling and authoring tool. See: "Modeling Physics with Easy Java Simulations" by Wolfgang Christian and Francisco Esquembre, The Physics Teacher, November 2007, 45 (8), pp. 475-480. The Easy Java Simulations (EJS) manual can be downloaded from the ComPADRE Open Source Physics collection and from the Ejs website. Note: This simulation was created by Wolfgang Christian using the Easy Java Simulations (Ejs) modeling tool. You can examine and modify this simulation if you have Ejs installed by right-clicking within a plot and selecting "Open Ejs Model" from the pop-up menu. Information about Ejs is available at: The First Law model was built with the Easy Java Simulations (Ejs) modeling tool. Ejs is a Java program that enables both programmers and novices to quickly and easily prototype, test, and distribute packages of Java simulations. It can be downloaded from the Ejs website and installed (unzipped) into a directory of your choice. http://www.um.es/fem/Ejs An important feature of the programs in the jar file is that it was created in such a way that users can return to the Ejs authoring tool at any time to examine, modify, and adapt the Ejs models. Right-click within the simulation and select Open Ejs Model to invoke this feature. (You must, of course, have already downloaded and installed Ejs.) The Ejs authoring tool will appear. My contributions are 1. a slider time bar variable t...............yes!! i finally made one myself thanks to prof Hwang's comment about thinking about how to implement it in EJS. 2. ODE equation dx/dt = vx, dy/dt = vy instead of the equations originally 3. panel for inputs of variables like vx and vy so that students can explore when if scenarios source codedownload the *.jar for using the applet on standalone without internet connection. |