physics_update

physics_update - %yc_o = 0; %xc_o = 0; %vy = 0; %vx = 0;...

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; mu_x=0.9; mu_y=0.75; mu_w=0.8; %=== For PRELAB completion==== % Remember to check if the ball is hitting the ground and update your % velocities appropriately
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: %yc_o = 0; %xc_o = 0; %vy = 0; %vx = 0; %theta_o = 0; %w = 0; vx = vx; vy = vy -g*dt; w = w; xc_o = xc_i + dt*vx; yc_o = yc_i + dt*vy; theta_o = theta_i - w*dt; if yc_o <= 0 + radius vx = vx*mu_x; vy = -vy*mu_y ; w = mu_w * w; yc_o=radius; end end...
View Full Document

This note was uploaded on 09/15/2011 for the course EE 150 at USC.

Ask a homework question - tutors are online