NTNUJAVA Virtual Physics Laboratory
Enjoy the fun of physics with simulations!
Backup site http://enjoy.phy.ntnu.edu.tw/ntnujava/
October 19, 2017, 01:50:38 am *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register  
Know yourself. Questioning. ...Socrates (469-399 BC)
Google Bookmarks Yahoo My Web MSN Live Netscape Del.icio.us FURL Stumble Upon Delirious Ask FaceBook

Pages: [1]   Go Down
  Print  
Author Topic: Help with simulation "Feynman QED" in EJS/board:26-101-  (Read 17963 times)
0 Members and 1 Guest are viewing this topic. Click to toggle author information(expand message area).
jirischamberger
Newbie
*
Offline Offline

Posts: 11


«
Embed this message
on: December 23, 2010, 02:36:57 am » posted from:Bílina,Ustecky kraj,Czech Republic

Hallo, i am trying to make the simulation based on the Feynman QED (as you can see on the pictures below) in EJS, but to say the true, i dont even know how to start. My goal is : Two mirrrors, which can be changer (straight and concave), the user will click on any place in the mirrors and in the second window he will see the summation of probability amplitudes. Can anybody help me, please ?


* feynman2.jpg (38.14 KB, 496x462 - viewed 303 times.)

* feynman3.png (120.32 KB, 980x430 - viewed 304 times.)
Logged
Fu-Kwun Hwang
Administrator
Hero Member
*****
Offline Offline

Posts: 3080



WWW
«
Embed this message
Reply #1 on: January 15, 2011, 10:21:43 pm » posted from:Taipei,T'ai-pei,Taiwan

Does the following simulation is what you need?

You can drag S,P to different location.
The red segments show the path which is shertest distance (or smallest time value).

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
jirischamberger
Newbie
*
Offline Offline

Posts: 11


«
Embed this message
Reply #2 on: January 23, 2011, 03:14:09 pm » posted from:Bílina,Ustecky kraj,Czech Republic

Yes, that is exatly what I needed. Thank you very much  Smiley Smiley
Logged
ahmedelshfie
Ahmed
Hero Member
*
Offline Offline

Posts: 954



«
Embed this message
Reply #3 on: January 24, 2011, 08:43:52 am » posted from:SAO PAULO,SAO PAULO,BRAZIL

In my opinion is excellent applet, thanks prof Hwang for the wonderful work  Smiley
Logged
jirischamberger
Newbie
*
Offline Offline

Posts: 11


«
Embed this message
Reply #4 on: February 27, 2011, 07:44:53 pm » posted from:Bílina,Ustecky kraj,Czech Republic

I have tried this simulation in a different way : You can drag each point or you can generate (random or Gaussian) the points positions. But I have one problem : Somewhere I do a mistake and I cannot properly display the graphical summation of vectors. Can you help me, please ? Thank you. 


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

Posts: 3080



WWW
«
Embed this message
Reply #5 on: February 27, 2011, 08:47:48 pm » posted from:Taipei,T\'ai-pei,Taiwan

I do not understand what is the problem ?
Could you create snapshot of the image for your simulation (right click mouse and select snapshot) when the problem occurs?
Explain what you want and what you have in the current program.
There is no way to help if I do not understand what is the problem.
Logged
jirischamberger
Newbie
*
Offline Offline

Posts: 11


«
Embed this message
Reply #6 on: February 28, 2011, 12:21:28 am » posted from:Bílina,Ustecky kraj,Czech Republic

Hi, my problem is that i cannot display properly summation of vectors (and resultant vector). It should be looked like Cornu spiral, i think, but I cannot link vectors to each other (vetor A to B, then to C etc. and finally resultant vector), and I cannot find mistake. Thank you.


* summation.jpg (19.87 KB, 433x277 - viewed 299 times.)

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

Posts: 3080



WWW
«
Embed this message
Reply #7 on: February 28, 2011, 08:23:13 am » posted from:Taipei,T\'ai-pei,Taiwan

Quote
d1 = Math.sqrt((x1-x2)*(x1-x2)+(y2-y1)*(y2-y1))+ Math.sqrt((x4-x2)*(x4-x2)+(y2-y1)*(y2-y1));
d2 = Math.sqrt((x1-x29)*(x1-x29)+(y2-y1)*(y2-y1))+ Math.sqrt((x4-x29)*(x4-x29)+(y2-y1)*(y2-y1));
d3 = Math.sqrt((x1-x26)*(x1-x26)+(y2-y1)*(y2-y1))+ Math.sqrt((x4-x26)*(x4-x26)+(y2-y1)*(y2-y1));
d4 = Math.sqrt((x1-x24)*(x1-x24)+(y2-y1)*(y2-y1))+ Math.sqrt((x4-x24)*(x4-x24)+(y2-y1)*(y2-y1));
d5 = Math.sqrt((x1-x22)*(x1-x22)+(y2-y1)*(y2-y1))+ Math.sqrt((x4-x22)*(x4-x22)+(y2-y1)*(y2-y1));
d6 = Math.sqrt((x1-x23)*(x1-x23)+(y2-y1)*(y2-y1))+ Math.sqrt((x4-x23)*(x4-x23)+(y2-y1)*(y2-y1));
d7 = Math.sqrt((x1-x25)*(x1-x25)+(y2-y1)*(y2-y1))+ Math.sqrt((x4-x25)*(x4-x25)+(y2-y1)*(y2-y1));
d8 = Math.sqrt((x1-x28)*(x1-x28)+(y2-y1)*(y2-y1))+ Math.sqrt((x4-x28)*(x4-x28)+(y2-y1)*(y2-y1));
d9 = Math.sqrt((x1-x32)*(x1-x32)+(y2-y1)*(y2-y1))+ Math.sqrt((x4-x32)*(x4-x32)+(y2-y1)*(y2-y1));
d10 = Math.sqrt((x1-x27)*(x1-x27)+(y2-y1)*(y2-y1))+ Math.sqrt((x4-x27)*(x4-x27)+(y2-y1)*(y2-y1));
d11 = Math.sqrt((x1-x30)*(x1-x30)+(y2-y1)*(y2-y1))+ Math.sqrt((x4-x30)*(x4-x30)+(y2-y1)*(y2-y1));
d12 = Math.sqrt((x1-x31)*(x1-x31)+(y2-y1)*(y2-y1))+ Math.sqrt((x4-x31)*(x4-x31)+(y2-y1)*(y2-y1));
The above is a copy from part of your code. It is very difficult to read or debug your code.
This is not the way to write a program.
You should have defined an array (e.g. d[12]) and do it with a for loop.
Do the same for x,y,phase, ...

