Docsity

CS 123 Engineering Computation Lab: Integration and Animation - Prof. Bruce W. Char, Lab Reports of Computer Science

Toggle sidebar
bg1
4/18/2009
1
CS 123 Engineering Computation Lab
Lab 2
Dan De Sousa and Bruce Char
Department of Computer Science
Drexel University
April 2009
©By the author. All rights reserved. Permission is given to CS123 Spring
2009 staff and students to use and reproduce these notes for their own use.
Your class instructor and TA
• Instructor for this section:
Office:
Email:
Telephone:
• Your TAs are:
Regarding Last Week
• Questions on quiz 1?
• We will be checking lab 1 after lecture and
during lab.
• Questions about lab 1 grading?
Regarding This Week’s Lab
• 2 parts to the lab (plus extra credit)
• Expected to complete part 1 in class
• Complete part 2 (extra credit optional) for
next lab (in 2 weeks)
Chat Room Office Hours
• Online office hours in the chat room start
week of 4/27
• You’ll be able to ask questions about quiz 2
• E-mail notice when the chat sessions will
be scheduled along with setup logistics and
ground rules
Class Overview
• Integration
• Animate
pf3
pf4
pf5

Partial preview of the text

Download CS 123 Engineering Computation Lab: Integration and Animation - Prof. Bruce W. Char and more Lab Reports Computer Science in PDF only on Docsity!

CS 123 Engineering Computation Lab

Lab 2

Dan De Sousa and Bruce Char Department of Computer Science Drexel University April 2009 ©By the author. All rights reserved. Permission is given to CS123 Spring 2009 staff and students to use and reproduce these notes for their own use.

Your class instructor and TA

  • Instructor for this section: Office: Email: Telephone:
  • Your TAs are:

Regarding Last Week

  • Questions on quiz 1?
  • We will be checking lab 1 after lecture and during lab.
  • Questions about lab 1 grading?

Regarding This Week’s Lab

  • 2 parts to the lab (plus extra credit)
  • Expected to complete part 1 in class
  • Complete part 2 (extra credit optional) for next lab (in 2 weeks)

Chat Room Office Hours

  • Online office hours in the chat room start week of 4/
  • You’ll be able to ask questions about quiz 2
  • E-mail notice when the chat sessions will be scheduled along with setup logistics and ground rules

Class Overview

  • Integration
  • Animate

Integration

  • Integral of a function:

Indefinite Integral:

Definite Integral:

Integration In Maple

  • Take the definite or indefinite integral with the int() function. Indefinite Integration (^) Definite Integration

Practical Usage

  • In the same way differentiation has practical applications in engineering, anti- differentiation is also useful
  • Real world models you need to differentiate / integrate are often extremely complex - Computational software like Maple makes these problems manageable

Practical Example In Physics

Derivative of distance w.r.t time is velocity. Derivative of velocity w.r.t time is acceleration. Acceleration is just the force of gravity, g, in the negative direction. (down is negative in this example)

If we take the integral of both sides, we can get the equation for v(t).

Our constant C is just the initial velocity.

Practical Example In Physics (2)

Our current equation for velocity gotten from the previously computed derivative. We now use the same logic and solve for the position, integrating both sides and replace D with the initial position.

Practical Example In Maple(3)

Animate Example (pointplot)

If we want to see actual x-y motion, graph the point, [0,y(t)], which follows just the y direction, rather than t-y space.

Animate Plotting Options

  • Default frame count is 25
    • More frames means slower
    • Less frames means faster
  • Default symbolsize is 10

Animate Plotting Options

  • We can set a background
  • Background can be any kind of plot
  • Can have its own color, symbolsize
  • Label list lets us set Strings for x,y labels

For Fun – Combine Them

What you should do now?

  • Connect to class web page: www.cs.drexel.edu/cs123/spring
  • Start up Maple 12
  • Read Lab 2 directions.
  • Do the work with your partner(s). Both should try to do the work, but the grader will need to look at only one answer to give you credit for doing the problem.
  • We’ll be stopping by to check your team’s lab 1 final results

Finishing up – save files

  • Make sure your name/user id/section number/ date, time/instructor name are on the verification sheet.
  • Get the verification sheet signed and handed in.
  • Save worksheet on desktop if you haven’t done so already.
  • Submit a copy to Blackboard site.
  • Email a copy to yourself and/or your lab partners as an attachment so you can look at what you did for review purposes later.

Next week – Take quiz 2!

  • Take the second quiz, starting next week (monday morning).
  • Go to CLC if you need face-to-face help
  • Don’t wait until the last minute to discover that you needed more time to complete the quiz!
  • Complete lab 2 (part 2 and extra credit)!