Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please do in C++, HOMEWORK #14-Coordinate Transformations Create a menu-driven program that prompts a user to enter a 3D (x, y, z) point into a

Please do in C++,

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed

HOMEWORK #14-Coordinate Transformations Create a menu-driven program that prompts a user to enter a 3D (x, y, z) point into a Cartesian coordinate system and allows the user to perform various transformations on the data point. Specifications: Specify, design, and implement a class called cartesian that can be used to keep track of the position of a point in 3D space. Include member functions to clear the (x, y, z) data point, set the point, get the data point from the class object, and translate the point a given amount along any of the three axes. Also provide member functions that rotate the point by an angle around a specified axis To compute the rotations, use trigonometry. Suppose you have a point with coordinates x, y, and Z. After rotating the point counter-clockwise by an angle , the point will have new coordinates '.y', and z'. The equations for the new coordinates use the cmath library functions sin and After a rotation around the x-axis: y, = y cos@)-Z sin(0) z, = y sin() + z cos(0) After a 0 rotation round the y-axis: x, x cos(0) + z sin(0) y'=y z'x sin (0) +z cos(0)

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

Making Databases Work The Pragmatic Wisdom Of Michael Stonebraker

Authors: Michael L. Brodie

1st Edition

1947487167, 978-1947487161

More Books

Students also viewed these Databases questions

Question

8. Do the organizations fringe benefits reflect diversity?

Answered: 1 week ago

Question

7. Do the organizations social activities reflect diversity?

Answered: 1 week ago