Generate the motion (Trajectory) of a sphere (or point) with given velocity value
Hi. I have this file ‘DATA’. The first 3 columns are the nodes in space (X,Y,Z in [m]). The 4th column is not of interest. The fifth column is the velocity in [m/s].
Is it possible to visualize the motion (green direction) of a sphere (e.g., the red one in the figure) moving following the velocity values in the fifth column of DATA?
load("DATA.mat");
figure
plot3(DATA(:,1),DATA(:,2),DATA(:,3),’-k’,’LineWidth’,0.1);
hold on
plot3(DATA(1,1),DATA(1,2),DATA(1,3),’r.’,’MarkerSize’,30);
hold off
axis equal
xlabel(‘x’)
ylabel(‘y’)
zlabel(‘z’)
grid offHi. I have this file ‘DATA’. The first 3 columns are the nodes in space (X,Y,Z in [m]). The 4th column is not of interest. The fifth column is the velocity in [m/s].
Is it possible to visualize the motion (green direction) of a sphere (e.g., the red one in the figure) moving following the velocity values in the fifth column of DATA?
load("DATA.mat");
figure
plot3(DATA(:,1),DATA(:,2),DATA(:,3),’-k’,’LineWidth’,0.1);
hold on
plot3(DATA(1,1),DATA(1,2),DATA(1,3),’r.’,’MarkerSize’,30);
hold off
axis equal
xlabel(‘x’)
ylabel(‘y’)
zlabel(‘z’)
grid off Hi. I have this file ‘DATA’. The first 3 columns are the nodes in space (X,Y,Z in [m]). The 4th column is not of interest. The fifth column is the velocity in [m/s].
Is it possible to visualize the motion (green direction) of a sphere (e.g., the red one in the figure) moving following the velocity values in the fifth column of DATA?
load("DATA.mat");
figure
plot3(DATA(:,1),DATA(:,2),DATA(:,3),’-k’,’LineWidth’,0.1);
hold on
plot3(DATA(1,1),DATA(1,2),DATA(1,3),’r.’,’MarkerSize’,30);
hold off
axis equal
xlabel(‘x’)
ylabel(‘y’)
zlabel(‘z’)
grid off motion, trajectory MATLAB Answers — New Questions