필터 지우기
필터 지우기

Rolling ball on 3D surface

조회 수: 2 (최근 30일)
Angelo Charry
Angelo Charry 2019년 2월 7일
편집: James Tursa 2019년 2월 7일
Hi,
For a school project I need to study the dynamic of a ball. I already finished the flight and bouncing dynamic but now I need to make it roll on any 3D surface using ode45.
I came with this idea :
function F = Roulement(t,Y)
P = Parametres() ;
g = P.gravite ;
n = normale(Y(1),Y(2),'terrain')
ez=[0,0,1]';
F = [Y(4);Y(5);Y(6);g*(n*ez)*n(1);g*(n*ez)*n(2);g*(n*ez)*n(3)-g];
Where normale return the normal vector for the point (Y(1),Y(2)) of the function terrain (the 3D surface), Roulement is the function that I will next give to ode45.
Of course it can't work because Y(1) and Y(2) are not scalars. So what should I do ?
Thanks
  댓글 수: 1
James Tursa
James Tursa 2019년 2월 7일
편집: James Tursa 2019년 2월 7일
This really looks like a sliding point mass simulation, not a rolling ball simiulation. Why aren't Y(1) and Y(2) scalars? Do you have a 6-element state vector (3 position and 3 velocity)? Can you tell us more about how you have set this problem up?

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Ordinary Differential Equations에 대해 자세히 알아보기

제품


릴리스

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by