3D Rotation

The 3D rotation is different from 2D rotation. In 3D Rotation we also have to define the angle of Rotation with the axis of Rotation.

For Example- Let us assume,

The initial coordinates of an object = (x0, y0, z0)

The Initial angle from origin = β

The Rotation angle = θ

The new coordinates after Rotation = (x1, y1, z1)

In Three-dimensional plane we can define Rotation by following three ways-

  • X-axis Rotation: We can rotate the object along x-axis. We can rotate an object by using following equation-3d Rotation

We can represent 3D rotation in the form of matrix-

3d Rotation 3d Rotation 3d Rotation
  • Y-axis Rotation: We can rotate the object along y-axis. We can rotate an object by using following equation-3d Rotation

We can represent 3D rotation in the form of matrix-

3d Rotation 3d Rotation 3d Rotation
  • Z-axis Rotation: We can rotate the object along z-axis. We can rotate an object by using following equation-3d Rotation

We can represent 3D rotation in the form of matrix-

3d Rotation 3d Rotation 3d Rotation

Example: A Point has coordinates P (2, 3, 4) in x, y, z-direction. The Rotation angle is 90 degrees. Apply the rotation in x, y, z direction, and find out the new coordinates of the point?

Solution: The initial coordinates of point = P (x0, y0, z0) = (2, 3, 4)

Rotation angle (θ) = 90°

For x-axis-

Let the new coordinates = (x1, y1, z1) then,

x1= x0 = 2

y1= y0 x cosθ – z0 x sinθ = 3 x cos90°– 4 x sin90° = 3 x 0 – 4 x 1 = -4

z1= y0 x sinθ + z0 x cosθ = 3 x sin90°+ 4 x cos90° = 3 x 1 + 4 x 0 = 3

The new coordinates of point = (2, -4, 3)

For y-axis-

Let the new coordinates = (x1, y1, z1) then,

X1= z0 x sinθ + x0 x cosθ = 4 x sin90° + 2 x cos90° = 4 x 1 + 2 x 0 = 4

y1= y0 = 3

z1= y0 x cosθ – x0 x sinθ = 3 x cos90°– 2 x sin90° = 3 x 0 – 4 x 0 = 0

The new coordinates of point = (4, 3, 0)

For z-axis-

Let the new coordinates = (x1, y1, z1) then,

x1= x0 x cosθ – y0 x sinθ = 2 x cos90° – 3 x sin90° = 2 x 0 + 3 x 1 = 3

y1= x0 x sinθ + y0 x cosθ = 2 x sin90° ­+ 3 x cos90° = 2 x 1 + 3 x 0 = 2

z1= z0 =4

The New Coordinates of points = (3, 2, 4)


Related Topics

Mid-Point Line Drawing Algorithm in Computer Graphics

The Mid-point Subdivision algorithm is the extension of the Cyrus-Beck algorithm. The Mid-Point line plotting algorithm was introduced by “Pitway and Van Aken.” It is an incremental line drawing algorithm....

8 minutes read.

Scan Conversion in Computer Graphics

“When we represent regular objects in the form of discrete pixels, it is called Scan Conversion.” Every graphics system must transform the primitives into a collection of pixels. The scan conversion is also...

2 minutes read.

Panning

“Panning is a process or photographic technique that is used to combine slow shutter speed with camera movement to make a speed sense around the moving object.” We can define panning as...

2 minutes read.

Output Devices in Computer Graphics

Computer Graphics Output Devices An output device is a component of hardware or the main physical part of a computer that can be touched and seen. An output device is an electromechanical device. “The...

5 minutes read.

Color Models in Computer Graphics

"Color model is a 3D color coordinate system to produce all range of color through the primary color set." There are millions of colors used in computer graphics. The light...

3 minutes read.

Applications of Computer Graphics

Applications of Computer Graphics Some applications of computer graphics are mentioned below- Graphical User Interface (GUI): It is a way of interacting with a computer using the icon, ...

2 minutes read.

Text Clipping

“Text Clipping is a process in which we remove those part (portion) of string that is outside the view pane (window).” Various methods and techniques can do the text clipping. These techniques depend...

2 minutes read.

Projection in Computer Graphics

Projection Introduction: The technique projection was invented by the Swiss mathematician, engineer, and astronomer "Leonhard Euler Around" in 1756. The "Episcope" was the first projection system. “Projection is a technique or process which...

4 minutes read.

Bresenham’s Circle Drawing Algorithm in Computer Graphics

Bresenham’s algorithm is also used for circle drawing. It is known as Bresenham’s circle drawing algorithm. It helps us to draw a circle. The circle generation is more complicated than...

11 minutes read.

Polygon Clipping in Computer Graphics

“A Polygon can be described as the enclosed collection or group of the lines.” In a polygon, all lines are connected. Lines can be a combination of edges and vertices,...

4 minutes read.

Rendering in Computer Graphics

Rendering in Computer Graphics Rendering is the operation, by virtue of a software system, of creating a picture from a template. In a specifically defined term or information structures, the model is a...

9 minutes read.

Computer Graphics Tutorial

Introduction to Computer Graphics Computer graphics is commonly seen as a computer science branch that deals with the computerized image fusion theory and technology. As simple as a triangle outline, a...

6 minutes read.

Input Devices in Computer Graphics

An Input device is the piece of computer hardware equipment used to give input to the computer. The input can be in the form of graphics, text, sound, audio, video,...

7 minutes read.

2D Shearing

We can denote shearing with ‘SHx’ and ‘SHy.’ These ‘SHx’ and ‘SHy’ are called “Shearing factor.” We can perform shearing on the object in two ways- Shearing along x-axis: In this, we...

2 minutes read.

Scan Conversion of a Circle Computer Graphics

A circle is an eight-way symmetric shape. All quadrants of a circle are the same. There are two octants in each quadrant of a circle. If we know the value of any...

3 minutes read.

Display Processor

It is a part of hardware or interpreter which is used to transform display processor code into pictures. It is used to convert digital information from CPU to analog data. It...

4 minutes read.

History of Computer Graphics

History of Computer Graphics Computer Graphics (CG) was first developed as a visualization tool. Computer graphics were basically introduced for scientists and engineers in government and corporate research centers, i.e., Bell Labs and Boeing...

4 minutes read.

Aspect Ratio in Computer Graphics

Aspect Ratio in Computer Graphics You might well understand the concept of Aspect ratio as of now if you know regarding aerial photography or see the configuration portion of any computer...

5 minutes read.

Clipping in Computer Graphics

“The Clipping is a type of transformation used in computer graphics to remove lines, objects, and segments of lines that are outside the computer screen or viewing pane.” The clipping is a...

2 minutes read.

Illumination Model in Computer Graphics

Illumination Model in Computer Graphics The series of methods used to depict light in computer graphics scenarios is computer graphics illumination. Although lighting strategies provide versatility in the degree of detail...

8 minutes read.