0% found this document useful (0 votes)
18 views1 page

Math Formulas for Computer Graphics

Uploaded by

Tejaswini Phukan
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views1 page

Math Formulas for Computer Graphics

Uploaded by

Tejaswini Phukan
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

■ Computer Graphics - Math Cheat Sheet

■ Coordinate Geometry
Concept Formula Use

Distance between two points √((x■ - x■)² + (y■ - y■)²) Line length
Midpoint of two points ((x■ + x■)/2, (y■ + y■)/2) Curves / Symmetry
Slope of a line (y■ - y■)/(x■ - x■) Angle or steepness

■ Trigonometry
Function Definition Use

sin(θ) Opposite / Hypotenuse Rotation


cos(θ) Adjacent / Hypotenuse Rotation
tan(θ) sin(θ) / cos(θ) Slopes and angles
x' = xcosθ − ysinθ
Rotation Formula y' = xsinθ + ycosθ Rotate point

■ Matrices & Transformations


Operation Matrix Use

Translation [[1 0 Tx], [0 1 Ty], [0 0 1]] Move shapes


Scaling [[Sx 0 0], [0 Sy 0], [0 0 1]] Resize shapes
Rotation [[cosθ -sinθ 0], [sinθ cosθ 0], [0 0 1]] Rotate shapes

You might also like