NTNUJAVA Virtual Physics Laboratory
Enjoy the fun of physics with simulations!
Backup site http://enjoy.phy.ntnu.edu.tw/ntnujava/
December 12, 2017, 10:53:58 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  
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: Question about one error message./board:23-101-  (Read 22849 times)
0 Members and 1 Guest are viewing this topic. Click to toggle author information(expand message area).
Alex_10
Newbie
*
Offline Offline

Posts: 6


«
Embed this message
on: July 17, 2011, 05:29:32 pm »

I have one question about one program that i'm programming in EJS:

I try to made the simulation of this program and i get one error "_view.drawingPanel3D.repaint(​);"


...i don't know what mean with this error message, because my simulation is in 2D and i don't have anything about 3D in my program.


This is the "applet source code" of my programm:

* Class : satelite_474Applet.java
* Generated using * Easy Java Simulations Version 4.3.3.2, build 110619. Visit http://www.um.es/fem/Ejs
*/

...package satelite_474_pkg;

import org.colos.ejs.library._Ejs​Constants;

public class satelite_474Applet extends org.colos.ejs.library.Laun​cherApplet {

static {



org.opensourcephysics.disp​lay.OSPRuntime.loadTransla​torTool = false;



org.opensourcephysics.disp​lay.OSPRuntime.loadExportT​ool = false;
}

public void init () {



super.init();



org.opensourcephysics.tool​s.ResourceLoader.addApplet​SearchPath("/");



org.opensourcephysics.tool​s.ResourceLoader.addSearch​Path(getCodeBase()+""); // This is for relative files



org.opensourcephysics.tool​s.ResourceLoader.addSearch​Path(""); // This is for relative files, too



//org.colos.ejs.library.Si​mulation.setPathToLibrary(​getCodeBase()); // This is for classes (such as EjsMatlab) which needs to know where the library is



satelite_474._addHtmlPageI​nfo("Página Intro","_default_","Página​ Intro","./satelite_474_Int​ro 1.html");



if (getParentFrame()!=null) {



_model = new satelite_474 ("drawingFrame",getParentF​rame(),getCodeBase(),this,​(String[])null,true);



_simulation = _model._getSimulation();



_view = _model._getView();



}



else {



_model = new satelite_474 (null,null,getCodeBase(),t​his,(String[])null,true);



_simulation = _model._getSimulation();



_view = _model._getView();



}



_simulation.initEmersion()​;
}
public void _reset() { ((satelite_474)_model)._re​set(); }
public void _initialize() { ((satelite_474)_model)._in​itialize(); }
public void stop() { ((satelite_474)_model)._on​Exit(); }
} // End of class satelite_474Applet
 

Someone could help me? thanks....
Logged
Fu-Kwun Hwang
Administrator
Hero Member
*****
Offline Offline

Posts: 3080



WWW
«
Embed this message
Reply #1 on: July 17, 2011, 05:39:01 pm » posted from:Taipei,T'ai-pei,Taiwan

Please upload your ejs source as attachement.

You should not compile ejs generated java file. You should use EJS to compile it for you!
Logged
Alex_10
Newbie
*
Offline Offline

Posts: 6


«
Embed this message
Reply #2 on: July 17, 2011, 05:43:44 pm »

I attach the .xml, i think that this is the file that you mean.

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 #3 on: July 17, 2011, 07:23:52 pm » posted from:Taipei,T'ai-pei,Taiwan

1. You have defined many variables in variable panel, However, you did not provide initial values for many of those variables.
For example: You want satalite to rotate with angle o, but you never provide a value to variable o.

2. You defined a variables named as "drawingPanel3D". However, it is the same name for a 3D object(drawingPanel3D).
3. You have added two empty plottingPanel(without any GUI element in it).
There are too many strange setting in your ejs file and I do not know what you really want to do.
So I do not know how to correct it for you! 
Logged
lookang
Hero Member
*****
Offline Offline

Posts: 1784


http://weelookang.blogspot.com


WWW
«
Embed this message
Reply #4 on: July 18, 2011, 04:30:35 pm » posted from:SINGAPORE,SINGAPORE,SINGAPORE

I attach the .xml, i think that this is the file that you mean.

