physics_update

physics_update - vx = 0; theta_o = 0; w = 0; mu_x=0.9;...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
function [vx, vy, w, xc_o, yc_o, theta_o] = physics_update(vx, vy, w, xc_i, yc_i, theta_i, dt, radius) g = 9.81; %=== For PRELAB completion==== % Remember to check if the ball is hitting the ground and update your % velocities appropriately yc_o = 0; xc_o = 0; vy = 0;
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: vx = 0; theta_o = 0; w = 0; mu_x=0.9; mu_y=0.75; mu_w=0.8; if yc_i == 0 + radius vx = vx*mu_x; vy = -(vy - g*dt)*mu_y; w = mu_w * w; elseif vx = vx; vy = vy -g*dt; w = w; end xc_o = xc_i + dt*vx; yc_o = yc_i + vy*dt; theta_o = theta_i + w*radius*dt; end...
View Full Document

Ask a homework question - tutors are online