[Solved] Computer Graphics-Lab Assignment 10

$25

File Name: Computer_Graphics-Lab_Assignment_10.zip
File Size: 329.7 KB

SKU: [Solved] Computer Graphics-Lab Assignment 10 Category: Tag:
5/5 - (1 vote)

+ LabAssignment2/

+ 1/

  • py

+ 2/

  • py

+ 3/

  • py
  • The submission time is determined not when the commit is made but when the git push is made.
  1. Write down a Python program to compare 4 orientation interpolation methods. A.First, implement following functions:
  2. exp & log functions
  3. exp(rv)
    1. Converts a rotation vector to a rotation matrix
    2. You can use Rodrigues rotation formula or the method in 10-Animation slides.
    3. Returns a rotation matrix log(R)
  4. Converts a rotation matrix to a rotation vector
  5. You can use the method in 10-Animation slides.
  6. Returns a rotation vector (the length of the vector is the rotation angle) C.Interpolation functions:
  7. slerp(R1, R2, t) slerp
  • R1 & R2: rotation matrices for start & end orientations ii. interpolateRotVec(rv1, rv2, t) interpolate each element of two vectors
  1. rv1 & rv2: rotation vectors for start & end orientations
  1. interpolateZYXEulerAngles(euler1, euler2, t) interpolate each element of two euler angle tuples
    • euler1 & euler2: tuples of ZYX Euler angles for start & end orientations (euler1[0]:

xang, euler1[1]: yang, euler1[2]: zang)

  1. interpolateRotMat(R1, R2, t) interpolate each element of two matrices
    • R1 & R2: rotation matrices for start & end orientations D. For all interpolation functions:
  1. All interpolation functions return a rotation matrix ii.The parameter t ranges from 0.0 to 1.0
  1. Start from the uploaded code skeleton (LabAssignment10-1-code-skeleton.py).
  2. You will need to use
  3. The given lerp() for interpolateRotVec(), interpolateZYXEuler(), interpolateRotMat() ii.The given ZYXEulerToRotMat() for interpolateZYXEuler() iii. Your exp(), log() implementation for slerp(), interpolateRotVec() G.Program usage (already implemented in the code skeleton):
  4. When the program is run, only slerp() result is visible ii.A key: Toggle slerp() result iii. S key: Toggle interpolateRotVec() result iv. D key: Toggle interpolateZYXEuler() result
  5. F key: Toggle interpolateRotMat() result vi.Z key: Hide all results vii. X key: Show all results
  6. Set the window title to your student ID and the window size to (480,480).
  7. Expected result: Uploaded LabAssignment10-1.mp4
  8. Files to submit: A Python source file (Name the file whatever you want (in English). Extension should be .py)

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[Solved] Computer Graphics-Lab Assignment 10
$25