-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbasicdata.m
More file actions
22 lines (15 loc) · 918 Bytes
/
Copy pathbasicdata.m
File metadata and controls
22 lines (15 loc) · 918 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
clc ; clear ; close all;
global tg g cir dt mycircle mypolygone pol ;
a=1; vel=1;
tg=-90; % angle giving direction to gravity
g_m=6; % gravilty magnitude
g=g_m*[cosd(tg) sind(tg)]; % garvity vector
cir=0; % for counting no of circle
pol=0; % for countig number of objects or polygon
dt=.01; % time intervall
%% structure variable
mycircle=struct('han',{},'linehan',{},'anchor',{},'mass',{},...
'weight',{},'vel',{},'collision',{});
mypolygone=struct('han',{},'slope',{},'theta',{},'cons',{},'collision',{});
poscir_save=struct('position',{},'x',{},'y',{});
poly_save=struct('x_data',{},'y_data',{});