• Home   /  
  • Archive by category "1"

Assignment Model Video Falling

I often look at cases where things are falling. We typically call this "free fall" motion because the object is moving only under the influence of the gravitational force. With only the gravitational force, the object has a constant acceleration and the motion is fairly simple to model.

However, objects on the surface of the Earth usually have an air resistance force on them also. When can we ignore this extra force and when is it important?

Modeling Air Resistance ———————–

Let's say I drop a ping pong ball. As it falls, I can draw the following force diagram.

The most common model for the air resistance says that the magnitude of the force depends on:

  • The density of air (ρ). This typically has a value around 1.2 kg/m3.
  • The cross sectional area of the object (A). A ping pong ball would have a cross sectional area equal to π*r2.
  • The drag coefficient (C). This depends on the shape of the object. For a spherical object, a unitless value of 0.47 is typical.
  • The magnitude of the velocity squared. The faster you go, the greater the air resistance force.

The direction of the air resistance force is in the opposite direction as the velocity of the object. That's why there is a negative sign in the expression along with the r - hat (which is a unit vector in the direction of the velocity).

But how do you find values for the drag coefficients for different objects? The real answer is that you must measure them experimentally. However, Wikipedia has a nice list of some values. What about a falling human? I often have to model the motion of a falling human, but there isn't a C value listed. There is one trick I can use.

The trick involves terminal velocity. Suppose a human jumps out of a stationary hot air balloon. At first, only the gravitational force acts on the human giving an acceleration of -9.8 m/s2. However, as the human increases in speed, the air resistance force also increases. At some point, the air resistance force will be equal in magnitude to the gravitational force and the human will no longer increase in speed. We call this "terminal velocity".

