Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

A basic way of controlling/representing the position and orientation of an object in 3D space would be to keep track of 6 numbers: 3 for

image text in transcribed

A basic way of controlling/representing the position and orientation of an object in 3D space would be to keep track of 6 numbers:

3 for the X, Y, and Z position

3 for the rotations about the X, Y, and Z axis

Write pseudo code (or C++ code) to represent how you would achieve the following program:

Imagine an object in a 3D space, which has a forward (where it's facing) and can "look around" by rotating from its current position.

The object can be facing any direction you want, so long as it is aligned with one of the axes.

This program:

- Sets global variables mentioned above (all starting at 0 by default) for representing a hypothetical object in 3D space.

- Has turning function(s) that may or may not also take in inputs (i.e. numbers representing the direction). The function(s) turn the object by one degree.

- Has move function(s) that may or may not also take in inputs (i.e numbers representing forward/backwards). The function(s) takes its current position and calculates the next position were the object (in its current orientation) to move forward (or backward) one distance unit. (i.e, having the object rotated 45 degrees about the Z-axis and moving forward one unit would be like moving image text in transcribed units along the X and Y-axis)

Rounding to a whole number/using strictly integers is unnecessaryot advised.

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

Business Process Driven Database Design With Oracle PL SQL

Authors: Rajeev Kaula

1st Edition

1795532386, 978-1795532389

More Books

Students also viewed these Databases questions

Question

What advantage does eBays open bidding provide to sellers? Why?

Answered: 1 week ago

Question

3. Is there opportunity to improve current circumstances? How so?

Answered: 1 week ago

Question

2. How will you handle the situation?

Answered: 1 week ago