NTNUJAVA Virtual Physics Laboratory
Enjoy the fun of physics with simulations!
Backup site http://enjoy.phy.ntnu.edu.tw/ntnujava/
October 17, 2017, 05:00:22 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  
Teaching without words. ...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: Data images in project MetalicConductor  (Read 4015 times)
0 Members and 1 Guest are viewing this topic. Click to toggle author information(expand message area).
ahmedelshfie
Ahmed
Hero Member
*
Offline Offline

Posts: 954



«
Embed this message
on: July 02, 2010, 06:13:22 pm » posted from:SAO PAULO,SAO PAULO,BRAZIL

This simulation design by Francisco Esquembre if you see prof
Have to images inside jar file (PositiveParticle,NegativeParticle)
My ask when i download XML source code and run simulation
I find images work by %images% i try understand but Huh
Can you prof explain this way please
Thanks
I attach jar file


* MetalicConductor.gif (23.82 KB, 391x447 - viewed 278 times.)

*** There are 1 more attached files. You need to login to acces it!
« Last Edit: July 02, 2010, 06:20:53 pm by ahmedelshfie » Logged
lookang
Hero Member
*****
Offline Offline

Posts: 1784


http://weelookang.blogspot.com


WWW
«
Embed this message
Reply #1 on: July 02, 2010, 11:35:45 pm » posted from:Singapore,,Singapore

the files are keep in MetalicConductor/PositiveParticle.gif and NegativeParticle.gif

so %images% on the imageset is the way to call ejs to draw images in array.

and in the initialize page for init positives

int sqr = (int) Math.sqrt(positives);
for (int i=0; i < positives; i++) {
  images[ i ] = "./MetalicConductor/PositiveParticle.gif";

i also don't understand fully, but hope that helps



* NegativeParticle.gif (0.95 KB, 13x13 - viewed 315 times.)

* PositiveParticle.gif (3.75 KB, 78x78 - viewed 287 times.)
Logged
ahmedelshfie
Ahmed
Hero Member
*
Offline Offline

Posts: 954



«
Embed this message
Reply #2 on: July 03, 2010, 12:54:19 am » posted from:SAO PAULO,SAO PAULO,BRAZIL

May i understand some but I'm try do it with my self insert images in data
And run simulation but appear without images.why i don't know  Huh
Logged
Fu-Kwun Hwang
Administrator
Hero Member
*****
Offline Offline

Posts: 3080



WWW
«
Embed this message
Reply #3 on: July 03, 2010, 09:01:15 am » posted from:Taipei,T\'ai-pei,Taiwan

For the image GUI elements:

if you provide the filename in the property field. EJS will try to find the file and include it in the jar file when you compile it.

However, if the images are specified by String (as %images% which means string variables with name "images" contain filename)
EJS can not find the file. You need to include those image file manually. (How to add it ? please check out attached file).


* ejsmsg.gif (18.59 KB, 580x488 - viewed 278 times.)
Logged
ahmedelshfie
Ahmed
Hero Member
*
Offline Offline

Posts: 954



«
Embed this message
Reply #4 on: July 03, 2010, 10:21:35 am » posted from:Uberaba,Minas Gerais,Brazil

I work by this way too and include images manually after back to view in EJS and insert images
From insert image file but in this project have insert images from variable in model I'm try
Understand this way to insert images.
Logged
Pages: [1]   Go Up
  Print  
Teaching without words. ...Lao Tzu (570-490 BC)
 
Jump to:  


Related Topics
Subject Started by Replies Views Last post
Open source physics project web site
Physics related resources
Fu-Kwun Hwang 1 8027 Last post October 24, 2014, 06:16:02 pm
by HarryThornton
Images formed with a flat mirror
Optics
Fu-Kwun Hwang 1 10712 Last post December 05, 2009, 10:49:10 am
by Fu-Kwun Hwang
How many images (Multiple Reflection from two plane mirrors)
optics
ahmedelshfie 0 8985 Last post May 20, 2010, 01:25:53 am
by ahmedelshfie
Adding Ghost Trace images
Question related to Physics or physics related simulation
mickey2times 10 14630 Last post September 26, 2010, 11:16:55 am
by DonaSima
Metalic conductor Based on an animation of the Supercomet 2 project
Electromagnetism
lookang 0 14352 Last post February 12, 2012, 07:21:10 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.056 seconds with 22 queries.since 2011/06/15