NTNUJAVA Virtual Physics Laboratory
Enjoy the fun of physics with simulations!
April 27, 2017, 10:28:32 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  
"Make priority, take action and start now." ...Wisdom
Google Bookmarks Yahoo My Web MSN Live Netscape Del.icio.us FURL Stumble Upon Delirious Ask FaceBook

Pages: [1]   Go Down
  Print  
Author Topic: Adding Ghost Trace images  (Read 13694 times)
0 Members and 1 Guest are viewing this topic. Click to toggle author information(expand message area).
mickey2times
Newbie
*
Offline Offline

Posts: 11


«
Embed this message
on: July 15, 2010, 08:13:16 pm » posted from:Boston,Massachusetts,United States

I have a simulation of two blocks racing.  You can input the initial position, initial velocity and acceleration of each object and see how their motions compare to each other.  I would like to add ghost traces that would leave a ghost image of each object's position at some set time interval (every 0.1 time unit or something).  And I am at a loss to figure out how to do this.

I attached my file if anyone wants to take a look.

Thanks in advance for any help.


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

Posts: 954



«
Embed this message
Reply #1 on: July 15, 2010, 08:25:33 pm » posted from:SAO PAULO,SAO PAULO,BRAZIL

Could you explain what kind of file that you attach,, the path is wrong.
« Last Edit: July 15, 2010, 08:27:44 pm by ahmedelshfie » Logged
mickey2times
Newbie
*
Offline Offline

Posts: 11


«
Embed this message
Reply #2 on: July 15, 2010, 09:23:55 pm » posted from:Boston,Massachusetts,United States

It was the EJS 4.0 .ejs file, (i guess what used to be xml file).  I have attached the exported jar file also.  I thought you could File>Open the .ejs file in the EJS Console (just have to choose your own directory path to import it into), but now that I think about it, you might need the newest version (4.3) of EJS, the older only accept .xml ... I think.

Not sure if that answered your question though, so if you have others please let me know.


*** There are 1 more attached files. You need to login to acces it!
Logged
Fu-Kwun Hwang
Administrator
Hero Member
*****
Offline Offline

Posts: 3079



WWW
«
Embed this message
Reply #3 on: July 15, 2010, 10:34:27 pm » posted from:Taipei,T\'ai-pei,Taiwan

What you can do is adding a trace GUI element.
You have set FPS=100 and time step is 0.01 s
If you want to set ghost image every 0.1 s, then you should set the Skip property to 9.
So that it only draw a marker every 10 input points.
You can set Connected property to false so that no line are connected between markers.

You need to select one of the Marker Shape and set a value for Marker Size.
Marker Color is optional.

You need to enter variable/expression for Input X and Input Y so that EJS can draw it.

There are more optional property you can set up. Please check out http://www.um.es/fem/EjsWiki/Main/ElementsTrace for detail information about each property.
Logged
ahmedelshfie
Ahmed
Hero Member
*
Offline Offline

Posts: 954



«
Embed this message
Reply #4 on: July 15, 2010, 11:02:12 pm » posted from:SAO PAULO,SAO PAULO,BRAZIL

Sorry for this wrong is my wrong. Wink
Logged
mickey2times
Newbie
*
Offline Offline

Posts: 11


«
Embed this message
Reply #5 on: July 16, 2010, 08:11:11 pm » posted from:Boston,Massachusetts,United States

Thank you very much for your help.  I knew it was there, just could not figure out what settings I needed to use.  With them added this sim will now be very useful with my first year high school students to really visualize the differences in various types of motion, and what constant velocity and acceleration really mean.

If anyone wants to look at the updated one, I attached the exported file.


*** There are 1 more attached files. You need to login to acces it!
Logged
Fu-Kwun Hwang
Administrator
Hero Member
*****
Offline Offline

Posts: 3079



WWW
«
Embed this message
Reply #6 on: July 16, 2010, 09:10:49 pm » posted from:Taipei,T\'ai-pei,Taiwan

You can make your simulation appear as an applet (like other simulations at this web site.)
You will find Upload new EJS jar file checkbox when you edit message (or create new topic).
It is located at the same line as "Post" button.

Click the checkbox, and you will find a button to upload the file from your local file folder.
The simulation will appear at the end of the message automatically.

You can even updated the jar when you edit the message (if you have new version), the procedure is the same as above.
I add  this feature so that user at this forum can share created EJS simulation easily. Please try it.
Logged
mickey2times
Newbie
*
Offline Offline

Posts: 11


«
Embed this message
Reply #7 on: July 19, 2010, 11:00:23 am » posted from:Allston,Massachusetts,United States

Hope this works, attempting to upload it as an applet.

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
Fu-Kwun Hwang
Administrator
Hero Member
*****
Offline Offline

Posts: 3079



WWW
«
Embed this message
Reply #8 on: July 19, 2010, 01:41:19 pm » posted from:Taipei,T'ai-pei,Taiwan

It was not working because the latest EJS use "ejs" replaced "xml" and it was not supported.
Another problem is that your ejs source is not begin with alphabet (your source stars with '2').
I tried to modified the code and change the data manually. It seems to be working now.
Logged
mickey2times
Newbie
*
Offline Offline

Posts: 11


«
Embed this message
Reply #9 on: July 19, 2010, 11:42:39 pm »

Thanks a lot again.  I just started out designing with EJS and you site is a great reference and help.
Logged
DonaSima
Newbie
*
Offline Offline

Posts: 1

«
Embed this message
Reply #10 on: September 26, 2010, 11:16:55 am » posted from:Bacolod,Bacolod,Philippines

Ghost image analysis is based on the built-in inverse ray trace algorithm, which does not require to rebuild the optical system.


__________________________
Espresso Coffee
« Last Edit: September 26, 2010, 11:23:16 am by DonaSima » Logged
Pages: [1]   Go Up
  Print  
"Make priority, take action and start now." ...Wisdom
 
Jump to:  


Related Topics
Subject Started by Replies Views Last post
Images formed with a flat mirror
Optics
Fu-Kwun Hwang 1 10386 Last post December 05, 2009, 10:49:10 am
by Fu-Kwun Hwang
Data images in project MetalicConductor
Questions related to EJS
ahmedelshfie 4 3754 Last post July 03, 2010, 10:21:35 am
by ahmedelshfie
Summation of three vectors (Adding three vectors)
misc
Fu-Kwun Hwang 2 13326 Last post August 23, 2012, 11:13:31 am
by 168hengbet
Summation of three vectors (Adding three vectors)
misc
ahmedelshfie 0 4642 Last post December 21, 2010, 05:18:33 pm
by ahmedelshfie
Adding Fraction
misc
Fu-Kwun Hwang 0 9818 Last post October 25, 2013, 07:33:37 pm
by Fu-Kwun Hwang
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 5.085 seconds with 22 queries.since 2011/06/15