You might want to check out my ejs source from the above example  to find out how to do it with a loop.
Logged
linjin
watchlist
Newbie
*
Offline Offline

Posts: -9

«
Embed this message
Reply #8 on: March 03, 2011, 01:59:52 pm » posted from:Putian,Fujian,China

go off work, walk on white streets, windy, but feet from warm feeling, but didn't feel a

bit cold, I really like this pair of ugg boots, good warmth, if you want to buy, to "site"

purchase, price cheap... Wear comfortable...
Logged
jirischamberger
Newbie
*
Offline Offline

Posts: 11


«
Embed this message
Reply #9 on: April 24, 2011, 02:55:34 pm » posted from:Bílina,Ustecky kraj,Czech Republic

I finally did it. You can change number of path (maximum 100), you can drag Source and Detector, you can drag the points on the mirror. Red ray is the minimum time, green rays are the closest to minimum, you can change lambda. What do you think ?
Logged
jirischamberger
Newbie
*
Offline Offline

Posts: 11


«
Embed this message
Reply #10 on: April 24, 2011, 03:00:04 pm » posted from:Bílina,Ustecky kraj,Czech Republic

Sorry, i have a problem with attaching files, trying it again...


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

Posts: 3080



WWW
«
Embed this message
Reply #11 on: April 24, 2011, 10:16:13 pm » posted from:Taipei,T'ai-pei,Taiwan

You will find Upload new EJS jar file check box at the same line of "Post" button (submit button) when you edit the forum message.

Click that checkbox,  select the jar file before you submit the message.
Then, the EJS simulation in the jar file will appear as applet (part of forum message).
Please try it.
Logged
jirischamberger
Newbie
*
Offline Offline

Posts: 11


«
Embed this message
Reply #12 on: April 24, 2011, 10:22:37 pm » posted from:Bílina,Ustecky kraj,Czech Republic

I am trying it...hope it works.
Logged
Fu-Kwun Hwang
Administrator
Hero Member
*****
Offline Offline

Posts: 3080



WWW
«
Embed this message
Reply #13 on: April 24, 2011, 11:49:17 pm » posted from:Taipei,T'ai-pei,Taiwan

Let me tried it for you!

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
jirischamberger
Newbie
*
Offline Offline

Posts: 11


«
Embed this message
Reply #14 on: April 25, 2011, 12:11:14 am » posted from:Bílina,Ustecky kraj,Czech Republic

Thank you. I forgot one notice - distance is in micrometres. Regards
Logged
transportation
Newbie
*
Offline Offline

Posts: 1

«
Embed this message
Reply #15 on: April 26, 2011, 01:48:37 am » posted from:Dhaka,Dhaka,Bangladesh

I have tried this simulation in a different way : You can drag each point or you can generate (random or Gaussian) the points positions.
I am impressed by the quality of information on this website. There are a lot of good resources here.
I am sure I will visit this place again soon.
Logged
Pages: [1]   Go Up
  Print  
Know yourself. Questioning. ...Socrates (469-399 BC)
 
Jump to:  


Related Topics
Subject Started by Replies Views Last post
how to make the symbol "alpha" appear as α in the java applet
Questions related to EJS
lookang 2 12903 Last post August 13, 2007, 07:48:56 am
by lookang
Simulation of Track & Field event "Javelin"
Request for physics Simulations
javcoach 14 22819 Last post February 08, 2011, 09:09:19 pm
by imke24
Free Fall 3D "Modeling Physics with Easy Java Simulations" by Wolfgang/Francisco
Collaborative Community of EJS
lookang 1 14080 Last post August 03, 2009, 10:18:08 am
by lookang
problem with Ejs 4.2 new text objects cannot display "^o" as subscript string.
Questions related to EJS
lookang 3 5838 Last post October 04, 2009, 06:00:32 am
by fem@um.es
Can draw points directly on the "drawing panel" component?
Questions related to EJS
akunkeji 4 4453 Last post March 07, 2011, 10:00:34 am
by akunkeji
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.075 seconds with 23 queries.since 2011/06/15