NTNUJAVA Virtual Physics LaboratoryEnjoy the fun of physics with simulations! Backup site http://enjoy.phy.ntnu.edu.tw/ntnujava/
January 20, 2021, 05:45:55 am

"It is not the strongest of the species that survive, but the one most responsive to change." ..."Darwin(1809-1882, English naturalist Evolution)"

 Pages: [1]   Go Down
 Author Topic: Ask : How to draw v(t) with EJS  (Read 7713 times) 0 Members and 1 Guest are viewing this topic. Click to toggle author information(expand message area).
ahmedelshfie
Ahmed
Hero Member

Offline

Posts: 954

 « Embed this message on: December 30, 2009, 05:42:18 pm » posted from:Uberaba,Minas Gerais,Brazil

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
Hero Member

Offline

Posts: 3086

 « 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
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

Posts: 954

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

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

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 427 times.) Logged
lookang
Hero Member

Offline

Posts: 1796

http://weelookang.blogspot.com

 « 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 438 times.) Logged
Fu-Kwun Hwang
Hero Member

Offline

Posts: 3086

 « 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
"It is not the strongest of the species that survive, but the one most responsive to change." ..."Darwin(1809-1882, English naturalist Evolution)"

 Related Topics Subject Started by Replies Views Last post Brownian Motion zip file Thermodynamics aba persiano 2 16665 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 18534 August 15, 2007, 08:55:15 am by Fu-Kwun Hwang ejrconsole file does not run Information and Download Fred Chuit 6 14905 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 5114 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 7367 April 16, 2013, 10:22:49 am by lookang
Page created in 0.268 seconds with 22 queries.since 2011/06/15