Write a simplified model of a bouncing ball using numpy

Assignment Help Computer Engineering
Reference no: EM132213390

Question :

You will write a simplified model of a bouncing ball using numpy. Assume the ball is dropped on Venus under constant acceleration g=8.87 m/s2 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.

Reference no: EM132213390

Questions Cloud

Take all the lines input to standard input and writes them : Write a short C++ program that takes all the lines input to standard input and writes them to standard output in reverse order.
Find the mean of all values of an integer array : Write a simple ARM assembly language program that finds the mean (as an integer) of all values of an integer array.
Write short notes on inheritance : Write short notes (a few sentences) on Inheritance as it relates to Object Oriented Programming.
Compute and create three tables for the fibonacci numbers : Write a set of algorithms and programs to compute and create three tables for the Fibonacci numbers: one recursive, one ‘fast recursive', and one iterative.
Write a simplified model of a bouncing ball using numpy : Write a simplified model of a bouncing ball using numpy. Assume the ball is dropped on Venus under constant acceleration.
Calculate number of hours and minutes and seconds : Write a simple algorithm in Java to calculate number of hours, minutes, and seconds from a given number of seconds, please include comments.
Plot the function and the solution of the function : Write a simple MATLAB program to differentiate and integrate based off of the definitions for differentiation and integration.
Write a short c program along with a design tool : You are to write a short C program along with a design tool that will load an array with values, then search for a value using a linear search.
Create an if statement that is unconditionally true : Test whether variable x is even (An even number is an integer that is exactly divisible by 2) .if it is , increment x.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Creating the algorithm

We suppose that we are given a majority graph in order to generate agenda for managing the sequential majority kind of election.

  How many times was the predictor correct

Starting at the first "not-taken" branch, what would the prediction have been for each branch? How many times was the predictor correct?

  Give a brief explanation for each dhcp message which would

provide a brief description for each dhcp message that would be exchanged in order if the dhcp server is in the middle

  How to prepare an implementation plan

Boardman Management Group manages the Baderman Island resort. They are considering whether to upgrade the word processing software recent in use at the resort or to buy a new word processing software application. Boardman plans to hire Smith Syste..

  Find the minimum number of multiplexer and gates

find the minimum number of multiplexer and gates to realize the given function.

  Find temperature difference between wall surface and fluid

Using the approximate solution developed in the text for a laminar boundary layer with constant free-stream velocity and a simple step in surface temperature.

  Compute the constants of the classification functions

In the sample, almost 40% of the e-mail messages were tagged as spam. Compute the constants of the classification functions to account for this information.

  Make perl script in order to display a basic web page

design a Perl script in order to display a basic Web page and display system information that is dynamic using Perl on the screen such as date and time as well as the host and how long system has been up.

  Write a description of a computer law

Write a description of a computer law that you would like to have passed, along with specifications as to its implementation, enforcement, and justification.

  Creates and returns a new copy of the received array

Write a Java method that Receives an array of integers of any length and Creates and returns a new copy of the received array.

  What is relationship between size and complexity and testing

What is the relationship between Size and Complexity and Testing? Do you agree: Better Code Coverage means better quality?  Based on the article what are the techniques that can be used to test large software?

  Provide a simple method for constructing a clique tree

Provide a simple method for constructing a clique tree such that a given set of variables Y is guaranteed to be to together in some clique.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd