NTNUJAVA Virtual Physics Laboratory
Enjoy the fun of physics with simulations!
Backup site http://enjoy.phy.ntnu.edu.tw/ntnujava/
October 21, 2017, 08:31:24 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  
"It is not the strongest of the species that survive, but the one most responsive to change." ..."Darwin(1809-1882, English naturalist Evolution)"
Google Bookmarks Yahoo My Web MSN Live Netscape Del.icio.us FURL Stumble Upon Delirious Ask FaceBook

Pages: [1]   Go Down
  Print  
Author Topic: Ask about graphic layout  (Read 3731 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: January 20, 2010, 07:51:26 pm » posted from:Uberaba,Minas Gerais,Brazil

Hello prof i had problem with project pls help
Is about layout graphic between velocity and time
I try all time make layout graphic get right
But i don't know how pls so i will send attach
For project XML and picture jpg i mark by black line
what i want make in graphic layout
Respect
waiting answer  pls
Ahmed
 


* Ask.JPG (186.25 KB, 1680x1050 - viewed 285 times.)

*** 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: January 20, 2010, 10:19:56 pm » posted from:Taipei,T\'ai-pei,Taiwan

You should have moved the following code to initialization page instead of "fixed relation" page.
Code:
vx = v0*Math.cos(theta);

vy = v0*Math.sin(theta)-g*t;

1. EJS first process "variables" page to allocate memory for variables and set initial value according to your definition.
2. EJS then do commands in "Initialize" page.
3. EJS modified variables in "Evolution" page
4. EJS process commands in "Fixed relations" page.

Then it go to step 3 , and it become a loop when simulation is in play mode.

All the variables need to be initialized before evolution page. So you should put
Code:
vx = v0*Math.cos(theta);

vy = v0*Math.sin(theta); // -g*t is removed because it is correspond to t=0
in initialize page.

If you put the above two line in "fixed relation" page, then vx and vy values will never be changed.

The relation "d(vy)/dt=-g" in evolution page will calculate vy(t)=vy(0)-g*t automatically at each time step.

Two more traces are added in the view.

The modified page is attached.


*** There are 1 more attached files. You need to login to acces it!
Logged
Pages: [1]   Go Up
  Print  
"It is not the strongest of the species that survive, but the one most responsive to change." ..."Darwin(1809-1882, English naturalist Evolution)"
 
Jump to:  


Related Topics
Subject Started by Replies Views Last post
Layout TOO WIDE
Comment about this web site!
jeff_forssell 2 15555 Last post August 13, 2010, 11:26:43 am
by icetreat
Ask about layout
Question related to Physics or physics related simulation
ahmedelshfie 1 3700 Last post January 28, 2010, 04:30:23 pm
by Fu-Kwun Hwang
How use graphic Buttons in EJS?
Questions related to EJS
ahmedelshfie 2 4238 Last post May 06, 2010, 05:21:14 pm
by ahmedelshfie
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.058 seconds with 23 queries.since 2011/06/15