NTNUJAVA Virtual Physics Laboratory
Enjoy the fun of physics with simulations!
Backup site http://enjoy.phy.ntnu.edu.tw/ntnujava/
July 09, 2020, 09:15:57 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  
"Choose a job you love, and you will not have to work for a day in your life." ...Confucius (551-479 BC)
Google Bookmarks Yahoo My Web MSN Live Netscape Del.icio.us FURL Stumble Upon Delirious Ask FaceBook

Pages: [1]   Go Down
Author Topic: Ask about graphic layout  (Read 4646 times)
0 Members and 1 Guest are viewing this topic. Click to toggle author information(expand message area).
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
waiting answer  pls

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

*** There are 1 more attached files. You need to login to acces it!
Fu-Kwun Hwang
Hero Member
Offline Offline

Posts: 3085

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.
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
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!
Pages: [1]   Go Up
"Choose a job you love, and you will not have to work for a day in your life." ...Confucius (551-479 BC)
Jump to:  

Related Topics
Subject Started by Replies Views Last post
Comment about this web site!
jeff_forssell 2 16608 Last post August 13, 2010, 11:26:43 am
by icetreat
Ask about layout
Question related to Physics or physics related simulation
ahmedelshfie 1 4731 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 5282 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.053 seconds with 22 queries.since 2011/06/15