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;
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
The above message is what I received in my private message box.
The following is my response to your question.
t = 0.100;
x = 0;
y = 0;
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
because you already set up correct evolution relations:
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:
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;