subject

For this homework assignment, you will write a simplified model of a bouncing ball using numpy. assume the ball is dropped on venus under constant acceleration g=8.87ms2 from the limit of its atmosphere, a height of 250km. model the ball's motion for one hour and 15 minutes (include second 0 and second 4,500 in your data points). after the initial state, simulate 5,000 updates to the state (for a total of 5,001 points.) your simulation should use float64 numpy arrays for time (t) and height (y). time should be represented in seconds and height should be represented in meters.

bouncing

to simulate bouncing, we'll make some simplifying assumptions (since collision detection can be complicated). if the ball's height is ever less than or equal to 0, we will assume that the ball hit the ground before the time step we are simulating and already started bouncing. you should:

instantly set its height to 0

update its velocity to 90% (0.9) of its velocity from the previous time slice of the simulation

change the direction of travel (up instead of down)

count the number of times the ball bounces in an integer variable named bounces.

plotting y v. t may be useful for you to understand what results your code is producing.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 04:30
Which of the statements below is true? the formatting, standard, and drawing commands are unavailable. the formatting, standard, and drawing commands have been used. the formatting, standard, and drawing toolbars are displayed. the formatting, standard, and drawing toolbars are hidden.
Answers: 1
question
Computers and Technology, 23.06.2019 03:00
Jason, samantha, ravi, sheila, and ankit are preparing for an upcoming marathon. each day of the week, they run a certain number of miles and write them into a notebook. at the end of the week, they would like to know the number of miles run each day, the total miles for the week, and average miles run each day. write a program to them analyze their data. your program must contain parallel arrays: an array to store the names of the runners and a two-dimensional array of five rows and seven columns to store the number of miles run by each runner each day. furthermore, your program must contain at least the following functions: a function to read and store the runners’ names and the numbers of miles run each day; a function to find the total miles run by each runner and the average number of miles run each day; and a function to output the results. (you may assume that the input data is stored in a file and each line of data is in the following form: runnername milesday1 milesday2 milesday3 milesday4 milesday5 milesday6 milesday7.)
Answers: 3
question
Computers and Technology, 23.06.2019 19:00
Now you’re on your own. include a short summary of this section with plots in your lab report. write a matlab script file to do steps (a) through (d) below. include a listing of the script file with your report. 1 the soundsc(xx,fs) function requires two arguments: the first one (xx) contains the vector of data to be played, the second argument (fs) is the sampling rate for playing the samples. in addition, soundsc(xx,fs) does automatic scaling and then calls sound(xx,fs) to actually play the signal. mcclellan, schafer, and yoder, dsp first, 2e, isbn 0-13-065562-7. prentice hall, upper saddle river, nj 07458. c 2015 pearson education, inc. 4 mcclellan, schafer and yoder, signal processing first. prentice hall, upper saddle river, new jersey, 2003. c 2003 prentice hall. (a) generate a time vector (tt) to cover a range of t that will exhibit approximately two cycles of the 4000 hz sinusoids defined in the next part, part (b). use a definition for tt similar to part 2.2(d). if we use t to denote the period of the sinusoids, define the starting time of the vector tt to be equal to t , and the ending time as ct . then the two cycles will include t d 0. finally, make sure that you have at least 25 samples per period of the sinusoidal wave. in other words, when you use the colon operator to define the time vector, make the increment small enough to generate 25 samples per period. (b) generate two 4000 hz sinusoids with arbitrary amplitude and time-shift. x1.t / d a1 cos.2
Answers: 1
question
Computers and Technology, 23.06.2019 21:00
Will this setup result in what kathy wants to print?
Answers: 2
You know the right answer?
For this homework assignment, you will write a simplified model of a bouncing ball using numpy. assu...
Questions
question
Mathematics, 03.10.2021 15:20
question
Mathematics, 03.10.2021 15:20
question
Biology, 03.10.2021 15:20
question
Social Studies, 03.10.2021 15:20
question
German, 03.10.2021 15:20
question
Mathematics, 03.10.2021 15:20
Questions on the website: 13722362