Code covered by the BSD License
-
params(varargin)
PARAMS M-file for params.fig
-
throw_body
velocity:
-
bdf(hfl)
Button Down Function
-
buf
reset hystory:
-
hfl=create_object(x,y,r,no)
create movable with mouse object
-
move(hfl,xp,yp,xd,yd,kkx,kky,...
makes move
-
ret_body
return body
-
update_in_main
-
run_me.m
-
View all files
from
throw body with mouse
by Maxim Vedenyov
It throws body in gravitation. Initial velocity defined by pointer velocity.
|
| ret_body
|
function ret_body
% return body
global xys vx vy xyh th hsm hlg hfl00 xa1 ya1
% reset hystory:
xys=[0;0];
update_in_main;
% update in small:
xa=xys(1,:)+xa1;
ya=xys(2,:)+ya1;
set(hfl00,'Xdata',xa,'Ydata',ya);
drawnow;
vx=0;
vy=0;
xyh=[];
th=[];
hlg=0; % hystory length
|
|
Contact us at files@mathworks.com