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 21:30
Write a function named printfloatrepresentation(float number) that will print the floating point representation of a number using the format given below. (sign bit) exponent in binary (assumed bit).significandfor example if the number passed an argument is 71 yourprogram should print (0) 10000101 (1).00011100000000000000000similarly if the number passed to the function as argument is -71 the program should print (1) 10000101 (1).00011100000000000000000
Answers: 3
question
Computers and Technology, 23.06.2019 22:30
Apart from confidential information, what other information does nda to outline? ndas not only outline confidential information, but they also enable you to outline .
Answers: 1
question
Computers and Technology, 24.06.2019 07:00
Guys do you know sh27 cause he hacked me : ( pidgegunderson my old user
Answers: 2
question
Computers and Technology, 24.06.2019 07:50
Write a defining table and then a program that determines if you can sleep in or not. your program should get all its input from your computer’s clock. on all weekdays (monday through friday) that are not holidays, your program should output “get up! ” on all other days (weekends and holidays), your program should output “sleep in.” the three holidays that your program must check for are january 1 (new year’s day), july 4 (u.s. independence day), and december 25 (christmas). you don’t need to include other holidays in your program because most other holidays do not occur on a fixed day each year.
Answers: 1
You know the right answer?
Program 2: In the earlier team project, your team put together a program that interpolated between...
Questions
question
Mathematics, 09.11.2020 22:40
question
Mathematics, 09.11.2020 22:40
question
Mathematics, 09.11.2020 22:40
question
English, 09.11.2020 22:40
question
Biology, 09.11.2020 22:40
question
English, 09.11.2020 22:40
Questions on the website: 13722363