CST 325 - Graphic Programming (Week 3)
Concepts:
Concepts for this week:
-
Matrix:
linear transformation that has vectors as input and output. There are matrices
of identity, scale, rotation, shearing, translation and projection. Matrix has
3x3 and 4x4 with transposition, addition & subtraction, multiplication
& division, inverse.
-
There
are matrix – vector and matrix – matrix multiplication. The order of operation
is from right to left. Commutation doesn’t apply and order of operation matters
for matrices.
-
Euler
angles: 3D rotation with x – pitch, y – yaw, z – roll. There are six
combinations, but they experiment with Gimbal Lock when the angle is 90 or -90.
Known as loss of a degree of freedom, that is when two axes rotate on the same
plane. To prevent it, avoid those degrees or switch to Quaternions.
- Translation: done through homogeneous coordinates: 2D to 3D, 3D to 4D. The extra column represents translation and tells if it’s a point (1) or a vector (0). An example of visualizing is rotating a 2D image, making it look like 3D environment.
- Projection: there are perspective and orthographic. The main difference is the field of view where perspective is from the world to the camera / eye. The orthographic has a field of view perpendicular with the camera / eye. Both have a view volume between the near plane and the far plane. Only objects in this volume can be seen.
Application:
This
week I am back with a programming assignment similar to week 01, but with extra
visual. At the beginning, I was worried about this assignment due to my busy
schedule, and I didn’t have enough confidence with matrices. Even after my
conversation with ChatGPT and the quiz, I did not feel much better.
I
started working step by step with some simple functions first. Reading the
instructions carefully, checking my notes and test cases, asking ChatGPT to
confirm my theory, I was able to solve functions such as identity and rotation
without any problem. The more I work on them, the more I understand the
matrices. Even with harder functions like perspective and orthographic, they
did not take me lots of time to solve. However, I wondered if there is going to
be a second phase like previous assignments.
The
last two functions that would score me an A seem complicated. However, from
many years of studying and programming, I know that preparation is important.
And because I prepared thoroughly through notes and materials, I understood
what I need to do with those two functions. The moon rotation exercise let me
see through what matrices combination I have to use. After that, I understand
matrices thoroughly and feel more confident using them.
In
addition, I am glad that my partner, Dawn Petersen managed to complete the
assignment in time, despite having a busy schedule as well. She could handle it
just fine, but I stayed in touch and updated to Dawn from time to time.
Communication is the key.

.png)
Comments
Post a Comment