a program named Lab2b_Act2a.py that will take two observed 3D positions at two points in time, and then will calculate the 3D position at a third point in time. Let’s consider only times between the two observed times. You should output the x, y, and z values for that position on separate lines. Begin by identifying the variables you will use, the names for those variables, and the computations that should occur for those variables. Then, write a program that will output the 3D position of the interpolated point on 3 separate lines. For this initial program, use the following data values:●At time 12 seconds, observed position was (2, 3, 7) meters●At time 85 seconds, observed position was (25, -5, 11) meters●You want to find the position at time 45 seconds. Now, copy Lab2b_Act2a.py from above into a new program named Lab2b_Act2b.py. Modify your program in the following ways:i.When printing the posi

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Write a program named Lab2b_Act2a.py that will take two observed 3D positions at two points in time, and then will calculate the 3D position at a third point in time. Let’s consider only times between the two observed times. You should output the x, y, and z values for that position on separate lines. Begin by identifying the variables you will use, the names for those variables, and the computations that should occur for those variables. Then, write a program that will output the 3D position of the interpolated point on 3 separate lines.

For this initial program, use the following data values:●At time 12 seconds, observed position was (2, 3, 7) meters●At time 85 seconds, observed position was (25, -5, 11) meters●You want to find the position at time 45 seconds.

Now, copy Lab2b_Act2a.py from above into a new program named Lab2b_Act2b.py. Modify your program in the following ways:i.When printing the position, follow the output by a line of dashes (“-------------------”).ii.Instead of just computing the interpolation at one point and printing the result, you will now compute it at 5 points. Copy the portion of the code (copy and paste the code) that is needed to recompute interpolation 5 times. You should now interpolate at times in increments of 1 second, starting at time 45 seconds (i.e. at times 45, 46, 47, 48, 49), printing the result each time. The line of dashes will separate each computation. (Note: later we will see how we can do this more efficiently, without copying-and-pasting code, but for now, copy-and-paste your code.)

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 2 images

Blurred answer
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education