NTNUJAVA Virtual Physics LaboratoryEnjoy the fun of physics with simulations! Backup site http://enjoy.phy.ntnu.edu.tw/ntnujava/
January 24, 2020, 04:38:04 am

An interaction between two opposites produces a unique outcome. ..."Jules Henri Poincare(1854-1912, One of France's greatest mathematicians)"

 Pages: [1]   Go Down
 Author Topic: Slingshot and Moon  (Read 24307 times) 0 Members and 1 Guest are viewing this topic. Click to toggle author information(expand message area).
GwenArBreizhou
Jr. Member

Offline

Posts: 50

 « Embed this message on: April 08, 2009, 04:13:24 am »

Hello again ;o)),
I wonder whether you could do an applet comparing a stone turning in a slingshot and the moon around the Earth.
Then it'll be possible to cut the string (and then the stone will go away) and to suppress the Earth (and then the Moon will do the same).

best regards,
 smf_planetanalog.jpg (9.43 KB, 432x451 - viewed 529 times.) Logged
Fu-Kwun Hwang
Hero Member

Offline

Posts: 3085

 « Embed this message Reply #1 on: April 08, 2009, 08:05:46 am » posted from:Taipei,T'ai-pei,Taiwan

I do not understand what do you mean.
Could you explained it in more detail. Please provide all the physics quantities:
For example: what is the mass of the stone, speed?
Is it an imaginary experiment assume no air resistance or ...?
What do you means by suppress the earth???
 Logged
GwenArBreizhou
Jr. Member

Offline

Posts: 50

 « Embed this message Reply #2 on: April 08, 2009, 05:59:29 pm »

It's just an imaginary experiment to show analogy between planet movement and the movement of the stone turning in a slingshot ...

Something like the one you see on Fu1.jpg.
When I click on the hand, the stone is free to go away (see Fu2.jpg) but when I click on the earth, the motion of the moon stops and the moon fall on the earth (see Fu3.jpg) ... I'd like it to be thrown away ... like if they were no earth at all ...

Is it more clear now ?
 Fu1.jpg (120.9 KB, 966x440 - viewed 479 times.)  Fu2.jpg (113.22 KB, 1021x456 - viewed 503 times.)  Fu3.jpg (20.32 KB, 783x223 - viewed 447 times.) Logged
Fu-Kwun Hwang
Hero Member

Offline

Posts: 3085

 « Embed this message Reply #3 on: April 08, 2009, 09:27:34 pm » posted from:Taipei,T\'ai-pei,Taiwan

I do not understand why
Quote
when I click on the earth, the motion of the moon stops and the moon fall on the earth

I created a simulation as what I have interpreted what you need from figure 1 & 2.

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
• 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
GwenArBreizhou
Jr. Member

Offline

Posts: 50

 « Embed this message Reply #4 on: April 08, 2009, 09:44:58 pm »

I do not understand why
Quote
when I click on the earth, the motion of the moon stops and the moon fall on the earth

Me either.
So does the maker of this animation ...

I created a simulation as what I have interpreted what you need from figure 1 & 2.

Thanks. It's quite perfect in spite of translation problems ;o))
Will it be possible to release the slingshot and the moon separately ?
And when we release the moon, to make the earth disapeare ?

Regards,
 Logged
Fu-Kwun Hwang
Hero Member

Offline

Posts: 3085

 « Embed this message Reply #5 on: April 08, 2009, 11:23:57 pm » posted from:Taipei,T\'ai-pei,Taiwan

I just modified the code according to your suggestion. It has been updated.
However, you might need to close your browser and open it again (otherwaise, you will only view cached files).
Let me know if this is what you want. I will create other simulations you want.
It will be better if you can provide more information about what are the purposes of the simulation.
 Logged
GwenArBreizhou
Jr. Member

Offline

Posts: 50

 « Embed this message Reply #6 on: April 09, 2009, 05:23:26 am »

Thanks a lot, this is exactly what I was thinking about.

I'll try to be more precise in my explanations now.

Regards,
 Logged
GwenArBreizhou
Jr. Member

Offline

Posts: 50

 « Embed this message Reply #7 on: April 09, 2009, 06:02:55 am »

Can you insert the translation tool ?
My students are very bad in English ;o))
 Logged
Fu-Kwun Hwang
Hero Member

Offline

Posts: 3085

 « Embed this message Reply #8 on: April 09, 2009, 06:56:34 am » posted from:Taipei,T\'ai-pei,Taiwan

This simulation is created with EJS and the file you have download is in jar format. (Alll the simulations I have created since 2001 were using EJS).

You can double click the file to run it if your computer support java.
Right Clcik inside the simulation, and move down to GUI options , you will find translate sub item.
Select the translate: move mouse to that item and release mouse.

