MatCarAnim

版本 1.0 (31.1 KB) 作者: Johannes
animate single or multi-unit cars (or tractor / trucks - trailer)
238.0 次下载
更新时间 2018/6/13

查看许可证

This toolbox provides several functions and *.m-files to animate single or multi-unit car (or tractor / trucks - trailer) combinations with given trajectories of their center of gravity movements.
Exemplary usage:
% Installation: add the toolbox-functions to the MATLAB search paths
addpathMatCarAnim;
% Create new CarAnim-Struct
carAnim = newCarAnim('name','CarAnim_Test');
% Create an Animation-Window
carAnim = createAnimWindow(carAnim);
% New Car-unit: Tractor
[carAnim id1] = newCarUnit(carAnim);

(... Calc Simulation Results --> trajectories ...)

for idxPlot=1:length(psi_1)
% Update position (Trafo etc.) and draw it
carAnim = updateCarUnitStruct(carAnim,id1,'r_cg',r_1(:,idxPlot), ...
'psi',psi_1(idxPlot));
% Redraw object
redrawCarAnim(carAnim);

pause(0.05) % show the user the current figure
end

引用格式

Johannes (2024). MatCarAnim (https://www.mathworks.com/matlabcentral/fileexchange/67720-matcaranim), MATLAB Central File Exchange. 检索来源 .

MATLAB 版本兼容性
创建方式 R2013b
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Coordinate Transformations 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
版本 已发布 发行说明
1.0

update image
Update Description