Thank you.

i think you need to remove all the codes that are creating the errors
for example
Incorrect value for transformation: ro:PosVol

i have removed all the errors, u need to put it back in with the appropriate syntax.

the key to programming in ejs could be to rename your project files at key implementation stages of new codes.

satellite_474.xml

do you have satellite_460 to share? i cannot get your source to run so i have little idea with your simulation aims to do and can do.


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

Posts: 6


«
Embed this message
Reply #5 on: July 18, 2011, 05:01:53 pm »

What do you mean with satellite_460?? How do you put out the error messages??  (thank you)

The salellite should turn and should be controlled for the wheel, the unic variable control is the Torque.

Logged
lookang
Hero Member
*****
Offline Offline

Posts: 1784


http://weelookang.blogspot.com


WWW
«
Embed this message
Reply #6 on: July 18, 2011, 05:21:43 pm » posted from:Singapore,,Singapore

Can u find the search icon on ejs?
I look at the error codes generated from the console.
Use the search to identify the location of the search
For example "posvol"
It will show all instants where the "posvol" occur
Remove them or fix them.

It is ok not to have satellite 4xx.XML
Just start to save different versions now so if things screw up so badly, can always abandon the file n revert to older files.

Look at the new source codes for the details
Logged
Alex_10
Newbie
*
Offline Offline

Posts: 6


«
Embed this message
Reply #7 on: July 18, 2011, 05:23:14 pm »

How should i indicate the rotation of the satellite?? i wrote this "r:0,0 & ro:o" but doesn't work.
Logged
ahmedelshfie
Ahmed
Hero Member
*
Offline Offline

Posts: 954



«
Embed this message
Reply #8 on: July 18, 2011, 08:15:51 pm » posted from:SAO PAULO,SAO PAULO,BRAZIL

May i misunderstanding something here, but when i check the xml source code, found that have many variables missed, uncompleted values, even the simulation doesn't running with me is always frozen,

by the way : I'm using the last version ejs 4.3.3.1
Logged
Alex_10
Newbie
*
Offline Offline

Posts: 6


«
Embed this message
Reply #9 on: July 18, 2011, 08:26:38 pm »

I attach the last version, anyway i don't get the rotation of the satellite.


*** There are 1 more attached files. You need to login to acces it!
Logged
lookang
Hero Member
*****
Offline Offline

Posts: 1784


http://weelookang.blogspot.com


WWW
«
Embed this message
Reply #10 on: July 18, 2011, 08:41:38 pm » posted from:SINGAPORE,SINGAPORE,SINGAPORE

Maybe u can read my source code from http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=2204.0
I made a satellite too

Yes Ahmed it is not working yet
« Last Edit: July 18, 2011, 09:06:58 pm by lookang » Logged
ahmedelshfie
Ahmed
Hero Member
*
Offline Offline

Posts: 954



«
Embed this message
Reply #11 on: July 19, 2011, 01:30:18 am » posted from:Uberaba,Minas Gerais,Brazil

Well, i suggest that you can use some satellite motion examples in ntnu as a reference, applets created by prof Hwang, lookang, i believe this can help you
To watch what you miss variables page, here some examples URLs

http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=517.0

http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=1877.0

http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=1723.0

You can download the jar file and unzip, open xml source code using Ejs and look to variables to find what your project missed and what you need to add.











 
Logged
Alex_10
Newbie
*
Offline Offline

Posts: 6


«
Embed this message
Reply #12 on: July 19, 2011, 10:18:10 pm »

The first thing, thank you really much too all for the help. You did amazing things with EJS  Shocked!!! For me is new this word, but really interesting.

The second thing, i check the examples thet you sent me and the question is: do I need one string for make the rotation?

My simulation is more easy than yours, i call this object satellite, becuase in the text of the exercise was write satelite, but the real thing is that is one obeject who's move only with rotation. So..... for make the rotation (in my case that is 2D) i understood that i should create one variable string (in my case rotString "y:0").

Am i rigth?  Huh
Logged
Alex_10
Newbie
*
Offline Offline

Posts: 6


«
Embed this message
Reply #13 on: July 19, 2011, 10:20:53 pm »