Now for the trick. It seems to be mostly accepted that the terminal velocity for a skydiver is about 120 mph (53.6 m/s). Of course, this is the terminal velocity for the normal skydiving position with head facing down and arms and legs spread out. If I guess at a human mass of 70 kg, I can set the air resistance and gravitational forces equal. Also, for simplicity I am going to call all the constants in front of the velocity squared just K (since they don't change).

I only need the mass and the terminal velocity and I can build a model for air resistance. Yes, this is just a model. If you go super fast, this model probably isn't valid. For now, it's all I have to work with.

How High is Too High? ———————

If I drop an object from some height, there are two things I could do to obtain a value for the falling time. First, I could just ignore air resistance and use the typical kinematic equation:

Solving for the time is fairly straightforward. But what if I add in air resistance? What then? There is a problem. Air resistance is a force that depends on the velocity. This means that the force (and thus the acceleration) is not constant. That's a big problem.

We can still solve this with a numerical calculations. In short, I can use a computer to model just a tiny time interval for a falling object. During this short time interval, the forces are roughly constant. Here is an older post that gives an introduction to numerical calculations. Also, don't forget that my ebook (Just Enough Physics) has a whole chapter on numerical calculations.

Let's just get to the calculation. Here is a model of a ping pong ball falling from a height of 10 meters. Actually, this is a Glowscript program so you can run it yourself and even edit it. Try it! In this calculation, I have a ping pong ball and a ball without air resistance dropped from the same height. In this plot, you can see that the ping pong ball hits after the no-air resistance ball with a time difference of 0.32

But this doesn't answer the question: how high is too high? Of course, there isn't just one answer to this question. The maximum height depends on how accurate you want your model. Here is the real plot that you want. This shows the falling time difference between an object with air resistance and one without for different starting heights. Actually, since larger starting heights will have larger times, I have plotted the fractional difference in times.

From this, it looks like a human drop height of about 160 meters would give a falling time about 10% different than that without air resistance. If you are just getting a rough estimate (like falling off a building), it would probably be fine to ignore air resistance. If you were dropping a ping pong ball instead, I would assume no air resistance for heights around just 4 meters.

But it's not just about the falling time. Sometimes you care about the final velocity instead of the time. Could you just use the same cut-off heights for velocity that you do for time? I don't think so. Let's take a look at a falling human for example. If this human was falling off a building, near the end of the fall the air resistance would be much greater than it was at the beginning of the fall. However, this increase in speed at the very end might not make a huge difference in the falling time.

Here is a plot for the same objects showing the fractional difference in final velocities for with and without air resistance.

If I go with the same idea of getting just a 10 percent velocity error, the falling height for a human would 60 meters instead of 160 meters.

Homework ——–

Ok, there are things left to look at - so I will give them as a homework assignment.

  • What about the kinetic energy at the end of a fall? How high would a human have to fall so that there was just a 10 percent error in KE?
  • Suppose I want to drop a ping pong ball in a lecture class to show that you need to include the air resistance in order to properly model its motion. How high should I drop this ball?
  • I want to make some spheres made of wood (let's say wood has a density of 900 kg/m3). Make a plot of drop height for a 10 percent fall time error vs. ball radius. As the ball gets larger, it's mass to cross sectional area ratio changes. Bigger balls should be able to be dropped from a larger height with less error. How small should a wooded ball be such that if dropped from a height of 2 meters, the fall time is off by 10 percent?

That's your homework.

Nifty Assignments

The Nifty Assignments session at the annual SIGCSE meeting is all about gathering and distributing great assignment ideas and their materials. For each assignment, the web pages linked below describe the assignment and provides materials -- handouts, starter code, and so on.

Applying for Nifty is now done as its own track with a similar deadline to special sessions. The format and content of the .zip you submit is unchanged. See the info page for ideas about what makes a nifty assignment and how to apply for the Nifty session.

Please email any suggestions or comments to Nick Parlante @ cs.stanford.edu with "nifty" in the subject. Nick's Home

Nifty Assignments 2017
Falling Sand - Dave Feinberg CS1 Very engaging falling simulation
2048 in Python - Kunal Mishra CS1 The fantastic 2048 game works great as a CS assignment
Fractal Sound - Josh Hug CS1 Amazing sound generation and visualization
SAT Synonyms - Michael Guerzhoy CS1-CS2 Fun big data application to the familiar SAT word problems
NBody Simulation - Kevin Wayne CS2 Captivating gravity simulation. Gravity .. it's everywhere!
Nifty Assignments 2016
Mountain Paths -- Baker Franke CS1 Neat simple algorithm in 2D arrays
Restaurant Recommendations Yelp Maps -- Brian Hou, Marvin Zhang, and John DeNero CS1 Nifty data visualization of restaurant data
Rack-O Game -- Arvind Bhusnurmath, Kristen Gee, and Karen Her CS1 Play and AI code for an easy game
Movie Review Sentiment -- Eric Manley and Timothy Urness CS1/CS2 Neat word analysis from a surprisingly simple algorithm
HugLife -- Josh Hug CS1/CS2 Grid simulation game that shows off testing
Autocomplete-me -- Kevin Wayne CS2 Neat applied use of word storage and binary search
Nifty Assignments 2015
Counting Squares -- Mark Sherriff, Luther Tychonievich, and Ryan Layer CS0/CS1 Neat and easy squares activity
Speed Reader -- Peter-Michael Osera CS1 Nifty Animation
GeoLocator -- Stuart Reges CS1 Fun Geo Data
Packet Sniffing -- Suzanne Matthews and David Raymond CS1 Eye Opening Networking
Melody Maker -- Allison Obourn and Marty Stepp CS1 Fun with Sound
Seam Carving -- Josh Hug CS1/CS2 Amazing Image Resize Trick
Nifty Assignments 2013
Twitter Trends -- John DeNero and Aditi MuralidharanCS0-CS1 Neat output with a hip big-data source
Collage -- Mark GuzdialCS0 Novel media output by combining images
Authorship Detection -- Michelle CraigCS1 Surprisingly effective data driven categorization with basic coding
Recursive TurtleGraphics -- Eric RobertsCS1 Get at the essential recursive idea very easily
Campus Shuttle -- David MalanCS1 Stunning graphical tour
Estimating Avogadro's Number -- Kevin WayneCS1/CS2 Surprisingly easy image processing of lab data to get a real-world result
Nifty Assignments 2012
Stereo Sound Processing -- Daniel ZingaroCS1 (early) - Fun and impressive early in the quarter - remove vocals from sound
Guitar Heroine -- Kevin WayneCS1/CS2, Extremely neat -- math model creates realistic guitar sound
Uno -- Stephen DaviesCS1, Strategy AI to play Uno.
Image Editor -- Joshua T. Guerin and Debby KeenCS1/CS2 Code to experiment with images, but requiring only the ability to change text files.
Igel Ärgern -- Zachary KurmasCS2 Hedgehogs in a Hurry game
Binary Bomb -- David O'HallaronPost CS2 -- neat assignment puzzle to play with understanding of compiled code and memory as they truly are. On the linked page, see the README, Writeup, Release Notes, Self-Study Handout which all work without a password. To play with the code, email Dave and he'll send you what you need to get the binaries.
Nifty Assignments 2011
Image Puzzles -- Nick ParlanteCS0 or later, great puzzles using images, tiny code required
BMP Puzzles -- David MalanCS1, More and better image puzzles, looking at bytes of BMP file representation
Book Recommendations -- Michelle CraigCS1, Like the Netflix movie-recommendation system, generate book recommendations. Surprisingly simple algorithms give a neat results.
Generic Scrolling Game -- Dave FeinbergCS1, Project pattern which supports a variety of games. Easily allows students to customize rules, graphics etc. of simple game.
Wator World -- Mike ScottCS1-CS2, Shark/fish simulation using GridWorld type abstraction. Neat simulation/modeling example working from simple rules.
Hamming Codes -- Stuart HansenCS2, Neat exercise with a real algorithm. Push the students to understand that it's really all bytes.
Evil Hangman -- Keith SchwarzCS2 or late CS1 - Awesome variant of Hangman, where the computer cheats by dodging all the user's guesses
Nifty Assignments 2010
Picobot -- Zachary DoddsCS0-CS1, day-1 assignment -- neat environment to get students started, works in the browser
Pig -- Todd NellerCS1, intermediate difficulty game to implement, but students love it and lots of variations
Song Generator -- Daniel ZingaroCS1, implement filters with short bits of code, but it all works in the domain of sound, making in a novel and engaging domain for the students
CSI: Computer Science Investigation -- David MalanThe instructor accidentally erases the compact flash card containing their images. Students write code to recover the images, solve the treasure hunt using the images
Encryption Chase -- Mark SherriffCS2, encryption coding, embedded in a team active-learning campus treasure hunt
Chatting Aimlessly (IM) -- Thomas MurtaghCS1, implement simple instant messaging client in CS1 -- talk about a technology near to the student heart!
Nifty Assignments 2009
Star Map -- Karen ReidCS1, neat drawing of the night sky and constellations -- simple file reading and drawing
Face Pamphlet -- Mehran SahamiCS1, simple Facebook application built with just CS1 technology, students love it
Secrets In Images -- Brent Heeringa, Thomas MurtaghCS1, hide secret messages inside images -- neat image manipulation with data as simple arrays
Random Art -- Christopher A StoneCS1, build nifty images with recursive nested random symbolic math expressions (python)
Enigma Encryption -- Dave ReedCS1-CS21, range of easy to complex cryptography projects, using paper/manipulation model to get started
DNA Splicing -- Owen AstrachanCS2, surprisingly easy DNA manipulation, set up for the students to measure/experiment with their code
Nifty Assignments 2008
Catch Plagiarists -- Baker FrankeCS1-CS2, typical CS2 data structures, difficulty can be adjusted. Search within a set of documents to find pairs with copied content
Genetic Algorithm TSP -- Raja SooriamurthiCS1-CS2, basic genetic algorithms. Use genetic algorithms to solve the traveling salesman problem
Asteroids -- Dan Leyzberg, Art SimonCS1-CS2, objects, inheritance, abstract classes. An impressive implementation of Asteroids with OOP design and inheritance
Huffman Images -- Morgan McGuire, Tom MurtaghCS1(late) or CS2(early). Labs to explore huffman compression in the context of image bitmap manipulation
Maze Solver -- Don BlahetaCS2, stacks, queues, 2d arrays. Play around with algorithms to solve a maze. Works with gridworld
Dice Flip -- Cay HorstmannCS1-CS2, prolog for advanced CS2, java for late CS1 variant. Explore simple but subtle dice game
Nifty Assignments 2007
Media Manipulation -- John CigasCS0-CS1, spreadsheet use or basic code. Transfer media data to spreadsheet form to make manipulation easy
ASCIImations -- Dave ReedCS0-CS2. ASCII animations make fun, creative output with surprisingly simple code (Javascript, Java, ...)
Mindreader -- Raja SooriamurthiCS1, CS2. basic logic, map interface (arrays or Hashmaps). Build a surprisingly good computer opponent for a guessing game
Solitaire OOP -- Robert NoonanCS2, OOP and patterns to explore family of solitaire games
Sliding Blocks Puzzle -- Mike ClancyCS2, significant recursion and data structures. Recursive and heuristic work to solve the sliding blocks puzzle.
Fire -- Angela ShifletCS2, 2-d arrays, simulation. Neat, real-world example simulating spread of fire across a terrain, depending on humidity etc.
Nifty Assignments 2006
Book Code (ISBN) -- John MotilCS1, basic logic to play with ISBN numbers. Fun because we are surrounded by these numbers .. use them for basic examples
Natural Prestidigitation -- Steve WolfmanCS1, basic logic, loops, arrays. Appears dull, but has a neat surprise ending.
Breakout -- Eric RobertsCS1, basic logic, loops using ACM graphics early in the term
Dancing Turtles -- Chris NevisonCS1, inheritance with dancing turtles and ACM graphics
Solitaire Encryption -- Lester I. McCannCS2, list manipulations, algorithmic code, file reading. Implements a very novel type of encryption.
Anagram Solver -- Stuart RegesCS2, recursive backtracking ... a very fun application of recursive search
RSS Reader -- Jerry CainCS2, data structures, networking ... neat to implement a client for a real protocol
Nifty Assignments 2005
Test Me -- David LevineCS0-CS1, students write tests to examine black box code -- nifty and no code writing
Grid Plotter -- Alyce Brady and Pam CutterCS1, neat way to learn and practice loop code
Complementary Currency -- Paul KubeCS1, OOP by creating a currency ... has a community/social aspect among the students
Name Surfer -- Nick ParlanteCS1, loops, arrays, files. Graph baby name data for the last 100 years. Nifty because the data is nifty.
Photomosaics PPT (PDF version) -- Rich PattisCS2, create image made of many little images .. but there is a patent on it
Image Lab -- Aaron GordonCS2, framework to allow students to write filters on 2-d data and see them applied to images
  • Nifty Assignments 2004

  • Nifty Assignments 2003
    • Virtual Pests -- Jeffrey L. Popyack -- a fun CS1 assignment using JavaScript
    • Pong -- Grant Braught -- a neat "objects first" assignment
    • Lunar Lander -- Stuart Reges -- another fun "objects first" assignment
    • HTML Browser -- Scott Dexter and Chaya Gurwitz -- CS2 assignment to render HTML
    • Backtracking -- Stephen Weiss -- CS2 all about backtracking
    • Random Writer -- Joe Zachary -- a neat CS2 data structure problem

  • Nifty Assignments 2002
    • Blurbs from the proceedings
    • Shall We Play A Game? -- Dan Garcia -- A system where students can play around with game playing AI (CS0)
    • Neat Javascript projects -- Dave Reed -- Using Javascript as a simple introduction to programming (CS0)
    • Adventure -- John Estell -- Using the classic adventure game as a largish project (CS2)
    • Sorting Detective -- David Levine -- A fun variation on the old "sorting algorithms" homework  (CS2)
    • Boggle -- Julie Zelenski (in cahoots with Owen Astrachan) -- Using the Boggle game to explore recursive algorithms and data structure tradeoffs (CS2)
  • Nifty Assignments 2001
    • Blurbs from the proceedings
    • Windows and Regions -- Mike Clancy -- an algorithmic problem using 2-d regions. An excuse to do some linked-list (or ArrayList) type manipulation. Give the students a feel for "window" manager region operations.
    • Personality Test -- Stuart Reges -- sort and match the personality data of the class (more fun than it sounds!)
    • Quilt -- Julie Zelenski -- a fun, drawing-intensive CS1 project that emphasizes decomp
    • Word Ladder -- Owen Astrachan -- a string manipulation puzzle
    • Tetris -- Nick Parlante -- a large OOP project, with a tetris board, tetris piece, tetris game, and a pluggable tetris brain . Can be used as a small project where students just write a Tetris brain and plug it in, or can be used as a large CS2 OOP project. The nifty materials include a runnable JTetris.jar sample, and an Instructor's Guide
  • Nifty Assignments 1999
    • Blurbs from the proceedings
    • Cat And Mouse -- Mike Clancy -- (CS1) a cute problem which requires non-trivial geometry and algorithms, but can be solved in 100 lines.
    • Bagels -- Stuart Reges -- (CS1) a fun game with some algorithmic complexity.
    • DNA -- Richard E. Pattis -- (CS1) great first data structures and performance tuning problem.
    • Huffman Coding -- Owen Astrachan -- (CS2) decomposition and data structures.
    • The Random Sentence Generator -- Julie Zelenski -- (CS2) a fun use of grammars, recursion, and ADTs.
    • Darwin's World -- Nick Parlante -- (CS2) a simulator featuring decomposition and a simple interpreter.
    Also of interest: The Stanford CS Education Library of free CS Education Materials, home of the Binky Pointer Video!

    One thought on “Assignment Model Video Falling

    Leave a comment

    L'indirizzo email non verrà pubblicato. I campi obbligatori sono contrassegnati *