interpolationDemo

# interpolationDemo - Orthographic (parallel) projection:...

This preview shows page 1. Sign up to view the full content.

This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Orthographic (parallel) projection: Finding the starting point of the ray P(0,0): origin of image plane P(4,1): image pixel at i=4, j=1 v n u P(0,0) P(4,1) Orthographic (parallel) projection: Finding the starting point of the ray P(0,0): origin of image plane P(4,1): image pixel at i=4, j=1 v n u P(0,0) P (4,1) = P (0, 0) + 1 + 4 u v P(4,1) Orthographic (parallel) projection: Finding the starting point of the ray P(0,0): origin of image plane P(4,1): image pixel at i=4, j=1 v n u P(0,0) P (4,1) = P (0, 0) + 1+ 4 u v P P u v (4,1)[0] (0, 0)[0] [0] [0] (4,1)[1] (0, 0)[1] 1 u[1] 4 v[1] P = P + + (4,1)[2] (0, 0)[2] [2] P P u v[2] P(4,1) Orthographic (parallel) projection: Casting the ray P(0,0): origin of image plane P(4,1): image pixel at i=4, j=1 Q(6): ray sample point at k=6 n n Q(6) P(4,1) n nn n v n u P(0,0) Q(6) = P (4,1) + 6 n Orthographic (parallel) projection: Casting the ray P(0,0): origin of image plane P(4,1): image pixel at i=4, j=1 Q(6): ray sample point at k=6 n n Q(6) P(4,1) n nn n v n u P(0,0) Q (6) = P (4,1) + 6 n Q P (6)[0] (4,1)[0] (6)[1] (4,1)[1] 6 Q = P + (6)[2] (4,1)[2] Q P n [0] [1] n [2] n Orthographic (parallel) projection: Casting the ray P(0,0): origin of image plane P(4,1): image pixel at i=4, j=1 Q(6): ray sample point at k=6 n n Q(6) P(4,1) n nn n v n u P(0,0) Q(6) = P (4,1) + 6 n Q P n 4.3 (6)[0] (4,1)[0] [0] (6)[1] (4,1)[1] 6 n[1] Q = P + = 2.6 (6)[2] (4,1)[2] [2] Q P n 22.7 (assume) Orthographic (parallel) projection: Interpolation P(0,0): origin of image plane P(4,1): image pixel at i=4, j=1 Q(6): ray sample point at k=6 n n Q(6) n nn n v n u P(0,0) Q(6) = P (4,1) + 6 n Q P n 4.3 (6)[0] (4,1)[0] [0] (6)[1] (4,1)[1] 6 n[1] Q = P + = 2.6 (6)[2] (4,1)[2] [2] Q P n 22.7 Q(6) (assume) Orthographic (parallel) projection: Interpolation y x 5 3 22 z 4.3 2.6 22.7 4 2 23 32 30 43 Q(6) 20 24 13 8 10 5 2 23 Orthographic (parallel) projection: Nearest Neighbor Interpolation y Val (Q(6)) = Val ( NearestNeighbor (Q(6)) x z 4.3 2.6 22.7 4 2 23 5 3 22 32 30 43 Q(6) 20 24 13 8 10 5 2 23 Orthographic (parallel) projection: Nearest Neighbor Interpolation y Val (Q (6)) = Val ( NearestNeighbor (Q (6)) Round (4.3) NearestNeighbor (Q (6)) = Round (Q (6)) = Round (2.6) Round (22.7) x z 32 30 43 Q(6) 20 24 13 5 3 22 4.3 2.6 22.7 4 2 23 8 10 5 2 23 Orthographic (parallel) projection: Nearest Neighbor Interpolation y Val (Q (6)) = Val ( NearestNeighbor (Q(6)) 4 Round (4.3) NearestNeighbor (Q(6)) = Round (Q (6)) = Round (2.6) = 3 Round (22.7) 23 4 Val (Q (6)) = Val 3 23 x z 32 30 43 Q(6) 20 24 13 5 3 22 4.3 2.6 22.7 4 2 23 8 10 5 2 23 Orthographic (parallel) projection: Nearest Neighbor Interpolation y Val (Q (6)) = Val ( NearestNeighbor (Q(6)) 4 Round (4.3) NearestNeighbor (Q(6)) = Round (Q (6)) = Round (2.6) = 3 Round (22.7) 23 4 Val (Q (6)) = Val 30 3 = 23 x z 32 30 43 Q(6) 20 24 13 5 3 22 4.3 2.6 22.7 4 2 23 8 10 5 2 23 Orthographic (parallel) projection: Trilinear Interpolation uu = vv = ww = y x z 4.3 2.6 22.7 5 3 22 32 30 13 ww 43 Q(6) vv 4 uu 24 20 2 23 8 10 5 2 23 Orthographic (parallel) projection: Trilinear Interpolation uu = Q(6)[0] - trunc(Q(6)[0]) = vv = ww = y x z 4.3 2.6 22.7 5 3 22 32 30 13 ww 43 Q(6) vv 4 uu 24 20 2 23 8 10 5 2 23 Orthographic (parallel) projection: Trilinear Interpolation uu = Q(6)[0] - trunc(Q(6)[0]) = 4.3 - 4 = vv = ww = y x z 4.3 2.6 22.7 5 3 22 32 30 13 ww 43 Q(6) vv 4 uu 24 20 2 23 8 10 5 2 23 Orthographic (parallel) projection: Trilinear Interpolation uu = Q(6)[0] - trunc(Q(6)[0]) = 4.3 - 4 = 0.3 vv = ww = y x z 4.3 2.6 22.7 5 3 22 32 30 13 ww 43 Q(6) vv 4 uu 24 20 2 23 8 10 5 2 23 Orthographic (parallel) projection: Trilinear Interpolation uu = Q(6)[0] - trunc(Q(6)[0]) = 4.3 - 4 = 0.3 vv = Q(6)[1] - trunc(Q (6)[1]) = ww = y x z 4.3 2.6 22.7 5 3 22 32 30 13 ww 43 Q(6) vv 4 uu 24 20 2 23 8 10 5 2 23 Orthographic (parallel) projection: Trilinear Interpolation uu = Q(6)[0] - trunc(Q(6)[0]) = 4.3 - 4 = 0.3 vv = Q(6)[1] - trunc(Q (6)[1]) = 2.6 - 2 = ww = y x z 4.3 2.6 22.7 5 3 22 32 30 13 ww 43 Q(6) vv 4 uu 24 20 2 23 8 10 5 2 23 Orthographic (parallel) projection: Trilinear Interpolation uu = Q(6)[0] - trunc(Q(6)[0]) = 4.3 - 4 = 0.3 vv = Q(6)[1] - trunc(Q (6)[1]) = 2.6 - 2 = 0.6 ww = y x z 4.3 2.6 22.7 5 3 22 32 30 13 ww 43 Q(6) vv 4 uu 24 20 2 23 8 10 5 2 23 Orthographic (parallel) projection: Trilinear Interpolation uu = Q(6)[0] - trunc(Q(6)[0]) = 4.3 - 4 = 0.3 vv = Q(6)[1] - trunc(Q (6)[1]) = 2.6 - 2 = 0.6 ww = Q(6)[2] - trunc(Q(6)[2]) = y x z 4.3 2.6 22.7 5 3 22 32 30 13 ww 43 Q(6) vv 4 uu 24 20 2 23 8 10 5 2 23 Orthographic (parallel) projection: Trilinear Interpolation uu = Q(6)[0] - trunc(Q(6)[0]) = 4.3 - 4 = 0.3 vv = Q(6)[1] - trunc(Q (6)[1]) = 2.6 - 2 = 0.6 ww = Q(6)[2] - trunc(Q(6)[2]) = 22.7 - 22 = y x z 4.3 2.6 22.7 5 3 22 32 30 13 ww 43 Q(6) vv 4 uu 24 20 2 23 8 10 5 2 23 Orthographic (parallel) projection: Trilinear Interpolation uu = Q(6)[0] - trunc(Q(6)[0]) = 4.3 - 4 = 0.3 vv = Q(6)[1] - trunc(Q(6)[1]) = 2.6 - 2 = 0.6 ww = Q(6)[2] - trunc(Q(6)[2]) = 22.7 - 22 = 0.7 y x z 4.3 2.6 22.7 5 3 22 32 30 13 ww 43 Q(6) vv 4 uu 24 20 2 23 8 10 5 2 23 Orthographic (parallel) projection: Trilinear Interpolation uu = Q(6)[0] - trunc(Q(6)[0]) = 4.3 - 4 = 0.3 vv = Q(6)[1] - trunc(Q(6)[1]) = 2.6 - 2 = 0.6 ww = Q(6)[2] - trunc(Q(6)[2]) = 22.7 - 22 = 0.7 x Q 4 0 (6)[0] 0 trunc (6)[1] y = Q = 2 (6)[2] 0 z Q 22 y x z 4.3 2.6 22.7 5 3 22 32 30 13 ww 43 Q(6) vv 4 uu 24 20 2 23 8 10 5 2 23 Orthographic (parallel) projection: 1st linear interpolation: along x y x z P (uu , y 0, z 0) = 4.3 2.6 22.7 32 30 uu 20 43 Q(6) 24 13 8 10 Orthographic (parallel) projection: 1st linear interpolation: along x y x z x x 0 + 1 0 P (uu , y 0, z 0) = uu ( y 0 + (1 - uu ) ( 0 Val ) Val y ) z0 0 z = 4.3 2.6 22.7 32 30 uu 20 43 Q(6) 24 13 8 10 Orthographic (parallel) projection: 1st linear interpolation: along x y x z x x 0 + 1 0 P (uu , y 0, z 0) = uu ( y 0 + (1 - uu ) ( 0 Val ) Val y ) z0 0 z = 0.3 + 0.7 = 10 43 4.3 2.6 22.7 32 30 uu 20 43 Q(6) 24 13 8 10 Orthographic (parallel) projection: 1st linear interpolation: along x y x z x x 0 + 1 0 P (uu , y 0, z 0) = uu ( y 0 + (1 - uu ) ( 0 Val ) Val y ) z0 0 z = 0.3 + 0.7 = 33.1 10 43 4.3 2.6 22.7 32 30 uu 20 43 Q(6) 24 13 8 10 Orthographic (parallel) projection: 1st linear interpolation: along x y x x x 0 + 1 0 P (uu , y 0, z 0) = uu ( y 0 + (1 - uu ) ( 0 Val ) Val y ) z0 0 z = 0.3 + 0.7 = 33.1 10 43 P (uu , y 0 + 1, z 0) = z 4.3 2.6 22.7 32 30 uu 20 43 Q(6) 24 13 8 10 Orthographic (parallel) projection: 1st linear interpolation: along x y x x x 0 + 1 0 P (uu , y 0, z 0) = uu ( y 0 + (1 - uu ) ( 0 Val ) Val y ) z0 0 z = 0.3 + 0.7 = 33.1 10 43 x 0 + 1 x0 P (uu , y 0 + 1, z 0) = uu ( 0 + 1+ (1 - uu ) ( 0 + 1 Val y ) Val y ) z0 z0 z 4.3 2.6 22.7 32 30 uu 20 43 Q(6) 24 13 8 10 Orthographic (parallel) projection: 1st linear interpolation: along x y x x 0 + 1 0 P (uu , y 0, z 0) = uu ( y 0 + (1 - uu ) ( 0 Val ) Val y ) z0 0 z = 0.3 + 0.7 = 33.1 10 43 x 0 + 1 x0 P (uu , y 0 + 1, z 0) = uu ( 0 + 1+ (1 - uu ) ( 0 + 1 Val y ) Val y ) z0 z0 = 0.3 + 0.7 = 24.8 8 32 x z 4.3 2.6 22.7 32 30 uu 20 43 Q(6) 24 13 8 10 Orthographic (parallel) projection: 1st linear interpolation: along x y x x 0 + 1 0 P (uu , y 0, z 0) = uu ( y 0 + (1 - uu ) ( 0 Val ) Val y ) z0 0 z = 0.3 + 0.7 = 33.1 10 43 x 0 + 1 x0 P (uu , y 0 + 1, z 0) = uu ( 0 + 1+ (1 - uu ) ( 0 + 1 Val y ) Val y ) z0 z0 = 0.3 + 0.7 = 24.8 8 32 P (uu , y 0, z 0 + 1) = x z 4.3 2.6 22.7 32 30 uu 20 43 Q(6) 24 13 8 10 Orthographic (parallel) projection: 1st linear interpolation: along x y x x 0 + 1 0 P (uu , y 0, z 0) = uu ( y 0 + (1 - uu ) ( 0 Val ) Val y ) z0 0 z = 0.3 + 0.7 = 33.1 10 43 x 0 + 1 x0 P (uu , y 0 + 1, z 0) = uu ( 0 + 1+ (1 - uu ) ( 0 + 1 Val y ) Val y ) z0 z0 = 0.3 + 0.7 = 24.8 8 32 x 0 + 1 x0 P (uu , y 0, z 0 + 1) = uu Val ( y 0 + (1 - uu ) Val ( y 0 ) ) 0 + 1 0 + 1 z z = x z 4.3 2.6 22.7 32 30 uu 20 43 Q(6) 24 13 8 10 Orthographic (parallel) projection: 1st linear interpolation: along x y x x 0 + 1 0 P (uu , y 0, z 0) = uu ( y 0 + (1 - uu ) ( 0 Val ) Val y ) z0 0 z = 0.3 + 0.7 = 33.1 10 43 x 0 + 1 x0 P (uu , y 0 + 1, z 0) = uu ( 0 + 1+ (1 - uu ) ( 0 + 1 Val y ) Val y ) z0 z0 = 0.3 + 0.7 = 24.8 8 32 x 0 + 1 x0 P (uu , y 0, z 0 + 1) = uu Val ( y 0 + (1 - uu ) Val ( y 0 ) ) 0 + 1 0 + 1 z z = 0.3 + 0.7 = 21.2 24 20 x z 4.3 2.6 22.7 32 30 uu 20 43 Q(6) 24 13 8 10 Orthographic (parallel) projection: 1st linear interpolation: along x x x 0 + 1 0 P(uu , y 0, z 0) = uu ( y 0 + (1 - uu ) ( 0 Val ) Val y ) z0 0 z = 0.3 + 0.7 = 33.1 10 43 x 0 + 1 x0 P(uu , y 0 + 1, z 0) = uu ( 0 + 1+ (1 - uu ) ( 0 + 1 Val y ) Val y ) z0 z0 = 0.3 + 0.7 = 24.8 8 32 x 0 + 1 x0 P(uu , y 0, z 0 + 1) = uu Val ( y 0 + (1 - uu ) Val ( y 0 ) ) 0 + 1 0 + 1 z z = 0.3 + 0.7 = 21.2 24 20 P (uu, y 0 + 1, z 0 + 1) = y x z 4.3 2.6 22.7 32 30 uu 20 43 Q(6) 24 13 8 10 Orthographic (parallel) projection: 1st linear interpolation: along x x x 0 + 1 0 y 0 + (1 - uu ) ( 0 P(uu , y 0, z 0) = uu ( Val ) Val y ) z0 0 z = 0.3 + 0.7 = 33.1 10 43 x 0 + 1 x0 P(uu , y 0 + 1, z 0) = uu ( 0 + 1+ (1 - uu ) ( 0 + 1 Val y ) Val y ) z0 z0 = 0.3 + 0.7 = 24.8 8 32 x 0 + 1 x0 P(uu , y 0, z 0 + 1) = uu Val ( y 0 + (1 - uu ) Val ( y 0 ) ) 0 + 1 0 + 1 z z = 0.3 + 0.7 = 21.2 24 20 x 0 + 1 x0 P (uu, y 0 + 1, z 0 + 1) = uu ( 0 + 1+ (1 - uu ) ( 0 + 1 Val y ) Val y ) 0 + 1 0 + 1 z z = y x z 4.3 2.6 22.7 32 30 uu 20 43 Q(6) 24 13 8 10 Orthographic (parallel) projection: 1st linear interpolation: along x x x 0 + 1 0 P(uu , y 0, z 0) = uu ( y 0 + (1 - uu ) ( 0 Val ) Val y ) z0 0 z = 0.3 + 0.7 = 33.1 10 43 x 0 + 1 x0 P(uu , y 0 + 1, z 0) = uu ( 0 + 1+ (1 - uu ) ( 0 + 1 Val y ) Val y ) z0 z0 = 0.3 + 0.7 = 24.8 8 32 x 0 + 1 x0 P(uu , y 0, z 0 + 1) = uu Val ( y 0 + (1 - uu ) Val ( y 0 ) ) 0 + 1 0 + 1 z z = 0.3 + 0.7 = 21.2 24 20 x 0 + 1 x0 P (uu, y 0 + 1, z 0 + 1) = uu ( 0 + 1+ (1 - uu ) ( 0 + 1 Val y ) Val y ) 0 + 1 0 + 1 z z = 0.3 + 0.7 = 24.9 13 30 y x z 4.3 2.6 22.7 32 30 uu 20 43 Q(6) 24 13 8 10 Orthographic (parallel) projection: 2nd linear interpolation: along y y P (uu , vv, z 0) = x z 4.3 2.6 22.7 32 30 vv 20 43 Q(6) 24 13 8 10 Orthographic (parallel) projection: 2nd linear interpolation: along y y P (uu, vv, z 0) = vv ( P(uu , y 0 + 1, z 0) + (1 - vv) (uu , y 0, z 0) Val Val = x z 4.3 2.6 22.7 32 30 vv 20 43 Q(6) 24 13 8 10 Orthographic (parallel) projection: 2nd linear interpolation: along y y P (uu, vv, z 0) = vv ( P(uu , y 0 + 1, z 0) + (1 - vv) (uu , y 0, z 0) Val Val = 0.6 + 0.4 = 24.8 33.1 x z 4.3 2.6 22.7 32 30 vv 20 43 Q(6) 24 13 8 10 Orthographic (parallel) projection: 2nd linear interpolation: along y y P (uu, vv, z 0) = vv ( P(uu , y 0 + 1, z 0) + (1 - vv) (uu , y 0, z 0) Val Val = 0.6 + 0.4 = 28.12 24.8 33.1 x z 4.3 2.6 22.7 32 30 vv 20 43 Q(6) 24 13 8 10 Orthographic (parallel) projection: 2nd linear interpolation: along y P(uu , vv, z 0) = vv ( P(uu , y 0 + 1, z 0) + (1 - vv) (uu , y 0, z 0) Val Val = 0.6 + 0.4 = 28.12 24.8 33.1 P (uu, vv, z 0 + 1) = y x z 4.3 2.6 22.7 32 30 vv 20 43 Q(6) 24 13 8 10 Orthographic (parallel) projection: 2nd linear interpolation: along y P(uu , vv, z 0) = vv ( P(uu , y 0 + 1, z 0) + (1 - vv) (uu , y 0, z 0) Val Val = 0.6 + 0.4 = 28.12 24.8 33.1 P (uu, vv, z 0 + 1) = vv ( P(uu , y 0 + 1, z 0 + 1) + (1 - vv) (uu , y 0, z 0 + 1) Val Val = y x z 4.3 2.6 22.7 32 30 vv 20 43 Q(6) 24 13 8 10 Orthographic (parallel) projection: 2nd linear interpolation: along y P(uu , vv, z 0) = vv ( P(uu , y 0 + 1, z 0) + (1 - vv) (uu, y 0, z 0) Val Val = 0.6 + 0.4 = 28.12 24.8 33.1 P (uu, vv, z 0 + 1) = vv ( P(uu , y 0 + 1, z 0 + 1) + (1 - vv) (uu, y 0, z 0 + 1) Val Val = 0.6 + 0.4 = 23.42 24.9 21.2 y x z 4.3 2.6 22.7 32 30 vv 20 43 Q(6) 24 13 8 10 Orthographic (parallel) projection: 3rd linear interpolation: along z y P (uu , vv, ww) = x z Val(Q(6)) 4.3 2.6 22.7 32 30 ww 43 Q(6) 20 24 13 8 10 Orthographic (parallel) projection: 3rd linear interpolation: along z y P (uu, vv, ww) = ww ( P (uu , vv, z 0 + 1) + (1 - ww) (uu , vv, z 0) Val Val = x z Val(Q(6)) 4.3 2.6 22.7 32 30 ww 43 Q(6) 20 24 13 8 10 Orthographic (parallel) projection: 3rd linear interpolation: along z y P (uu, vv, ww) = ww ( P (uu , vv, z 0 + 1) + (1 - ww) (uu , vv, z 0) Val Val = 0.7 23.42 + 0.3 28.12 = x z Val(Q(6)) 4.3 2.6 22.7 32 30 ww 43 Q(6) 20 24 13 8 10 Orthographic (parallel) projection: 3rd linear interpolation: along z y P (uu, vv, ww) = ww ( P (uu , vv, z 0 + 1) + (1 - ww) (uu , vv, z 0) Val Val = 0.7 23.42 + 0.3 28.12 = 24.83 x z Val(Q(6)) 4.3 2.6 22.7 32 30 ww 43 Q(6) 20 24 13 8 10 ...
View Full Document

## This note was uploaded on 04/29/2010 for the course CSE 4190.410 taught by Professor Shinyeonggil during the Spring '09 term at Seoul National.

Ask a homework question - tutors are online