Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

write the script in python 3.6 of this problem Dot product of two vectors is given by: Write a program that calculates the angle between

write the script in python 3.6 of this problemimage text in transcribed

Dot product of two vectors is given by: Write a program that calculates the angle between two points, as seen by an observer. Your program should read in: The 3D position of an observer The 3D position of the first observed point The 3D position of the second observed point Then, it should calculate and output, in degrees, the angle between the points from the viewer's perspective. The steps for doing this are: Read in the points from the user. Assume the points will be some (x, y, z) coordinates. Calculate components of the two displacement vectors from the observer to each of the observed points Calculate magnitudes of the two displacement vectors Calculate the dot product between the vectors Use the dot product to calculate the angle between the two observed points. Note that the dot product of two normalized vectors gives the cosine of the angle between those vectors. Outputs the answer in degrees Before beginning coding, you should stop and think briefly about the variables you will need for your program Dot product of two vectors is given by: Write a program that calculates the angle between two points, as seen by an observer. Your program should read in: The 3D position of an observer The 3D position of the first observed point The 3D position of the second observed point Then, it should calculate and output, in degrees, the angle between the points from the viewer's perspective. The steps for doing this are: Read in the points from the user. Assume the points will be some (x, y, z) coordinates. Calculate components of the two displacement vectors from the observer to each of the observed points Calculate magnitudes of the two displacement vectors Calculate the dot product between the vectors Use the dot product to calculate the angle between the two observed points. Note that the dot product of two normalized vectors gives the cosine of the angle between those vectors. Outputs the answer in degrees Before beginning coding, you should stop and think briefly about the variables you will need for your program

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Bioinformatics Databases And Systems

Authors: Stanley I. Letovsky

1st Edition

1475784058, 978-1475784053

More Books

Students also viewed these Databases questions