A new window will popup with many strings in two columns:
1.You might need to select the language you want to translate to.
2. change the strings in the second columns
3. Click Save and it is done. (If you want to see the change , RIght click again: GUI options->language-> "the language you translated to".

There are many other options: data tools....

You can change the image files,too. But, you need to replace/add new file into the jar file to make it work.
The jar file is the same format as ZIP. You can unzip it and add new image file. Pack file back to ZIP with the same structure, then, rename ext to jar. And double click again to run it.

 Logged
GwenArBreizhou
Jr. Member

Offline

Posts: 50

 « Embed this message Reply #9 on: April 09, 2009, 06:20:13 pm »

Ok, I have done it and it works.
But I have changed as well the frame size because there are more words in french. It changes only the width and then now circles are ellipses. How can I change also the height ?
And is it possible to make french the default langage ?

When translation will be finished, do you want me to send you the file back ?

Regards,

 Logged
Fu-Kwun Hwang
Hero Member

Offline

Posts: 3085

 « Embed this message Reply #10 on: April 09, 2009, 09:01:55 pm » posted from:Taipei,T\'ai-pei,Taiwan

There are two number for the frame size.
The current default is 729,578. You can change both at the same time and it should work fine.
May be you need to change value in english tab.
The default language is english when double click jar file to run it. I am asking the author of EJS to find out is it possible to change default language in java application mode.

But if the jar file was loaded into html page (shown as applet), the browser will select the locale and change it to the default language.
You can view this web page source if you want to know the tag for the applet.

I certainly hope you can upload your translated jar file as attached file (Click "Additional Options" to find upload options). If you use the "upload new EJS jar file", then the jar will be turn into html code to shown applet at the end of the posted message. Because we already have one applet shown above, please use "Additions Options..." to upload your translated jar. You might want to filename to ejs_magnetdeflect_fr.jar so that to remind it contain french version translation. Thank you! We can work together to help more users enjoy the fun of physics!
 Logged
GwenArBreizhou
Jr. Member

Offline

Posts: 50

 « Embed this message Reply #11 on: April 09, 2009, 10:38:24 pm »

Ok, I saw for the frame size but if I ask for big size, it will be hard to see for peoplee who got small resolution screen.
So I wonder if you can shift the whole text to the left (see attached picture).
 Fu5.jpg (87.45 KB, 1074x642 - viewed 430 times.) Logged
GwenArBreizhou
Jr. Member

Offline

Posts: 50

 « Embed this message Reply #12 on: April 09, 2009, 11:41:47 pm »

I got problems to make the simulation to appear in french.

The .jar is the good one now (you can test by running
http://gwenaelm.free.fr//tmp/gravitation/ejs_users_ntnu_fkh_planetmotionanalog_fr.jar )
but I had to go in the file (with 7-zip) and copy the file planetmotionanalog_fr.properties in directory users\ntnu\fkh\planetmotionanalog_pkg because when I saved the translated data, it create a users\ntnu\fkh\planetmotionanalog_pkg\planetmotionanalog_fr.properties next to the ejs_users_ntnu_fkh_planetmotionanalog.jar but it doesn't make the file itself changed.

But now, when I ask for the applet to load in a web page, you said that "the browser will select the locale and change it to the default language" but it doesn't ...

The applet stay in english http://gwenaelm.free.fr//tmp/gravitation/manipulation1.html

Why ?
 Logged
Fu-Kwun Hwang
Hero Member

Offline

Posts: 3085

 « Embed this message Reply #13 on: April 10, 2009, 12:01:05 am » posted from:Taipei,T\'ai-pei,Taiwan

Quote
So I wonder if you can shift the whole text to the left (see attached picture).
It is done.

Sorry about the default language used by jar. It seems to be another way around.
When I double click the created jar file. It will switch to my Chinese language automatically.
You do not need to unzip the jar if you just need to translate those string.
Double click to run it , translate it , and click save -- it will save to the jar file automatically.

But the applet should in web page did not switch to local language automatically. There is a way to do it. I will try to find out and post it here.
The above information is incorrect. Please check out the following message (two messages down).
 Logged
GwenArBreizhou
Jr. Member

Offline

Posts: 50

 « Embed this message Reply #14 on: April 10, 2009, 06:10:45 pm »

By the way, here is the french translated file.
Regards,
 Logged
Fu-Kwun Hwang
Hero Member

Offline

Posts: 3085

 « Embed this message Reply #15 on: April 10, 2009, 09:16:43 pm » posted from:Taipei,T\'ai-pei,Taiwan

I am really sorry. I provided you wrong information again.

The resource file was not saved to the jar file when you click the save button.
(Because you were running the jar file, there is no way you can save to the same file).
Actually, the translated file will be created as users/ntnu/fkh/xxx_pkg/xxx_yy.properties
where xxx is the name of the ejs source filename when I created it.
yy is the language code. For chinese translation it is zh, for french is seem to be fr.

for the ejs_users_ntnu_fkh_planetmotionanalog.jar : xxx is planetmotionanalog.

You need to add that file into the jar file: the  command is
jar -uf ejs_users_ntnu_fkh_planetmotionanalog.jar users/ntnu/fkh/planetmotionanalog_pkg/planetmotionanalog_fr.properties
You will need to have jdk installed to run the above command.

Another way to do is
1. rename ejs_users_ntnu_fkh_planetmotionanalog.jar to ejs_users_ntnu_fkh_planetmotionanalog.jar
2. unpack the zip file
3. copy resource file which was saved (users/ntnu/fkh/planetmotionanalog_pkg/planetmotionanalog_fr.properties)
to users/ntnu/fkh/planetmotionanalog_pkg in the unzip directory
4. zip all the file again
5. rename the zip file to jar.

I think this time it should work for you. I just test it and it work fines.
I was told that :
if it is done correctly, the default language will be selected as defult when we click jar file to run it or when we open it in a browser. It wrk for some of my tested jar file, but it did not work for some of the files. I am still trying to find out the exact solution.

Please upload the translation resource file only when you have done with the translation.
I will add it to the original jar file and make it available.
And I hope you will find french version translation in the applet when you view it again (after I have add it to the jar).
The one you have upload in the previous message is removed becuase it is the same as my original jar file.
 Logged
GwenArBreizhou
Jr. Member

Offline

Posts: 50

 « Embed this message Reply #16 on: April 10, 2009, 10:02:09 pm »

So, that's the way I've done it (but without changing extension jar to zip, because 7-zip can open jar files).

I'm surprised with the uploaded file because at home, it works (and directly in french when I run it which is not the case with ejs_users_ntnu_fkh_magnetdeflect_fr.jar (I have to select french translation by right clicking)).

I'll upload it again (let me know if it's the good one).

But, for the moment, none of them wants to load in french when I open it in a browser ;o((
And I cannot right click to change the langage ;o((
 *** There are 1 more attached files. You need to login to acces it! « Last Edit: April 10, 2009, 10:25:37 pm by GwenArBreizhou » Logged
GwenArBreizhou
Jr. Member

Offline

Posts: 50

 « Embed this message Reply #17 on: April 10, 2009, 10:28:28 pm »

Hi,
I've found a way to make it appear in french in a browser.
I've made a english translation in french and then copy the false planetmotionanalog_en.properties in the jar file ;o))

And now http://gwenaelm.free.fr/Physique/Physchim/c03/Mecanique/Html/Gravitation/manipulation__premire.html ;o))
 Logged
Fu-Kwun Hwang
Hero Member

Offline

Posts: 3085

 « Embed this message Reply #18 on: April 10, 2009, 10:35:16 pm » posted from:Taipei,T\'ai-pei,Taiwan

I know the way you did (translate french into english). But all the user will find french when "english" was selected. It is fine if you just need to use it at your web page.

Could you just upload the resource file only?
I will add it to the jar file and find out a solution to select default language.
 Logged
GwenArBreizhou
Jr. Member

Offline

Posts: 50

 « Embed this message Reply #19 on: April 11, 2009, 04:41:29 am »

Don't understand what happened. Here is the file planetmotionanalog_fr.properties in a zip.

The applet will only be used in my web page (that's why I used this way).
 *** There are 1 more attached files. You need to login to acces it! Logged
lingaa
Newbie

Offline

Posts: 1

Nice posts buddy specially a website for Physics Laboratory -*-
 Logged
jaisonthomsed
Newbie

Offline

Posts: 1

 « Embed this message Reply #21 on: December 03, 2014, 01:43:32 am » posted from:,,Satellite Provider

Awesome man i am more interested to get deep in Physics-*-
 Logged
Mikecarter
Newbie

Offline

Posts: 1

 « Embed this message Reply #22 on: December 22, 2014, 01:41:47 pm » posted from:Lahore,Punjab,Pakistan

Definitely when the gravity becomes Zero everything will be lost from earth.
 Logged
saketwahi11
watchlist
Newbie

Offline

Posts: 0

 « Embed this message Reply #23 on: January 29, 2015, 10:33:24 pm » posted from:BENGALORE,KARNATAKA,INDIA

I will look it up wait for my next reply
Happy Valentines Day 2015
 Logged
saketwahi11
watchlist
Newbie

Offline

Posts: 0

 « Embed this message Reply #24 on: January 29, 2015, 10:41:35 pm » posted from:BENGALORE,KARNATAKA,INDIA

I must say that overall I am really impressed with this blog.-*-
 Logged
tmukherjee711
watchlist
Newbie

Offline

Posts: 1

 « Embed this message Reply #25 on: February 03, 2015, 09:50:03 pm » posted from:Gurgaon,Haryana,India

Nice post i must say!
-*-
 Logged
 Pages: [1]   Go Up
An interaction between two opposites produces a unique outcome. ..."Jules Henri Poincare(1854-1912, One of France's greatest mathematicians)"