subject

Program 2: In the earlier team project, your team put together a program that interpolated between two position values based on the time values when each positon was observed. This was a one dimensional (10) interpolation, since you were interpolating only a single value, the distance on the track. You are now going to extend that program to one that will linearly interpolate between two points in 3D.
Let's say we are tracking the change of a particle's position with time. So, at time t1 position is (x1, y1, z1) and at time t2 position is (x2, y2, 22). The question is what is the position (x, y, z) at some time to between t1 and t2?
Refer again to the Linear Interpolation material associated with Lab Assignment2. That material describes the development of equation representing linear interpolation of a dependent variable y versus an independent variable x. For the current problem, what varies linearly with what? What are the dependent variable(s)? What are the independent variable(s)?
Let's assume that each of the position variables (x, y, z) varies linearly with time (t). Therefore, time (t) is the independent variable in each case. This means we can perform linear interpolation three separate times to get what we need. This can be done in three steps: 1) linearly interpolate between (t1, x1) and (t2, x2) for to with XO as the result; 2) repeat for (t1, y1) and (t2, y2) for to with yo as the result; 3) repeat for (t1, z1) and (t2, z2) for to with z0 as the result. The result will be (x, y, z0) associated with time to.
Write a program 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, you can use the following data values:
• At time 13, observed position was (1,3,7) meters
• At time 84, observed position was (23, -5, 10) meters
• You want to find the position at time 50 seconds
As for Program 1 above, please document your code using comments and print data labels and units to the screen to identify your output. Sample output:
time of interest = 50 seconds
x0 = 12.464788732394366 m
y0 = -1.169014084507042 m
z0 = 8.56338028169014 m

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 10:30
Choose the best explanation for the following statement communication is symbolic
Answers: 3
question
Computers and Technology, 23.06.2019 09:00
Before you record your own voice, you should a. record other people's voices b. warm up and practice difficult names c. listen to your favorite songs d. read a transcript of a good radio news segment
Answers: 1
question
Computers and Technology, 23.06.2019 09:30
Write an essay on online collaboration, how to do it, the challenges, resolving the challenges, and consider whether the risks are greater than rewards. ( need )
Answers: 1
question
Computers and Technology, 24.06.2019 09:50
Suppose you are an ad-serving company and you maintain a log of cookie data for ads you serve to the web pages for a particular vendor (say amazon). a. how can you use this data to determine which are the best ads? b. how can you use this data to determine which are the best ad formats? c. how could you records of past ads and ad clicks to determine which ads to send to a given ip address? d. how could you use this data to determine how well the technique you used in your answer to part c was working? e. how could you use this data to determine that a given ip address is used by more than one person? f. how does having this data give you a competitive advantage vis-Ă -vis other ad-serving companies?
Answers: 2
You know the right answer?
Program 2: In the earlier team project, your team put together a program that interpolated between...
Questions
question
Mathematics, 21.10.2020 01:01
question
English, 21.10.2020 01:01
question
Mathematics, 21.10.2020 01:01
question
English, 21.10.2020 01:01