Could you send me more examples where one object made one move of rotation??? Thank you really much.
Logged
ahmedelshfie
Ahmed
Hero Member
*
Offline Offline

Posts: 954



«
Embed this message
Reply #14 on: July 19, 2011, 11:01:16 pm » posted from:SAO PAULO,SAO PAULO,BRAZIL

May you attach images for what you want , for me can have idea, i can also modified applet for be like you want, but as i said will be helpful
that you attach some images show the object that you want, this help professor Hwang, lookang and me to help you.

For example here is a simple modified i done, the original applet created by prof Hwang.

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!
« Last Edit: July 20, 2011, 12:36:50 am by ahmedelshfie » Logged
lookang
Hero Member
*****
Offline Offline

Posts: 1784


http://weelookang.blogspot.com


WWW
«
Embed this message
Reply #15 on: July 20, 2011, 08:18:48 am » posted from:SINGAPORE,SINGAPORE,SINGAPORE

the applet above looks modified by ahmed! nice one Smiley
where is the link for the applet? it is on your board? i cannot find it
« Last Edit: July 20, 2011, 08:21:00 am by lookang » Logged
Fu-Kwun Hwang
Administrator
Hero Member
*****
Offline Offline

Posts: 3080



WWW
«
Embed this message
Reply #16 on: July 20, 2011, 11:20:57 am » posted from:Taipei,T'ai-pei,Taiwan

You are welcomed to check out the following simple examples:

Logged
ahmedelshfie
Ahmed
Hero Member
*
Offline Offline

Posts: 954



«
Embed this message
Reply #17 on: July 20, 2011, 05:05:50 pm » posted from:Uberaba,Minas Gerais,Brazil

Thanks, yes in my board you can find at http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=1723.0

For Alex_10, i hope this what you need, for you watch the applet you need to click on the eye image.

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!

 
« Last Edit: July 20, 2011, 07:07:51 pm by ahmedelshfie » Logged
Alex_10
Newbie
*
Offline Offline

Posts: 6


«
Embed this message
Reply #18 on: July 20, 2011, 10:40:00 pm »

Thank you for all the things that you are sending me  Wink

I don't know miss something in my exercise but i thing i'm really close, know the satellite turn, but in one moment disappear.

I attach all the things that i have, all the information about the exercise, like this may be your answer are completily usefull for me.

1º I attach the picture of the thing that should turn, this object should have one move of rotation. Have two views but the simulation shuold be in 2D.

2º I attach the ecuations with that should have this object (satellite).

3º I attach my .xml

4º  Is a control system the angle "θ" of an axis of a satellite using a rotating wheel. To vary the angular velocity of the satellite "ω" changes the angular velocity of the wheel "v" by a motor located in the satellite.

Data:
  (Ω = v - ω) both are angular velocity.
  B = 1,01.10-6 (N.ms/rad) viscous friction coefficient.
  J1 = 13,6 kg.m2 moment of inertia of the satellite
  J2 = 13,6.10-4 kg.m2 moment of inertia of the flywheel.
  Je equivalent moment of inertia.
  T torque developed by the motor.

 


* Explorar.jpg (48.61 KB, 814x316 - viewed 596 times.)

* Explorar0001.jpg (38.15 KB, 715x166 - viewed 631 times.)

* Explorar0002.jpg (12.11 KB, 312x165 - viewed 588 times.)

*** There are 1 more attached files. You need to login to acces it!
Logged
ahmedelshfie
Ahmed
Hero Member
*
Offline Offline

Posts: 954



«
Embed this message
Reply #19 on: July 20, 2011, 11:09:22 pm » posted from:Uberaba,Minas Gerais,Brazil

Well, your XML code doesn't work with me, is frozen, i try find the reason to this error, however try look for the last applet and how rotate is work
look to variables pi,c and also look to Evolution page last variable is dc.






Logged
Alex_10
Newbie
*
Offline Offline

Posts: 6


«
Embed this message
Reply #20 on: July 22, 2011, 07:15:28 pm »

The problem is that the simulation of Professor the move of rotational  is constant, mine is the state variable that specify the angular position.

I tried to add this variables, pi, period,.... I changed the intial values, the programm gives good the initial value, but the object disppier one second after starting the simulation.

