NTNUJAVA Virtual Physics Laboratory
Enjoy the fun of physics with simulations!
Backup site http://enjoy.phy.ntnu.edu.tw/ntnujava/
November 23, 2017, 02:40:02 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  
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: Used Deprecated VectorField3D...Any way to translate?  (Read 6405 times)
0 Members and 1 Guest are viewing this topic. Click to toggle author information(expand message area).
tsouthard
Newbie
*
Offline Offline

Posts: 3

«
Embed this message
on: June 22, 2009, 10:38:29 pm » posted from:College Station,Texas,United States

Hello,

I used the deprecated version of VectorField3D to create a simulation. Is there a way to directly translate to a non-deprecated VectorField3D? I have attached the xml file for the simulation. The problem is that random groups of vectors pop up in random locations in the field and then quickly disappear throughout the simulation. I'm assuming that was one of the reasons not to use it, but it translated most easily to the physical description of the problem, so I used it (the fact that you store xyz position and component in an array).

Thanks in advance!


*** 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 #1 on: June 22, 2009, 11:46:31 pm » posted from:Taipei,T\'ai-pei,Taiwan

EJS should still support previous verison deprecated GUI elements.
There is a new VectorField3D.
The old version you need to supply E[][][][7]: the last 7 are for x,y,z, Ex,Ey,Ez and length
The new version you need to supply Ex[][][],Ey[][][],Ez[][][],length[][][]
x,y,z are specifiled by xmin,xmax,ymin,ymax,zmin and zmax properties.
Please check out attached file.
new variables: Ex,Ey,Ez and L have been defined!


*** There are 1 more attached files. You need to login to acces it!
Logged
tsouthard
Newbie
*
Offline Offline

Posts: 3

«
Embed this message
Reply #2 on: June 23, 2009, 02:06:44 am » posted from:College Station,Texas,United States

Thank you for your quick response. However, the issue is still present even when using the new version of VectorField3D. The only change I made to the file you uploaded was to remove the old vector field from the view panel. Running the simulation shows random outbursts of vectors (of much greater length than anything I instantiate in code). I haven't seen anything else about this problem - could it be something about the system external to the code that is causing the issue?

PS: I just tried it on another computer and the issue did not show up... I just tried it on a Windows XP tablet edition hp tablet. The issue has been arising on a Mac Pro Quad-Core Xeon running OSX 10.5.6
« Last Edit: June 23, 2009, 02:28:07 am by tsouthard » Logged
Fu-Kwun Hwang
Administrator
Hero Member
*****
Offline Offline

Posts: 3080



WWW
«
Embed this message
Reply #3 on: June 23, 2009, 05:31:40 am » posted from:Taipei,T\'ai-pei,Taiwan

Quote
The problem is that random groups of vectors pop up in random locations in the field and then quickly disappear throughout the simulation.

I did not find the above problem with my computer (Firefox running on Window Vista).
The differerce between old and new vectorField3D is the data structure.
I believe the code to draw all the vector fields are the same.
I was wonder why there is a TraceSet in your code (n elements and x,y,z properties were not defined?)

May I know what kind of simulation you were trying to create? May be there is a better way to make a simpler visualization effect. The current GUI seems to be too complicated to me. Do you really need to show all vectors fields (filled most of the simulation region)?
Logged
tsouthard
Newbie
*
Offline Offline

Posts: 3

«
Embed this message
Reply #4 on: June 23, 2009, 08:20:20 pm » posted from:College Station,Texas,United States

Yes, between the two computers I can test it on, it only has the issue on the Mac. The old vs. new vector fields didn't make a difference - the issue still arose. I don't really understand why I need the trace set either, except for the fact that if I remove it, the vector field is no longer displayed during the simulation. The simulation is for demonstrating the autonomous landing of an aerial robot on a landing pad using the potential field method. Unfortunately, I do need to include the entire field to show how the field behaves at each point, and how it changes if the location of the landing pad is changed. I agree - it does make it rather cluttered, but it is unavoidable in this case.

Any ideas why the issue would arise just on this computer? I would like to try it on another Mac, but I don't have access to another one.
Logged
Fu-Kwun Hwang
Administrator
Hero Member
*****
Offline Offline

Posts: 3080



WWW
«
Embed this message
Reply #5 on: June 23, 2009, 09:52:06 pm » posted from:Taipei,T\'ai-pei,Taiwan

I do not have Mac so I can not test it for you.
You can remove TraceSet but you need to the following line from "Initialization" page,too!

 _view.getElement("TraceSet").reset();

It will cause java error if you did not remove the above line (because TraceSet is no longer exists).
That is the reason you did not see vector field if you just remove "TreacSet" from the view.
 
Logged
Pages: [1]   Go Up
  Print  
Know yourself. Questioning. ...Socrates (469-399 BC)
 
Jump to:  


Related Topics
Subject Started by Replies Views Last post
When you step on the accelerator, the car "noses up"?
Kinematics
Fu-Kwun Hwang 0 14971 Last post April 08, 2005, 12:55:37 pm
by Fu-Kwun Hwang
how to make the symbol "alpha" appear as α in the java applet
Questions related to EJS
lookang 2 12961 Last post August 13, 2007, 07:48:56 am
by lookang
Simulation of Track & Field event "Javelin"
Request for physics Simulations
javcoach 14 23055 Last post February 08, 2011, 09:09:19 pm
by imke24
Help with simulation "Feynman QED" in EJS/board:26-101-
Request for physics Simulations
jirischamberger 15 18163 Last post April 26, 2011, 01:48:37 am
by transportation
Can draw points directly on the "drawing panel" component?
Questions related to EJS
akunkeji 4 4514 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.057 seconds with 22 queries.since 2011/06/15