gravity (let's call this the "dropped 2D harmonic oscillator"). The mass moves in a potential U (x, y, z) = k(x² + +mgz and the motion stops when the mass hits the ground at z = 0. (You don't need U(x, y, z) for solving the problem and it is only provided for the exact physics context.) The trajectory of the mass, i.e, its curve in space, r(t) = (x(t), y(t), z(t)) is x(t) = A cos(wt) y(t) = B cos(wt + p) 1 z(t) = - =gt² + 20 are determined by the initial conditions, and the frequency is w = √k/m. where the amplitudes A, B and the phase difference Given A = 1, B = 2,0 = π/3, w = 0.5, and g = 9.81, write a program that

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
2. calculates the trajectory r(t) and stores the coordinates for time steps At as a nested list trajectory that contains [[xe, ye,
ze], [x1, y1, z1], [x2, y2, z2], ...]. Start from time t = 0 and use a time step At = 0.01; the last data point in the
trajectory should be the time when the oscillator "hits the ground", i.e., when z(t) ≤ 0;
3. stores the time for hitting the ground (i.e., the first time t when z(t) ≤ 0) in the variable t_contact and the corresponding positions
in the variables x_contact, y_contact, and z_contact. Print
t_contact = 1.430
X_contact = 0.755
y contact = -0.380
z_contact =
(Output floating point numbers with 3 decimals using format (), e.g., "t_contact = {:.3f}" .format(t_contact).) The partial
example output above is for ze = 10.
4. calculates the average x- and y-coordinates
1
y =
Yi
N
where the x, y, are the x(t), y(t) in the trajectory and N is the number of data points that you calculated.
Store the result as a list in the variable center = [x_avg, y_avg] and print the result as
center = [0.917, ...]
(Output floating point numbers with 3 decimals using format ().) The partial example output above is for ze = 10.
IM² IM²
Xi
Transcribed Image Text:2. calculates the trajectory r(t) and stores the coordinates for time steps At as a nested list trajectory that contains [[xe, ye, ze], [x1, y1, z1], [x2, y2, z2], ...]. Start from time t = 0 and use a time step At = 0.01; the last data point in the trajectory should be the time when the oscillator "hits the ground", i.e., when z(t) ≤ 0; 3. stores the time for hitting the ground (i.e., the first time t when z(t) ≤ 0) in the variable t_contact and the corresponding positions in the variables x_contact, y_contact, and z_contact. Print t_contact = 1.430 X_contact = 0.755 y contact = -0.380 z_contact = (Output floating point numbers with 3 decimals using format (), e.g., "t_contact = {:.3f}" .format(t_contact).) The partial example output above is for ze = 10. 4. calculates the average x- and y-coordinates 1 y = Yi N where the x, y, are the x(t), y(t) in the trajectory and N is the number of data points that you calculated. Store the result as a list in the variable center = [x_avg, y_avg] and print the result as center = [0.917, ...] (Output floating point numbers with 3 decimals using format ().) The partial example output above is for ze = 10. IM² IM² Xi
A mass m is held by two perpendicular identical springs in space in the x-y plane and is dropped from a height zo under the influence of
gravity (let's call this the "dropped 2D harmonic oscillator"). The mass moves in a potential
U (x, y, z) = -—-k(x² + y²) + mgz
and the motion stops when the mass hits the ground at z = 0. (You don't need U(x, y, z) for solving the problem and it is only provided
for the exact physics context.)
The trajectory of the mass, i.e, its curve in space, r(t) = (x(t), y(t), z(t)) is
x(t) = A cos(wt)
y(t) = B cos(wt + p)
1
72gt² + 20
z(t)
are determined by the initial conditions, and the frequency is w = √k/m.
where the amplitudes A, B and the phase difference
Given A = 1, B = 2,0 = π/3, w = 0.5, and g = 9.81, write a program that
1. reads the initial drop height zo from user input;
Transcribed Image Text:A mass m is held by two perpendicular identical springs in space in the x-y plane and is dropped from a height zo under the influence of gravity (let's call this the "dropped 2D harmonic oscillator"). The mass moves in a potential U (x, y, z) = -—-k(x² + y²) + mgz and the motion stops when the mass hits the ground at z = 0. (You don't need U(x, y, z) for solving the problem and it is only provided for the exact physics context.) The trajectory of the mass, i.e, its curve in space, r(t) = (x(t), y(t), z(t)) is x(t) = A cos(wt) y(t) = B cos(wt + p) 1 72gt² + 20 z(t) are determined by the initial conditions, and the frequency is w = √k/m. where the amplitudes A, B and the phase difference Given A = 1, B = 2,0 = π/3, w = 0.5, and g = 9.81, write a program that 1. reads the initial drop height zo from user input;
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY