NTNUJAVA Virtual Physics Laboratory
Enjoy the fun of physics with simulations!
December 20, 2014, 09:53:52 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 the universe as yourself and you can live anywhere in comfort. ...Lao Tzu (570-490 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: Ejs Open Source Earth and Moon Model  (Read 11844 times)
0 Members and 1 Guest are viewing this topic. Click to toggle author information(expand message area).
lookang
Moderator
Hero Member
*****
Offline Offline

Posts: 1729


http://weelookang.blogspot.com


WWW
«
Embed this message
on: June 15, 2010, 09:23:37 pm »

Ejs Open Source Earth and Moon Model is by Professor Francisco Esquembre aka Paco. I did not make this, i just post it here since the main website cannot deploy the applet properly.
This model is not an accurate model yet, it aims to demonstrate the new features available to Ejs as mentioned during MPLT14 http://www.fisica.uniud.it/URDF/mptl14/contents.htm
the 3D java ready!!
 i went to Prof Paco's wiki it didn't load. http://www.um.es/fem/EjsWiki/Main/ExamplesEarthAndMoon3D properly so i uploaded this version which works!

need
Download Java 3D 1.5.1 for Windows
Java 3D 1.5.1
java3d-1_5_1-windows-i586.exe   2.95 MB

seems to work only as a standalone, web does not display Java 3D

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!


* earthandmoon.png (705.93 KB, 735x543 - viewed 139 times.)
« Last Edit: June 18, 2010, 09:01:22 am by lookang » Logged
ahmedelshfie
Ahmed
Hero Member
*
Offline Offline

Posts: 954



«
Embed this message
Reply #1 on: June 15, 2010, 11:49:02 pm » posted from:SAO PAULO,SAO PAULO,BRAZIL

I download java 3d and simulation work very well i like idea so much
Very good idea of simulation  Wink
Logged
Fu-Kwun Hwang
Administrator
Hero Member
*****
Offline Offline

Posts: 3058



WWW
«
Embed this message
Reply #2 on: June 16, 2010, 06:27:26 am » posted from:Taipei,T\'ai-pei,Taiwan

The error seem to be Caused by:
java.security.AccessControlException: access denied (java.util.PropertyPermission j3d.stereo read)

May be Paco knew how to solve it?
Logged
ahmedelshfie
Ahmed
Hero Member
*
Offline Offline

Posts: 954



«
Embed this message
Reply #3 on: June 16, 2010, 06:38:05 am » posted from:Conceição Das Alagoas,Minas Gerais,Brazil

When i download java 3d simulation jar file work very well but have error that prof Hwnag
Saying and because it EJS cant run XML source code i search alto about name this error in XML
But no found I'm wonder how have error about variable not exist in XML source code.
« Last Edit: June 16, 2010, 06:39:45 am by ahmedelshfie » Logged
lookang
Moderator
Hero Member
*****
Offline Offline

Posts: 1729


http://weelookang.blogspot.com


WWW
«
Embed this message
Reply #4 on: June 16, 2010, 07:45:42 am » posted from:SINGAPORE,SINGAPORE,SINGAPORE

The error seem to be Caused by:
java.security.AccessControlException: access denied (java.util.PropertyPermission j3d.stereo read)
May be Paco knew how to solve it?

That's the best. I email him now
Logged
Fu-Kwun Hwang
Administrator
Hero Member
*****
Offline Offline

Posts: 3058



WWW
«
Embed this message
Reply #5 on: June 16, 2010, 09:25:32 am » posted from:Taipei,T\'ai-pei,Taiwan

I tried to change java.policy file without success.
And I can view java3D applet from other web site, so it is something implemented in EJS which need more security protection.
Logged
fem@um.es
CoLoS
Newbie
*
Offline Offline

Posts: 5

«
Embed this message
Reply #6 on: June 16, 2010, 01:12:09 pm » posted from:Murcia,Murcia,Spain

Thanks for pointing out this problem. It does look like a security issue. We'll investigate it.
Paco
Logged
lookang
Moderator
Hero Member
*****
Offline Offline

Posts: 1729


http://weelookang.blogspot.com


WWW
«
Embed this message
Reply #7 on: June 17, 2010, 12:18:50 pm » posted from:SINGAPORE,SINGAPORE,SINGAPORE

did someone do something?
it works on Web deployment now! it looks great.
Prof Hwang?


* earthnmoon3djavaworkon_webnow.png (853.72 KB, 1024x608 - viewed 120 times.)
« Last Edit: June 17, 2010, 12:20:21 pm by lookang » Logged
Fu-Kwun Hwang
Administrator
Hero Member
*****
Offline Offline

Posts: 3058



WWW
«
Embed this message
Reply #8 on: June 17, 2010, 01:39:10 pm » posted from:Taipei,T'ai-pei,Taiwan

It is not working with my browser (IE and firefox). The same error message!
Did you change something in your system?
Logged
lookang
Moderator
Hero Member
*****
Offline Offline

Posts: 1729


http://weelookang.blogspot.com


WWW
«
Embed this message
Reply #9 on: June 17, 2010, 02:00:42 pm » posted from:SINGAPORE,SINGAPORE,SINGAPORE

oic, it was me.
Code:
permission java.util.PropertyPermission "j3d.stereo", "read"; // added by lookang

add this line to C:\Program Files\Java\jre1.5.0_16\lib\security\java.policy
i added at the bottom of the codes

and if that didn't work


add the same line to C:\Program Files\Java\jre6\lib\security\java.policy
i think this is the solution to the 3D java

i used Jedit to edit them


method 2:
1 download the attachment java.zip
2 unzip the file, it is called java.policy
3 copy file into C:\Program Files\Java\jre6\lib\security\java.policy
3.5 optional* rename java.policy into java.policy~ in case you want the old file back
4 say yes to copy and replace file depending on whether it is replace or just copy new



BOOM! Java 3D on Ejs Web applets Grin Grin
attached is the java.policy for windows xp system

Youtube to show the steps


*** There are 1 more attached files. You need to login to acces it!
« Last Edit: July 17, 2010, 09:54:43 am by lookang » Logged
Fu-Kwun Hwang
Administrator
Hero Member
*****
Offline Offline

Posts: 3058



WWW
«
Embed this message
Reply #10 on: June 17, 2010, 04:52:46 pm » posted from:Taipei,T\'ai-pei,Taiwan

I did the same change for more than 3 different computers. However, it is not working for my computers.
Logged
ahmedelshfie
Ahmed
Hero Member
*
Offline Offline

Posts: 954



«
Embed this message
Reply #11 on: June 17, 2010, 05:50:53 pm » posted from:SAO PAULO,SAO PAULO,BRAZIL

I did the same steps but not loading java 3d error
I test on Firefox,Internet Explorer,IE Tester,Opera
Not loading error all time
Logged
ahmedelshfie
Ahmed
Hero Member
*
Offline Offline

Posts: 954



«
Embed this message
Reply #12 on: June 17, 2010, 06:02:17 pm » posted from:SAO PAULO,SAO PAULO,BRAZIL

Yes now is work after i replace java.policy
On C:\Program Files\Java\jre6\lib\security\java.policy
Now is loading very well in first 5 Minuit's no loading and it let me think that will not work
But i test again and work very well is work on all my browser(Firefox,IE tester,opera,Internet Explorer)
Good job prof Lookang Cheesy
Just one thing i try running XML file on EJS but error still now
variable IMPLEMENTATION_mode
location: class org.opensourcephysics.display3d.factory.OSP3DFactory
   org.opensourcephysics.display3d.factory.OSP3DFactory.setImplementation (org.opensourcephysics.display3d.factory.OSP3DFactory.IMPLEMENTATION_mode);
   ^
« Last Edit: June 17, 2010, 06:12:15 pm by ahmedelshfie » Logged
lookang
Moderator
Hero Member
*****
Offline Offline

Posts: 1729


http://weelookang.blogspot.com


WWW
«
Embed this message
Reply #13 on: June 17, 2010, 06:37:17 pm »

thx ahmedelshfie.! yes the first method works best, 2nd method assumes your PC is windows xp

copy the line
Code:
permission java.util.PropertyPermission "j3d.stereo", "read"; // added by lookang

into the exisiting java.policy

i did it on a windows 7 system too by doing this.

copy out java.policy to a space where u can edit and save the new java.policy say d:/

add the line of code at the bottom of the page of java.policy

for windows 7 it looks like this, different from windows xp

Code:
// Standard extensions get all permissions by default

grant codeBase "file:${{java.ext.dirs}}/*" {
permission java.security.AllPermission;
};

// default permissions granted to all domains

grant {
// Allows any thread to stop itself using the java.lang.Thread.stop()
// method that takes no argument.
// Note that this permission is granted by default only to remain
// backwards compatible.
// It is strongly recommended that you either remove this permission
// from this policy file or further restrict it to code sources
// that you specify, because Thread.stop() is potentially unsafe.
// See "http://java.sun.com/notes" for more information.
permission java.lang.RuntimePermission "stopThread";

// allows anyone to listen on un-privileged ports
permission java.net.SocketPermission "localhost:1024-", "listen";

// "standard" properies that can be read by anyone

permission java.util.PropertyPermission "java.version", "read";
permission java.util.PropertyPermission "java.vendor", "read";
permission java.util.PropertyPermission "java.vendor.url", "read";
permission java.util.PropertyPermission "java.class.version", "read";
permission java.util.PropertyPermission "os.name", "read";
permission java.util.PropertyPermission "os.version", "read";
permission java.util.PropertyPermission "os.arch", "read";
permission java.util.PropertyPermission "file.separator", "read";
permission java.util.PropertyPermission "path.separator", "read";
permission java.util.PropertyPermission "line.separator", "read";

permission java.util.PropertyPermission "java.specification.version", "read";
permission java.util.PropertyPermission "java.specification.vendor", "read";
permission java.util.PropertyPermission "java.specification.name", "read";

permission java.util.PropertyPermission "java.vm.specification.version", "read";
permission java.util.PropertyPermission "java.vm.specification.vendor", "read";
permission java.util.PropertyPermission "java.vm.specification.name", "read";
permission java.util.PropertyPermission "java.vm.version", "read";
permission java.util.PropertyPermission "java.vm.vendor", "read";
permission java.util.PropertyPermission "java.vm.name", "read";
permission java.util.PropertyPermission "j3d.stereo", "read"; // added by lookang
};

rename the old java.policy from C:\Program Files (x86)\Java\jre6\lib\security to say java~.policy

copy back the file which has the new added line as C:\Program Files (x86)\Java\jre6\lib\security to say java.policy

it works again!
attached in the java.policy for windows 7 system


* web3djava.png (773.27 KB, 1280x800 - viewed 111 times.)

*** There are 1 more attached files. You need to login to acces it!
« Last Edit: June 17, 2010, 06:41:05 pm by lookang » Logged
ahmedelshfie
Ahmed
Hero Member
*
Offline Offline

Posts: 954



«
Embed this message
Reply #14 on: June 17, 2010, 06:53:36 pm » posted from:SAO PAULO,SAO PAULO,BRAZIL

I really do it but XML source code have wrong.Ejs cant running XML so i try solve but i don't find variable
That have wrong on XML file i notice a thing earth and moon 3d created by ejs version 4.3.0 and I'm use
Version 4.2.7 may this problem for cant run XML source code .
Logged
lookang
Moderator
Hero Member
*****
Offline Offline

Posts: 1729


http://weelookang.blogspot.com


WWW
«
Embed this message
Reply #15 on: June 17, 2010, 07:08:51 pm »

I really do it but XML source code have wrong.Ejs cant running XML so i try solve but i don't find variable
That have wrong on XML file i notice a thing earth and moon 3d created by ejs version 4.3.0 and I'm use
Version 4.2.7 may this problem for cant run XML source code .

Yes. u need to get the latest Ejs

anyway, on Mac OSX
the web apple didn't run
the error is
Code:
java.lang.NullPointerException
at users.sgeducation.lookang.ejs_EarthAndMoon3D.EarthAndMoon3D_pkg.EarthAndMoon3DView.reset(EarthAndMoon3DView.java:266)
at org.colos.ejs.library.Animation.reset(Unknown Source)
at users.sgeducation.lookang.ejs_EarthAndMoon3D.EarthAndMoon3D_pkg.EarthAndMoon3DSimulation.(EarthAndMoon3DSimulation.java:25)
at users.sgeducation.lookang.ejs_EarthAndMoon3D.EarthAndMoon3D_pkg.EarthAndMoon3D.(EarthAndMoon3D.java:96)
at users.sgeducation.lookang.ejs_EarthAndMoon3D.EarthAndMoon3D_pkg.EarthAndMoon3DApplet.init(EarthAndMoon3DApplet.java:27)
at sun.applet.AppletPanel.run(AppletPanel.java:424)
at java.lang.Thread.run(Thread.java:637)
maybe prof Paco will be interested in this error on Mac later one day
« Last Edit: June 17, 2010, 07:10:43 pm by lookang » Logged
ahmedelshfie
Ahmed
Hero Member
*
Offline Offline

Posts: 954



«
Embed this message
Reply #16 on: June 17, 2010, 08:33:54 pm » posted from:SAO PAULO,SAO PAULO,BRAZIL

Quote
Yes. u need to get the latest Ejs
I really download EJS latest version but is the same error
Code:
EarthAndMoon3D_pkg\EarthAndMoon3D.java:189: ';' expected
  permission java.util.PropertyPermission "j3d.stereo", "read"; // added by lookang  // > Initialization.Lights:5
  ^


« Last Edit: June 17, 2010, 08:36:27 pm by ahmedelshfie » Logged
lookang
Moderator
Hero Member
*****
Offline Offline

Posts: 1729


http://weelookang.blogspot.com


WWW
«
Embed this message
Reply #17 on: June 18, 2010, 09:14:18 am » posted from:SINGAPORE,SINGAPORE,SINGAPORE

i think i know what is your problem.

file name too long.

D:\EasyJavaSimulation\EJS_4.3.0_100613\EJS_4.3.0\workspace\source\users\sgeducation\lookang\users_sgeducation_lookang_ejs_EarthAndMoon3D_EarthAndMoon3D.xml

rename the file to EarthAndMoon3D.xml before you save it to your PC. Do not change file name in Ejs editor mode, the file is already not read correctly so it will not work still.

i think java has some number of character restriction from the root directory so how i solve this problem is rename file to a short name.
try it
Logged
lookang
Moderator
Hero Member
*****
Offline Offline

Posts: 1729


http://weelookang.blogspot.com


WWW
«
Embed this message
Reply #18 on: June 18, 2010, 09:19:42 am » posted from:SINGAPORE,SINGAPORE,SINGAPORE

the method just described did not work still.

how i did it is the download the jar file (1.9 mb file)

unzip in its folder

go in to find the source xml and the folder that is needed
for example
D:\EasyJavaSimulation\EJS_4.3.0_100613\EJS_4.3.0\workspace\export
D:\EasyJavaSimulation\EJS_4.3.0_100613\EJS_4.3.0\workspace\export\ejs_users_sgeducation_lookang_ejs_EarthAndMoon3D_EarthAndMoon3D\users\sgeducation\lookang\ejs_EarthAndMoon3D
need
EarthAndMoon3D.xml and folder TEXTURES
copy these into the usual source user ... / ...
D:\EasyJavaSimulation\EJS_4.3.0_100613\EJS_4.3.0\workspace\source\users\sgeducation\lookang\ejs_EarthAndMoon3D

it should work now


Logged
ahmedelshfie
Ahmed
Hero Member
*
Offline Offline

Posts: 954



«
Embed this message
Reply #19 on: June 18, 2010, 05:22:30 pm » posted from:SAO PAULO,SAO PAULO,BRAZIL

Quote
i think i know what is your problem.

file name too long.

D:\EasyJavaSimulation\EJS_4.3.0_100613\EJS_4.3.0\workspace\source\users\sgeducation\lookang\users_sgeducation_lookang_ejs_EarthAndMoon3D_EarthAndMoon3D.xml

rename the file to EarthAndMoon3D.xml before you save it to your PC. Do not change file name in Ejs editor mode, the file is already not read correctly so it will not work still.

i think java has some number of character restriction from the root directory so how i solve this problem is rename file to a short name.
try it
I really do it from first time i change however i will wait answer see with prof Hwang what is the problem in my system
Logged
Fu-Kwun Hwang
Administrator
Hero Member
*****
Offline Offline

Posts: 3058



WWW
«
Embed this message
Reply #20 on: June 18, 2010, 10:13:06 pm » posted from:Taipei,T\'ai-pei,Taiwan

I would suggest you download the jar file and run it at your computer.
Then, right click mouse and select "open ejs model" and it will extract and save all the necessary files for the simulation at the right place.
May be this will solve your problem. Try it!
Logged
ahmedelshfie
Ahmed
Hero Member
*
Offline Offline

Posts: 954



«
Embed this message
Reply #21 on: June 19, 2010, 12:32:01 am » posted from:SAO PAULO,SAO PAULO,BRAZIL

Thanks prof Hwang about your solution now is work very well  Cheesy
Logged
lookang
Moderator
Hero Member
*****
Offline Offline

Posts: 1729


http://weelookang.blogspot.com


WWW
«
Embed this message
Reply #22 on: September 16, 2010, 06:33:31 pm »

Textures for the applet


* earth.jpg (13.1 KB, 256x256 - viewed 106 times.)

* moon_map.jpg (321.53 KB, 1440x720 - viewed 130 times.)

* stars2.jpg (732.07 KB, 1200x810 - viewed 120 times.)
Logged
lookang
Moderator
Hero Member
*****
Offline Offline

Posts: 1729


http://weelookang.blogspot.com


WWW
«
Embed this message
Reply #23 on: August 02, 2011, 03:39:39 pm » posted from:SINGAPORE,SINGAPORE,SINGAPORE

submited a bug on http://www.um.es/fem/EjsWiki/FeedbackEn/00078

Title
bug in java 3d texture implementation
 
Type
Bug
 
Raised by
lookang
 
Date opened
Tuesday, 2 August 2011
 
Description
notice the earth texture is render wrongly.
amercia africa asia is the order from left to right
the bug is
asia africa amercia, everything is rendered i think inside out?
 
Importance
3
 
Proposed solution
should be a easy bug to solve.
http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=1830.0 to see the bug
 
Urgency
3
 
Status
Open
 
Resolution
should be a easy bug to solve.


* bug_in_3d_.png (620.55 KB, 723x485 - viewed 139 times.)

* correct_earth.png (762.37 KB, 739x627 - viewed 116 times.)
Logged
Pages: [1]   Go Up
  Print  
Know the universe as yourself and you can live anywhere in comfort. ...Lao Tzu (570-490 BC)
 
Jump to:  


Related Topics
Subject Started by Replies Views Last post
Earth and Moon
Examples for beginner who want to learn EJS
Fu-Kwun Hwang 0 2759 Last post June 13, 2010, 11:16:07 am
by Fu-Kwun Hwang
Earth Sun And Moon
Examples for beginner who want to learn EJS
Fu-Kwun Hwang 0 3587 Last post June 13, 2010, 01:44:14 pm
by Fu-Kwun Hwang
Earth and moon 3d
Question related to Physics or physics related simulation
ahmedelshfie 3 3569 Last post November 13, 2014, 03:01:22 pm
by Fred143
Earth and moon 3d
Questions related to EJS
ahmedelshfie 6 4266 Last post June 24, 2010, 05:18:25 pm
by ahmedelshfie
Ejs Open Source Gravitational Field & Potential of Earth and Moon Java Applet
Collaborative Community of EJS
lookang 8 10734 Last post June 28, 2012, 09:09:29 am
by lookang
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.093 seconds with 23 queries.since 2011/06/15