plz in c++ tks
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...
Related questions
Question
plz in c++ tks.

Transcribed Image Text:For example:
Test
Result
Vector3 p
Vector3(0.0, 2.0, 0.0);
(-2.00, 2.00, 4.00)
%D
Vector3 u =
Vector3(0.0, 1.0, 0.0);
Vector3(-1.0, 0.0, 0.0);
Vector3(0.0, 0.0, 1.0);
Vector3 v =
Vector3 n =
Vector3 uvnOrigin
Vector3(0.0, 2.0, 4.0);
Vector3 a =
Vector3(1.0, 0.0, 0.0);
Vector3 b
Vector3(0.0, 1.0, 0.0);
Vector3 c
Vector3(0.0, 0.0, 1.0);
Vector3 abcorigin
Vector3(0.0, 0.0, 0.0);
Vector3 tp = transformCoordinateSystem(p, u, v, n, uvnOrigin, a, b, c, abcOrigin);
%3D
printf("(%.21f, %.21f, %.21f)", tp.x, tp.y, tp.z);

Transcribed Image Text:Write a function transformCoordinateSystem(), which takes a point defined in some coordinate system, and transforms
it to a new coordinate system.
The first coordinate system is described by the axis vectors u, v, and n, and has an origin located at uvnOrigin. The
second coordinate system is described by the axis vectors a, b, and c, and has an origin located at abcOrigin. The axis
vectors and origins of both coordinate systems are defined with respect to the global xyz coordinate system.
The point to be transformed is given by the parameter point, and describes the location of the point in the uvn
coordinate system. Your function must return the location of point when described in the abc coordinate system.
Your function should have the following signature:
Vector3 transformCoordinateSystem(Vector3 point, Vector3 u, Vector3 v, Vector3 n, Vector3 uvnOrigin,
Vector3 a, Vector3 b, Vector3 c, Vector3 abcOrigin)
You can assume that each of the vectors u, v, n, a, b, and c, are unit vectors.
You can assume that Vector3 is a class that represents a 3D vector, and exposes fields named x, y, and z, and that the
following functions are available to you:
double dot(Vector3 u, Vector3 v) //dot product
Vector3 cross(Vector3 u, Vector3 v) //cross product
In addition, you can assume the + and - operators are available for the Vector3 class.
You can assume that the Vector3 class has the following member functions available to you:
Vector3 Vector3::normalized() //returns a vector pointing in the same direction with length 1
double Vector3:magnitude() //returns the length of the vector
Hint: The x, y, and z components of the Vector class represent the location of the point in the corresponding axis of
whichever coordinate system it is located within (e.g. the point is initially located within the uvn coordinate system, so
point.x represents how far away it is from the uvn origin along the u-axis).
Hint: You may find it useful to make yourself a diagram of some of the test cases.
For example:
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 2 steps with 1 images

Recommended textbooks for you

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 Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science

Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning

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 Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science

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
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning

Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education

Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY