added multiple visualization perspectives

This commit is contained in:
2025-10-27 09:22:20 -07:00
parent d0a060f404
commit 8af5e87272
5 changed files with 80 additions and 15 deletions

10
agent.m
View File

@@ -52,8 +52,16 @@ classdef agent
% Plot points representing the agent position
hold(f.CurrentAxes, "on");
scatter3(obj.pos(1), obj.pos(2), obj.pos(3), 'filled', 'ko', 'SizeData', 50);
o = scatter3(obj.pos(1), obj.pos(2), obj.pos(3), 'filled', 'ko', 'SizeData', 25);
hold(f.CurrentAxes, "off");
% Check if this is a tiled layout figure
if strcmp(f.Children(1).Type, 'tiledlayout')
% Add to other perspectives
copyobj(o, f.Children(1).Children(2));
copyobj(o, f.Children(1).Children(3));
copyobj(o, f.Children(1).Children(5));
end
end
end
end