I'm a little bit pissed with my program, I do not know what else I can change.  Undecided
Logged
ahmedelshfie
Ahmed
Hero Member
*
Offline Offline

Posts: 954



«
Embed this message
Reply #21 on: July 22, 2011, 08:05:16 pm » posted from:SAO PAULO,SAO PAULO,BRAZIL

You should to check the variable o initial value =20 , i believe this variable is the reason to object disappear when you run the applet, try check.

For example try delete o form first shape (open Satelite, down at transform you add variable o delete) and run the applet again.
« Last Edit: July 22, 2011, 08:31:18 pm by ahmedelshfie » Logged
Alex_10
Newbie
*
Offline Offline

Posts: 6


«
Embed this message
Reply #22 on: July 22, 2011, 10:56:40 pm »

I tried this before and doesn't work. I change all the variables, and the initial values....  Huh
Logged
ahmedelshfie
Ahmed
Hero Member
*
Offline Offline

Posts: 954



«
Embed this message
Reply #23 on: July 22, 2011, 11:09:30 pm » posted from:Uberaba,Minas Gerais,Brazil

Well, as i said in my last post to you watch object you have to delete o variable i already test this and later i run applet the object is appear. I'm gonna attach image please
Check image i attach down post.
You should to delete this variable and run applet again object will appear try it.


* image.jpg (62.93 KB, 846x407 - viewed 601 times.)
Logged
Alex_10
Newbie
*
Offline Offline

Posts: 6


«
Embed this message
Reply #24 on: July 23, 2011, 06:54:04 pm »

Yes this is true, but if you put out this variable the object doesn't move, is totally stop.
Logged
Fu-Kwun Hwang
Administrator
Hero Member
*****
Offline Offline

Posts: 3080



WWW
«
Embed this message
Reply #25 on: July 23, 2011, 09:45:09 pm » posted from:Taipei,T'ai-pei,Taiwan

Normally, transform is used to rotate the object or change it width or height (shape) ...etc.

If you want to move an object, you can define variable x,y and assign them to Pos X and Pos Y.
Then provide equation to specify how x,y should change with time.

e.g. if you define dx/dt=vx; then the object will move with velocity vx in x direction.
Logged
Alex_10
Newbie
*
Offline Offline

Posts: 6


«
Embed this message
Reply #26 on: July 23, 2011, 11:25:18 pm »

I tried to do this also, but the problem is that i put the refence in the middle of the object, so in my case PosX = 0 and PosY = 0 all the time.

If i separate the componet x and the componet y, i would have to put the reference in a corner of the object. And i was searching this option for change the reference and i didn't find it.  Huh
Logged
Fu-Kwun Hwang
Administrator
Hero Member
*****
Offline Offline

Posts: 3080



WWW
«
Embed this message
Reply #27 on: July 24, 2011, 09:59:37 am » posted from:Taipei,T'ai-pei,Taiwan

Pos X and Pos Y are (x,y) coordinate for center of the object.

The default for (x,y) is refer to middle of the object. (You can change Offset property to change it;s reference point).

You should define x,y and set Pos X, Pos Y properties to x and y.

You are welcomed to check out description for those properties at http://www.um.es/fem/EjsWiki/Main/ElementsShape2D
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
show mathematic equation as part of the message
Misc
Fu-Kwun Hwang 2 24129 Last post October 23, 2008, 08:44:24 pm
by Fu-Kwun Hwang
Strange error message from PC where i am not admin
Questions related to EJS
lookang 4 8056 Last post February 09, 2009, 01:47:03 pm
by lookang
Micrometer with zero error options
misc
Fu-Kwun Hwang 0 18595 Last post November 07, 2009, 08:55:03 pm
by Fu-Kwun Hwang
Image in front of a mirror with thick glass
Optics
Fu-Kwun Hwang 2 24467 Last post April 06, 2011, 10:56:40 am
by Fu-Kwun Hwang
Hidden Message
illusion
Fu-Kwun Hwang 0 10866 Last post February 14, 2013, 07:28:22 pm
by Fu-Kwun Hwang
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.081 seconds with 23 queries.since 2011/06/15