2D Scaling

In scaling, we can expend or compress the size of any object. We can apply scaling on the object by multiplying the original coordinates with scaling factors.

The term scaling factor is used to define whether the size of an object is increased or decreased. We can represent the scaling factor by ‘Sx’ for the x- axis and ‘Sy’ for the y-axis.

For Example- If we want to scale an object that has R (P0, Q0) coordinate and the new coordinates of an object are R` (P1, Q1) then the equation will be-

P1 = P0. Sx

Q1 = Q0. Sy

2D Scaling

We can also represent Scaling in the form of Matrix-

2D Scaling

Homogeneous Coordinates Representation: The scaling is also represented in the form of 3 x 3 matrix-

2D Scaling

Example: A Square object with the coordinate points P (1, 4), Q (4, 4), R (4, 1), T (1,1). Apply the scaling factor 3 on the X-axis and 4 on the Y-axis. Find out the new coordinates of the square?

Solution: We have,

Coordinates Points for Square = P (1, 4), Q (4, 4), R (4, 1), S (1, 1)

Scaling factor along with X axis (Sx) = 3

Scaling factor along with Y axis (Sy)= 4

Applying the equation to find the new coordinates-

For Coordinate P (1, 4)-

Let the new Coordinate for P = (P1, Q1)

P1 = P0. Sx = 1 x 3 = 3

Q1 = Q0. Sy = 4 x 4 = 16

The new Coordinates = (3, 16)

For Coordinate Q (4, 4)-

Let the new Coordinate for Q = (P,1 Q1)

P1 = P0. Sx = 4 x 3 = 12

Q1 = Q0. Sy = 4 x 4 = 16

The new Coordinates = (12, 16)

For Coordinate R (4, 1)-

Let the new Coordinate for R = (P1, Q1)

P1 = P0. Sx = 4 x 3 = 12

Q1 = Q0. Sy = 1 x 4 = 4

The new Coordinates = (12, 4)

For Coordinate S (1, 1)-

Let the new Coordinate for S = (P1, Q1)

P1 = P0. Sx = 1 x 3 = 3

Q1 = Q0. Sy = 1 x 4 = 4

The new Coordinates = (3, 4)

2D Scaling 2D Scaling

Thus, the new coordinates for square after scaling = P (3, 16), Q (12, 16), R (12, 4), S (3, 4).


Related Topics

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.

2D Rotation

The Rotation of any object depends upon the two points. Rotation Point: It is also called the Pivot point. Rotation Angle: It is denoted by Theta (). We can rotate an object in...

1 minute read.

Line Drawing Algorithm in Computer Graphics

“The Line drawing algorithm is a graphical algorithm which is used to represent the line segment on discrete graphical media, i.e., printer and pixel-based media.” A line contains two points....

3 minutes read.

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.

2D Scaling

In scaling, we can expend or compress the size of any object. We can apply scaling on the object by multiplying the original coordinates with scaling factors. The term scaling factor...

2 minutes read.

Image Representation in Computer Graphics

Image Representation: In computer science, we can represent an image in various forms. Most of the time, it refers to the way that brings information, such as color is coded digitally, and...

4 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.

Scan Conversion of an Ellipse Computer Graphics

Scan Conversion of an Ellipse: An ellipse can be defined as a closed plane curve, which is a collection of points. It is the cause of the intersection of a...

8 minutes read.

3d Scaling

The 2D and 3D scaling are similar, but the key difference is that the 3D plane also includes the z-axis along with the x and y-axis. In scaling, we can expend...

2 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.

Zooming

In computer graphics, the term “Zoom is referred as a function, focuses on a particular portion or part of an image and also enlarging the image’s size for greater details.” In windows...

2 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.

Filled Area Primitives Computer Graphics

Filled Area Primitives: Area filling is a method or process that helps us to fill an object, area, or image. We can easily fill the polygon. The polygon filling is...

4 minutes read.

Transformation

Introduction The term Transformation is generally referred to as converting a graphic into another graphic by applying some rules or algorithms. Sometimes an image or picture can be a combination of lines, rectangle,...

2 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.

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.

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.

3D Translation

A 3D Translation process contains the x-axis, y-axis, and z-axis. We can move any object from one place to another without changing the shape of the object. For Example-Translation of a...

1 minute read.

2D Transformation in Computer Graphics

Some visuals are transformed into some other graphics by implementing several of the principles known as transformation. There are multiple kinds of transformation, including translation, scaling, rotation, shearing, etc. Whenever...

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.