NTNUJAVA Virtual Physics LaboratoryEnjoy the fun of physics with simulations! Backup site http://enjoy.phy.ntnu.edu.tw/ntnujava/
March 27, 2019, 08:13:54 am
 Welcome, Guest. Please login or register.Did you miss your activation email? 1 Hour 1 Day 1 Week 1 Month Forever Login with username, password and session length

 Home Help Search Login Register
Discovery consists of seeing what everybody has seen and thinking what nobody has thought. ..."Albert von Szent-Gyorgyi(1893-1986, 1937 Nobel Prize for Medicine, Lived to 93)"

 Pages: [1]   Go Down
 Author Topic: Quiz: Do you know when two particles have the same horizontal speed?  (Read 12904 times) 0 Members and 1 Guest are viewing this topic. Click to toggle author information(expand message area).
Fu-Kwun Hwang
Hero Member

Offline

Posts: 3081

 « Embed this message on: July 13, 2008, 10:33:55 pm »

Registed user can get files related to this applet for offline access.
Problem viewing java?Add http://www.phy.ntnu.edu.tw/ to exception site list
If java program did not show up, please download and install latest Java RUN TIME

Click Play to start the simulation. Enter the time when you think those two particle have the same HORIZONTAL speed. (Enter into the text field and the answer will be shown).
You can change the initial velocity for both particle with your mouse (drag the RED arrow).
The horizontal velocity for the top one should be larger than the lower one.
The top one will move with constant velocity, while the second will need to move up the hill (with constant deceleration a=-g*sinθ)
You can also drag the yellow box to change the height of the slope.
Two traces shows X(t) for both particles.  Try to find out the answer from those two curves.

*** Remember: You need to hit ENTER after you enter the value. (the box turn yellow if you did not hit ENTER)

I hope you got the correct answer!

Registed user can get files related to this applet for offline access.
Problem viewing java?Add http://www.phy.ntnu.edu.tw/ to exception site list
If java program did not show up, please download and install latest Java RUN TIME
 Logged
lookang
Hero Member

Offline

Posts: 1792

http://weelookang.blogspot.com

 « Embed this message Reply #1 on: July 15, 2008, 08:51:35 am » posted from:Singapore,,Singapore

Feedback:
screen height can reduced a bit, currently can't see simulation n buttons in one view
The simulation is pretty cool, emphasis on the gradient concept of a X vs t graph gives the velocity.
I like it!

notice: t = 0 because when the field in yellow, user need to press enter key, so u need to inform them to remember to press enter? or has EJS 4.0 improved to take values in autodetect?

Question:
About the submit answer, can other people like me make assessment/ feedback strategies on our own simulation?

For Info:
I was doing something like this before
My Old Website:
http://66.7.205.91/~lookangc/indexold.html
My EJS Simulation on S.H.M.
http://66.7.205.91/~lookangc/_apps/_examples/weelookangspring05.app/weelookangspring05.html
Example Quiz: Click on that!
Very labor intensive for a good assessment and hints etc.
or a direct link
http://66.7.205.91/~lookangc/_apps/_examples/weelookangspring05.app/Q/weelookangshm01.htm

 « Last Edit: July 15, 2008, 09:00:38 am by lookang » Logged
Fu-Kwun Hwang
Hero Member

Offline

Posts: 3081

 « Embed this message Reply #2 on: July 15, 2008, 09:31:02 am » posted from:Taipei,T\'ai-pei,Taiwan

I checked out your web page. The way you did it, was implemented it with javascript code in html.
But What I did was implemented the answer in EJS, and the javascript code is used for sending data back to server and get user's record from the server. I tried to implemented it in a standard way. You can download the above EJS file and check out how I did it.

The following two methods were defined in the EJS, and the action for the text field input is checktime();
l_title is a String which will be displayed in the center of the simulation. The initial value is "";

public void checktime(){
if(!_isApplet() || server_control==0)
l_title=l_out1+dvalue(tmin)+l_out2+dvalue(Tmin)+ l_out3+ (100- (int)(Math.abs(Tmin-tmin)*100));
}
// _isApplet() is used to check if it were running as an applet. If it was not running as an applet (e.g. when you run it with EJS or click xxx.jar file directly to run it)
// server_control is another global variable defined, the initial value is 0.  Because user might have download the applet from our server and view the downloaded html file. The applet will be view locally (which was not connected to our server).
The above code to make sure user can run the simulation and find out the result when enter value into text field. But when it was running on our server, the String l_title will not be set (you can add whatever action you want).

public String ejs_commit(){
if(_isPaused() && t>0)checktime();
else l_title="";
return l_title;
}

The above function was defined so that it can be called directly from html with javascript. (You need to add mayscript="true" as part of applet tag. Check out the source code for this html and you will find the applet tag.

I add the button inside a form and add onclick function to call ejs_commit.
A javascript call was added (called when html is fully loaded) to set server_control to 1 so that l_title will be set to output when ejs_commit() was called.
Then I used AJAX to send result back to server and print out user's history records,too.

You can follow the above method on your server. There is a magic code you can add in this forum and the above javascript and forum will be added automatically. I can tell you via private message if you are interested. (Actually, you can find out how I did it, i.e. the secret code if you view my previous html source-- the one with the applet)
 Logged
lookang
Hero Member

Offline

Posts: 1792

http://weelookang.blogspot.com

 « Embed this message Reply #3 on: July 22, 2008, 02:52:07 pm »

test reply on iPhone
 Logged
melissawilliam09
Newbie

Offline

Posts: 1

 « Embed this message Reply #4 on: November 30, 2015, 05:44:08 pm » posted from:Karachi,Sindh,Pakistan

well, I honestly didn't know about it. I am here to explore my knowledge regarding this topic. Engagement levels are essential in this process. did it well. I encourage it.-*-
 Logged
 Pages: [1]   Go Up
Discovery consists of seeing what everybody has seen and thinking what nobody has thought. ..."Albert von Szent-Gyorgyi(1893-1986, 1937 Nobel Prize for Medicine, Lived to 93)"