NTNUJAVA Virtual Physics Laboratory
Enjoy the fun of physics with simulations!
Backup site http://enjoy.phy.ntnu.edu.tw/ntnujava/
December 17, 2017, 08:38:08 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  
Use resources around us effectively. ...Wisdom
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 : How to draw v(t) with EJS  (Read 6146 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: December 30, 2009, 05:42:18 pm » posted from:Uberaba,Minas Gerais,Brazil

Hello professor this project XML my ask is about
graphic of (V) i typing equations Vx,,Vy,,and V
but only graic v about time no work so i change
i think is mathematics on evolution... so (T)(V) graphic no Right .. thanks for help
with my respet
Ahmed


*** 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: December 31, 2009, 10:54:14 pm » posted from:Taipei,T\'ai-pei,Taiwan

Quote
Hello prof thank you for your help the project is motion project v;vx;vy i get equations vx and vy right valecoty, the ramp and grafity only problem about t(time) grfic of time so variables is,, t = 0.0,, y = 0.0,, vy = 0.0,, g = 9.8,,  x = 0.0,,  vx = 0.0,,  v0 = 10,,  theta = 1.57,,,,
ok and all type is (double) so i make equation in initialization  vx and vy by this way vx = v0*Math.cos(theta); / vy = v0*Math.sin(theta);
and typing in initialization  t = 0;
  x =0;
  y =0;
  g =9.8;
ok so all get right about grafic now only the problem is i wanna get grafic of time and for me get grfaic time on plot that mean i use (V) so
v = math.sqrt(vx*vx)+(vy*vy-g*t); i typing by way of easy java becouse i try typing equation by mathtype and paste for you but no accept  so prossor i hope u can helpĀ“me how i get (V) on program and grfic t (time) for (V)
thank you profssor for you help
with all my respect
ahmed
The above message is what I received in my private message box.
The following is my response to your question.

Code:
t = 0.100;
x = 0;
y = 0;
g =9.8;
vx = v0*Math.cos(theta);
vy = v0*Math.sin(theta)-g*t;
The above is what you wrote in initialize page. Normally, what I will do is
Code:
t=0.s;
x=0;
y=0;
g=-9.8;
vx=v0*Math.cos(theta);
vy=v0*Math.sin(theta);
because you already set up correct evolution relations:
dx/dt=vx
dy/dt=vy;
dvy/dt=-g;
when simulation is playing, it will calculate x(t),y(t),vy(t) according to the above equations.

There are three trace in your plottingPanel:
Code:
The name:  Input X and Input Y are
1. plot : x,y
2. plot2: x,vy
3. plot2: vx,t

If I want to show trace vary as function as time t, the Input X property should be all time t.
If you want to show v=Math.sqrt(vx*vx+vy*vy) as function of time
you can assign Input X as t, and assign Inoput Y as Math.sqrt(vx*vx+vy*vy).
If you assign Input X as t, and Input Y as vy, you will find a stralight line because vy=vy(t=0)-g*t;
Logged
ahmedelshfie
Ahmed
Hero Member
*
Offline Offline

Posts: 954



«
Embed this message
Reply #2 on: January 04, 2010, 04:47:00 pm » posted from:Uberaba,Minas Gerais,Brazil

Hello profssor this Xml file i post topic befor about this project like you ask me
im try get ghrapic of (V) i think the problem in evolution im wait your answer profssor
with all my respect
Ahmed


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

Posts: 954



4 hi
«
Embed this message
Reply #3 on: January 04, 2010, 07:09:09 pm » posted from:Uberaba,Minas Gerais,Brazil

Hello prof i find word file i send you as jpg for you see graphics of velocity with time (V)(T)
thanks so much
Ahmed


* 000.JPG (173.17 KB, 1680x1050 - viewed 290 times.)
Logged
lookang
Hero Member
*****
Offline Offline

Posts: 1784


http://weelookang.blogspot.com


WWW
«
Embed this message
Reply #4 on: January 04, 2010, 09:18:11 pm »

u want to plot vx , vy and |v| ?

U may want to look into the source xml here
http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=745.0




* projectile.png (58.16 KB, 1021x851 - viewed 297 times.)
Logged
Fu-Kwun Hwang
Administrator
Hero Member
*****
Offline Offline

Posts: 3080



WWW
«
Embed this message
Reply #5 on: January 05, 2010, 11:25:25 pm » posted from:Taipei,T\'ai-pei,Taiwan

Hello prof i find word file i send you as jpg for you see graphics of velocity with time (V)(T)
thanks so much
Ahmed

You should move
Code:
if (y< 0) _pause();
to Fixed relations tab.

You do not need \frac{dv}{dt}=g*t-vy.
\frac{dvy}{dt}=-g will calculate vy(t)=vy(t=0)-gt for you


I have modified your ejs xml source.
Please check out the attached file.


*** There are 1 more attached files. You need to login to acces it!
Logged
Pages: [1]   Go Up
  Print  
Use resources around us effectively. ...Wisdom
 
Jump to:  


Related Topics
Subject Started by Replies Views Last post
Brownian Motion zip file
Thermodynamics
aba persiano 2 14235 Last post February 25, 2007, 11:14:53 pm
by Fu-Kwun Hwang
how to draw a fraction of a circle for angle showing in plotting panel
Questions related to EJS
lookang 7 16538 Last post August 15, 2007, 08:55:15 am
by Fu-Kwun Hwang
ejrconsole file does not run
Information and Download
Fred Chuit 6 12993 Last post January 12, 2015, 06:51:35 pm
by whitecrow4
How to combine simulation with a quicktime movie file
Examples for beginner who want to learn EJS
Fu-Kwun Hwang 0 3950 Last post June 13, 2010, 09:59:10 am
by Fu-Kwun Hwang
Modified Atwood Machine lab (Investigate F proportional to a)
Collaborative Community of EJS
LeeTl 3 5565 Last post April 16, 2013, 10:22:49 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.303 seconds with 23 queries.since 2011/06/15