Tick Action: "C" Subscript, "a" "m" "e" "r" "a" "U" "p" "d" "a" "t" "e" , Baseline , "d" Subscript, "u" "p" "d" "a" "t" "e" , Baseline , "C" Subscript, "r" "o" "t" "a" "t" "e" , BaselineCameraUpdate,dupdate,Crotate
every
Min Step Time: 3030
ms
Expression 135: "R" Subscript, "o" "t" "a" "t" "e" "Y" , Baseline left parenthesis, "x" , "y" , "z" , right parenthesis equals cosine left parenthesis, theta Subscript, "y" "z" , Baseline , right parenthesis left parenthesis, "y" cos left parenthesis, theta Subscript, "x" "y" , Baseline , right parenthesis plus "x" sin left parenthesis, theta Subscript, "x" "y" , Baseline , right parenthesis , right parenthesis minus "z" sine left parenthesis, theta Subscript, "y" "z" , Baseline , right parenthesisRotateYx,y,z=cosθyzycosθxy+xsinθxy−zsinθyz
135
Returns the y of the rotated x,y,z for projection
136
Expression 137: "R" Subscript, "o" "t" "a" "t" "e" "Z" , Baseline left parenthesis, "x" , "y" , "z" , right parenthesis equals sine left parenthesis, theta Subscript, "y" "z" , Baseline , right parenthesis left parenthesis, "y" cos left parenthesis, theta Subscript, "x" "y" , Baseline , right parenthesis plus "x" sin left parenthesis, theta Subscript, "x" "y" , Baseline , right parenthesis , right parenthesis plus "z" cosine left parenthesis, theta Subscript, "y" "z" , Baseline , right parenthesisRotateZx,y,z=sinθyzycosθxy+xsinθxy+zcosθyz
137
Returns the z of the rotated x,y,z for projection
138
Expression 139: "G" Subscript, "r" "a" "p" "h" , Baseline left parenthesis, "x" , "y" , "z" , right parenthesis equals left parenthesis, "R" Subscript, "o" "t" "a" "t" "e" "X" , Baseline left parenthesis, "x" , "y" , "z" , right parenthesis , "R" Subscript, "o" "t" "a" "t" "e" "Z" , Baseline left parenthesis, "x" , "y" , "z" , right parenthesis , right parenthesis times StartFraction, "d" Over "d" plus "R" Subscript, "o" "t" "a" "t" "e" "Y" , Baseline left parenthesis, "x" , "y" , "z" , right parenthesis , EndFractionGraphx,y,z=RotateXx,y,z,RotateZx,y,z·dd+RotateYx,y,z
139
Projects an x,y,z pair with the current view angle
140
Expression 141: "G" Subscript, "r" "a" "p" "h" "P" , Baseline left parenthesis, "P" Subscript, 1 , Baseline , right parenthesis equals "G" Subscript, "r" "a" "p" "h" , Baseline left parenthesis, "P" Subscript, 1 , Baseline left bracket, 1 , right bracket , "P" Subscript, 1 , Baseline left bracket, 2 , right bracket , "P" Subscript, 1 , Baseline left bracket, 3 , right bracket , right parenthesisGraphPP1=GraphP11,P12,P13
141
Projects an x,y,z pair with the current view angle
P_1: an x,y,z pair as a list of length 3
142
Expression 143: "A" Subscript, "n" "g" "l" "e" 2 , Baseline left parenthesis, "P" Subscript, 1 , Baseline , "P" Subscript, 2 , Baseline , right parenthesis equals mod left parenthesis, arctan left parenthesis, "P" Subscript, 2 , Baseline . "y" minus "P" Subscript, 1 , Baseline . "y" , "P" Subscript, 2 , Baseline . "x" minus "P" Subscript, 1 , Baseline . "x" , right parenthesis , tau , right parenthesisAngle2P1,P2=modarctanP2.y−P1.y,P2.x−P1.x,τ
143
Returns the angle (0<=θ<=360, or 2π) between two points, p1 & p2
144
Expression 145: "A" Subscript, "n" "g" "l" "e" , Baseline left parenthesis, "P" Subscript, 1 , Baseline , right parenthesis equals mod left parenthesis, arctan left parenthesis, "P" Subscript, 1 , Baseline . "y" , "P" Subscript, 1 , Baseline . "x" , right parenthesis , tau , right parenthesisAngleP1=modarctanP1.y,P1.x,τ
145
Returns the angle (0<=θ<=360, or 2π) between a point & the right x-axis
146
Expression 147: "I" Subscript, "n" "t" "p" "l" , Baseline left parenthesis, "P" Subscript, 1 , Baseline , "P" Subscript, 2 , Baseline , "t" , right parenthesis equals "P" Subscript, 1 , Baseline plus left parenthesis, "P" Subscript, 2 , Baseline minus "P" Subscript, 1 , Baseline , right parenthesis times "t"IntplP1,P2,t=P1+P2−P1·t
147
Returns the linear interpolation between two points. Returns P1 when t = 0, returns P2 when t = 1.
148
Expression 149: "G" Subscript, "r" "a" "p" "h" "L" "i" "n" "e" , Baseline left parenthesis, "x" Subscript, 1 , Baseline , "y" Subscript, 1 , Baseline , "z" Subscript, 1 , Baseline , "x" Subscript, 2 , Baseline , "y" Subscript, 2 , Baseline , "z" Subscript, 2 , Baseline , "t" , right parenthesis equals "G" Subscript, "r" "a" "p" "h" , Baseline left parenthesis, "I" Subscript, "n" "t" "p" "l" , Baseline left parenthesis, "x" Subscript, 1 , Baseline , "x" Subscript, 2 , Baseline , "t" , right parenthesis , "I" Subscript, "n" "t" "p" "l" , Baseline left parenthesis, "y" Subscript, 1 , Baseline , "y" Subscript, 2 , Baseline , "t" , right parenthesis , "I" Subscript, "n" "t" "p" "l" , Baseline left parenthesis, "z" Subscript, 1 , Baseline , "z" Subscript, 2 , Baseline , "t" , right parenthesis , right parenthesisGraphLinex1,y1,z1,x2,y2,z2,t=GraphIntplx1,x2,t,Intply1,y2,t,Intplz1,z2,t
149
Graphs a line between two points
x1, y1, z1: x,y,z of the first point
x2, y2, z2: x,y,z of the second point
t: from 0 to 1
150
Expression 151: "G" Subscript, "r" "a" "p" "h" "L" "i" "n" "e" "P" , Baseline left parenthesis, "P" Subscript, 1 , Baseline , "P" Subscript, 2 , Baseline , "t" , right parenthesis equals "G" Subscript, "r" "a" "p" "h" "P" , Baseline left parenthesis, "I" Subscript, "n" "t" "p" "l" , Baseline left parenthesis, "P" Subscript, 1 , Baseline , "P" Subscript, 2 , Baseline , "t" , right parenthesis , right parenthesisGraphLinePP1,P2,t=GraphPIntplP1,P2,t
151
Graphs a line between two points
P_1: an x,y,z pair as a list of length 3
P_2: an x,y,z pair as a list of length 3
t: from 0 to 1
152
Expression 153: "G" Subscript, "r" "a" "p" "h" "L" "i" "n" "e" "X" "Y" "Z" , Baseline left parenthesis, "X" Subscript, "L" , Baseline , "Y" Subscript, "L" , Baseline , "Z" Subscript, "L" , Baseline , "t" , right parenthesis equals "G" Subscript, "r" "a" "p" "h" , Baseline left parenthesis, "I" Subscript, "n" "t" "p" "l" "L" , Baseline left parenthesis, "X" Subscript, "L" , Baseline , "t" , right parenthesis , "I" Subscript, "n" "t" "p" "l" "L" , Baseline left parenthesis, "Y" Subscript, "L" , Baseline , "t" , right parenthesis , "I" Subscript, "n" "t" "p" "l" "L" , Baseline left parenthesis, "Z" Subscript, "L" , Baseline , "t" , right parenthesis , right parenthesisGraphLineXYZXL,YL,ZL,t=GraphIntplLXL,t,IntplLYL,t,IntplLZL,t
153
Graphs connected line segments between a list of points given X, Y, Z lists
X_L, Y_L, Z_L: the x,y,z of the list of points
t: from 0 to 1
154
Expression 155: "I" Subscript, "n" "t" "p" "l" "L" , Baseline left parenthesis, "L" , "t" , right parenthesis equals "I" Subscript, "n" "t" "p" "l" , Baseline left parenthesis, "L" left bracket, 1 plus floor left parenthesis, left parenthesis, length left parenthesis, "L" , right parenthesis minus 1 , right parenthesis times "t" , right parenthesis , right bracket , "L" left bracket, mod left parenthesis, 2 plus floor left parenthesis, left parenthesis, length left parenthesis, "L" , right parenthesis minus 1 , right parenthesis times "t" , right parenthesis minus 1 , length left parenthesis, "L" , right parenthesis , right parenthesis plus 1 , right bracket , mod left parenthesis, left parenthesis, length left parenthesis, "L" , right parenthesis minus 1 , right parenthesis times "t" , 1 , right parenthesis , right parenthesisIntplLL,t=IntplL1+floorlengthL−1·t,Lmod2+floorlengthL−1·t−1,lengthL+1,modlengthL−1·t,1
155
Interpolates a list of variables with t from 0 to 1
Example: when L = [1,2,3] and t = 0,0.5,1: I_ntplL(L,t) = 1, 2, 3
L: a list of variables
t: from 0 to 1
156
Expression 157: "R" Subscript, "o" "t" "a" "t" "e" "Q" 0 , Baseline left parenthesis, "v" Subscript, "x" , Baseline , "v" Subscript, "y" , Baseline , "v" Subscript, "z" , Baseline , "A" , "x" , "y" , "z" , right parenthesis equals left bracket, negative "x" times left parenthesis, StartFraction, cos left parenthesis, "A" , right parenthesis Over 2 , EndFraction minus 1 half , right parenthesis times "v" squared minus "y" times left parenthesis, cos left parenthesis, "A" , right parenthesis minus 1 , right parenthesis times "v" Subscript, "x" , Baseline times "v" Subscript, "y" , Baseline minus "z" times left parenthesis, cos left parenthesis, "A" , right parenthesis minus 1 , right parenthesis times "v" Subscript, "x" , Baseline times "v" Subscript, "z" , Baseline plus "x" times left parenthesis, StartFraction, cos left parenthesis, "A" , right parenthesis Over 2 , EndFraction minus 1 half , right parenthesis times "v" squared plus "z" times sin left parenthesis, "A" , right parenthesis times "v" Subscript, "y" , Baseline plus "x" times left parenthesis, StartFraction, cos left parenthesis, "A" , right parenthesis Over 2 , EndFraction minus 1 half , right parenthesis times "v" squared minus "y" times sin left parenthesis, "A" , right parenthesis times "v" Subscript, "z" , Baseline plus "x" times left parenthesis, StartFraction, cos left parenthesis, "A" , right parenthesis Over 2 , EndFraction plus 1 half , right parenthesis , "y" times left parenthesis, StartFraction, cos left parenthesis, "A" , right parenthesis Over 2 , EndFraction minus 1 half , right parenthesis times "v" squared minus "x" times left parenthesis, cos left parenthesis, "A" , right parenthesis minus 1 , right parenthesis times "v" Subscript, "x" , Baseline times "v" Subscript, "y" , Baseline minus "z" times sin left parenthesis, "A" , right parenthesis times "v" Subscript, "x" , Baseline minus "y" times left parenthesis, StartFraction, cos left parenthesis, "A" , right parenthesis Over 2 , EndFraction minus 1 half , right parenthesis times "v" squared minus "z" times left parenthesis, cos left parenthesis, "A" , right parenthesis minus 1 , right parenthesis times "v" Subscript, "y" , Baseline times "v" Subscript, "z" , Baseline plus "y" times left parenthesis, StartFraction, cos left parenthesis, "A" , right parenthesis Over 2 , EndFraction minus 1 half , right parenthesis times "v" squared plus "x" times sin left parenthesis, "A" , right parenthesis times "v" Subscript, "z" , Baseline plus "y" times left parenthesis, StartFraction, cos left parenthesis, "A" , right parenthesis Over 2 , EndFraction plus 1 half , right parenthesis , "z" times left parenthesis, StartFraction, cos left parenthesis, "A" , right parenthesis Over 2 , EndFraction minus 1 half , right parenthesis times "v" squared minus "x" times left parenthesis, cos left parenthesis, "A" , right parenthesis minus 1 , right parenthesis times "v" Subscript, "x" , Baseline times "v" Subscript, "z" , Baseline plus "y" times sin left parenthesis, "A" , right parenthesis times "v" Subscript, "x" , Baseline plus "z" times left parenthesis, StartFraction, cos left parenthesis, "A" , right parenthesis Over 2 , EndFraction minus 1 half , right parenthesis times "v" squared minus "y" times left parenthesis, cos left parenthesis, "A" , right parenthesis minus 1 , right parenthesis times "v" Subscript, "y" , Baseline times "v" Subscript, "z" , Baseline minus "x" times sin left parenthesis, "A" , right parenthesis times "v" Subscript, "y" , Baseline minus "z" times left parenthesis, StartFraction, cos left parenthesis, "A" , right parenthesis Over 2 , EndFraction minus 1 half , right parenthesis times "v" squared plus "z" times left parenthesis, StartFraction, cos left parenthesis, "A" , right parenthesis Over 2 , EndFraction plus 1 half , right parenthesis , right bracketRotateQ0vx,vy,vz,A,x,y,z=−x×cosA2−12×v2x−y×cosA−1×vx×vy−z×cosA−1×vx×vz+x×cosA2−12×v2y+z×sinA×vy+x×cosA2−12×v2z−y×sinA×vz+x×cosA2+12,y×cosA2−12×v2x−x×cosA−1×vx×vy−z×sinA×vx−y×cosA2−12×v2y−z×cosA−1×vy×vz+y×cosA2−12×v2z+x×sinA×vz+y×cosA2+12,z×cosA2−12×v2x−x×cosA−1×vx×vz+y×sinA×vx+z×cosA2−12×v2y−y×cosA−1×vy×vz−x×sinA×vy−z×cosA2−12×v2z+z×cosA2+12
157
Returns an x,y,z pair after applied quaternion rotation.
V (vx,vy,vz) is the axis of rotation. The distance of V from the origin must be 1.
A is the angle of rotation
x,y,z is the 3D point rotated.
Expression 160: "R" Subscript, "o" "t" "a" "t" "e" "Q" , Baseline left parenthesis, "v" Subscript, "x" , Baseline , "v" Subscript, "y" , Baseline , "v" Subscript, "z" , Baseline , "A" , "x" , "y" , "z" , right parenthesis equals "R" Subscript, "o" "t" "a" "t" "e" "Q" 0 , Baseline left parenthesis, StartFraction, "v" Subscript, "x" , Baseline Over StartRoot, "v" squared plus "v" squared plus "v" squared , EndRoot , EndFraction , StartFraction, "v" Subscript, "y" , Baseline Over StartRoot, "v" squared plus "v" squared plus "v" squared , EndRoot , EndFraction , StartFraction, "v" Subscript, "z" , Baseline Over StartRoot, "v" squared plus "v" squared plus "v" squared , EndRoot , EndFraction , "A" , "x" , "y" , "z" , right parenthesisRotateQvx,vy,vz,A,x,y,z=RotateQ0vxv2x+v2y+v2z,vyv2x+v2y+v2z,vzv2x+v2y+v2z,A,x,y,z
160
Returns an x,y,z pair after applied quaternion rotation.
V (vx,vy,vz) is the axis of rotation. The distance of V from the origin does not have to be 1.
A is the angle of rotation
x,y,z is the 3D point rotated.
161
Expression 162: "R" Subscript, "o" "t" "a" "t" "e" "Q" "P" , Baseline left parenthesis, "V" , "A" , "L" , right parenthesis equals "R" Subscript, "o" "t" "a" "t" "e" "Q" 0 , Baseline left parenthesis, StartFraction, "V" left bracket, 1 , right bracket Over StartRoot, "V" left bracket, 1 , right bracket squared plus "V" left bracket, 2 , right bracket squared plus "V" left bracket, 3 , right bracket squared , EndRoot , EndFraction , StartFraction, "V" left bracket, 2 , right bracket Over StartRoot, "V" left bracket, 1 , right bracket squared plus "V" left bracket, 2 , right bracket squared plus "V" left bracket, 3 , right bracket squared , EndRoot , EndFraction , StartFraction, "V" left bracket, 3 , right bracket Over StartRoot, "V" left bracket, 1 , right bracket squared plus "V" left bracket, 2 , right bracket squared plus "V" left bracket, 3 , right bracket squared , EndRoot , EndFraction , "A" , "L" left bracket, 1 , right bracket , "L" left bracket, 2 , right bracket , "L" left bracket, 3 , right bracket , right parenthesisRotateQPV,A,L=RotateQ0V1V12+V22+V32,V2V12+V22+V32,V3V12+V22+V32,A,L1,L2,L3
Expression 164: "S" Subscript, "p" "h" "e" "r" "e" , Baseline left parenthesis, lambda , phi , right parenthesis equals left bracket, cos left parenthesis, lambda , right parenthesis cos left parenthesis, phi , right parenthesis , sin left parenthesis, lambda , right parenthesis cos left parenthesis, phi , right parenthesis , sin left parenthesis, phi , right parenthesis , right bracketSphereλ,ϕ=cosλcosϕ,sinλcosϕ,sinϕ
164
Returns a point on a sphere of radius 1 with the given latitude & longitude (https://bit.ly/3mubei9).
λ: Longitude, or the left & right on a sphere
ϕ: Latitude, or the up & down on a sphere
165
Expression 166: "D" Subscript, "i" "s" "t" "O" , Baseline left parenthesis, "P" Subscript, 1 , Baseline , right parenthesis equals StartRoot, total left parenthesis, "P" squared , right parenthesis , EndRootDistOP1=totalP21
166
Returns the distance of a point from the origin
167
Expression 168: "D" Subscript, "i" "s" "t" , Baseline left parenthesis, "P" Subscript, 1 , Baseline , "P" Subscript, 2 , Baseline , right parenthesis equals StartRoot, total left parenthesis, left parenthesis, "P" Subscript, 1 , Baseline minus "P" Subscript, 2 , Baseline , right parenthesis squared , right parenthesis , EndRootDistP1,P2=totalP1−P22
168
Returns the distance between two points
169
Expression 170: "D" Subscript, "o" "t" , Baseline left parenthesis, "P" Subscript, 1 , Baseline , "P" Subscript, 2 , Baseline , right parenthesis equals total left parenthesis, "P" Subscript, 1 , Baseline "P" Subscript, 2 , Baseline , right parenthesisDotP1,P2=totalP1P2
170
Returns the dot product of a point
171
Expression 172: theta Subscript, "d" "i" "f" "f" , Baseline left parenthesis, "P" Subscript, 1 , Baseline , "P" Subscript, 2 , Baseline , right parenthesis equals cosine to the negative 1st power left parenthesis, StartFraction, "D" Subscript, "o" "t" , Baseline left parenthesis, "P" Subscript, 1 , Baseline , "P" Subscript, 2 , Baseline , right parenthesis Over "D" Subscript, "i" "s" "t" "O" , Baseline left parenthesis, "P" Subscript, 1 , Baseline , right parenthesis "D" Subscript, "i" "s" "t" "O" , Baseline left parenthesis, "P" Subscript, 2 , Baseline , right parenthesis , EndFraction , right parenthesisθdiffP1,P2=cos−1DotP1,P2DistOP1DistOP2
172
Returns the difference in angle between two points using dot product
173
Expression 174: "C" Subscript, "r" "o" "s" "s" 2 , Baseline left parenthesis, "P" Subscript, 1 , Baseline , "P" Subscript, 2 , Baseline , right parenthesis equals "P" Subscript, 1 , Baseline left bracket, 1 , right bracket "P" Subscript, 2 , Baseline left bracket, 2 , right bracket minus "P" Subscript, 1 , Baseline left bracket, 2 , right bracket "P" Subscript, 2 , Baseline left bracket, 1 , right bracketCross2P1,P2=P11P22−P12P21
174
Returns the cross product of two 2D points
175
Expression 176: "C" Subscript, "r" "o" "s" "s" , Baseline left parenthesis, "P" Subscript, 1 , Baseline , "P" Subscript, 2 , Baseline , right parenthesis equals left bracket, "P" Subscript, 1 , Baseline left bracket, 2 , right bracket "P" Subscript, 2 , Baseline left bracket, 3 , right bracket minus "P" Subscript, 1 , Baseline left bracket, 3 , right bracket "P" Subscript, 2 , Baseline left bracket, 2 , right bracket , "P" Subscript, 1 , Baseline left bracket, 3 , right bracket "P" Subscript, 2 , Baseline left bracket, 1 , right bracket minus "P" Subscript, 1 , Baseline left bracket, 1 , right bracket "P" Subscript, 2 , Baseline left bracket, 3 , right bracket , "P" Subscript, 1 , Baseline left bracket, 1 , right bracket "P" Subscript, 2 , Baseline left bracket, 2 , right bracket minus "P" Subscript, 1 , Baseline left bracket, 2 , right bracket "P" Subscript, 2 , Baseline left bracket, 1 , right bracket , right bracketCrossP1,P2=P12P23−P13P22,P13P21−P11P23,P11P22−P12P21
176
Returns the cross product of two 3D points
177
Expression 178: "R" Subscript, "o" "t" "a" "t" "e" "T" "o" "N" "o" "r" "m" "a" "l" , Baseline left parenthesis, "L" , "V" , right parenthesis equals "R" Subscript, "o" "t" "a" "t" "e" "Q" "P" , Baseline left parenthesis, "C" Subscript, "r" "o" "s" "s" , Baseline left parenthesis, left bracket, 0 , 0 , 1 , right bracket , "V" , right parenthesis , theta Subscript, "d" "i" "f" "f" , Baseline left parenthesis, left bracket, 0 , 0 , 1 , right bracket , "V" , right parenthesis , "L" , right parenthesisRotateToNormalL,V=RotateQPCross0,0,1,V,θdiff0,0,1,V,L
178
Returns an x,y,z pair rotated to a certain normal
L is the x,y,z pair rotated
V is normal that L is rotated to. The distance of V from the origin does not have to be 1.
Expression 181: "M" Subscript, "e" "s" "h" "G" "r" "i" "d" 1 , Baseline left parenthesis, "L" Subscript, 1 , Baseline , "L" Subscript, 2 , Baseline , right parenthesis equals "L" Subscript, 1 , Baseline left bracket, mod left parenthesis, left bracket, 0 , ... , length left parenthesis, "L" Subscript, 1 , Baseline , right parenthesis length left parenthesis, "L" Subscript, 2 , Baseline , right parenthesis minus 1 , right bracket , length left parenthesis, "L" Subscript, 1 , Baseline , right parenthesis , right parenthesis plus 1 , right bracketMeshGrid1L1,L2=L1mod0,...,lengthL1lengthL2−1,lengthL1+1
181
Expression 182: "M" Subscript, "e" "s" "h" "G" "r" "i" "d" 2 , Baseline left parenthesis, "L" Subscript, 1 , Baseline , "L" Subscript, 2 , Baseline , right parenthesis equals "L" Subscript, 2 , Baseline left bracket, floor left parenthesis, StartFraction, left bracket, 0 , ... , length left parenthesis, "L" Subscript, 1 , Baseline , right parenthesis length left parenthesis, "L" Subscript, 2 , Baseline , right parenthesis minus 1 , right bracket Over length left parenthesis, "L" Subscript, 1 , Baseline , right parenthesis , EndFraction , right parenthesis plus 1 , right bracketMeshGrid2L1,L2=L2floor0,...,lengthL1lengthL2−1lengthL1+1
182
Same as the meshgrid method in Matlab & python: returns all permutations between two 1D arrays as a 1D array; useful for generating 2D arrays stored as 1D array.
183
Expression 184:
184
3D Grapher Implementation:
185
Rotation using image
Hide this folder from students.
186
right hand rule: z+ up, x+ left, y+ facing you
187
Expression 188: "C" Subscript, "i" "m" "g" , Baseline equals left parenthesis, 0 , 0 , right parenthesisCimg=0,0
188
Expression 189: "C" Subscript, "l" "a" "s" "t" , Baseline equals left parenthesis, negative 3.7 1 4 4 , negative 0.6 4 4 , right parenthesisClast=−3.7144,−0.644
189
Expression 190: "R" Subscript, "o" "t" "a" "t" "i" "o" "n" "R" "e" "s" "t" "r" "i" "c" "t" , Baseline left parenthesis, theta , right parenthesis equals min left parenthesis, max left parenthesis, theta , negative StartFraction, pi Over 2 , EndFraction , right parenthesis , StartFraction, pi Over 2 , EndFraction , right parenthesisRotationRestrictθ=minmaxθ,−π2,π2
190
Expression 191: "R" Subscript, "o" "t" "a" "t" "i" "o" "n" "R" "e" "s" "t" "r" "i" "c" "t" "P" , Baseline left parenthesis, "P" Subscript, 1 , Baseline , right parenthesis equals left parenthesis, "P" Subscript, 1 , Baseline . "x" , min left parenthesis, max left parenthesis, "P" Subscript, 1 , Baseline . "y" , negative StartFraction, pi Over 2 , EndFraction , right parenthesis , StartFraction, pi Over 2 , EndFraction , right parenthesis , right parenthesisRotationRestrictPP1=P1.x,minmaxP1.y,−π2,π2
191
Expression 192: theta Subscript, "x" "y" , Baseline equals "C" Subscript, "l" "a" "s" "t" , Baseline . "x" plus "s" Subscript, "l" "o" "w" , Baseline "C" Subscript, "i" "m" "g" , Baseline . "x" plus pi plus theta Subscript, "x" "y" "R" "o" "t" "a" "t" "e" , Baselineθxy=Clast.x+slowCimg.x+π+θxyRotate
192
Expression 193: theta Subscript, "y" "z" , Baseline equals "R" Subscript, "o" "t" "a" "t" "i" "o" "n" "R" "e" "s" "t" "r" "i" "c" "t" , Baseline left parenthesis, negative left parenthesis, "C" Subscript, "l" "a" "s" "t" , Baseline . "y" plus "s" Subscript, "l" "o" "w" , Baseline "C" Subscript, "i" "m" "g" , Baseline . "y" , right parenthesis , right parenthesisθyz=RotationRestrict−Clast.y+slowCimg.y
193
Expression 194: theta Subscript, "d" "e" "f" "a" "u" "l" "t" , Baseline equals left parenthesis, 0.2 8 6 4 , negative 0.4 5 0 8 , right parenthesisθdefault=0.2864,−0.4508
194
Expression 195: "C" Subscript, "a" "m" "e" "r" "a" "U" "p" "d" "a" "t" "e" , Baseline equals "C" Subscript, "l" "a" "s" "t" , Baseline to "R" Subscript, "o" "t" "a" "t" "i" "o" "n" "R" "e" "s" "t" "r" "i" "c" "t" "P" , Baseline left parenthesis, "C" Subscript, "l" "a" "s" "t" , Baseline plus "s" Subscript, "l" "o" "w" , Baseline times "C" Subscript, "i" "m" "g" , Baseline , right parenthesis , "C" Subscript, "i" "m" "g" , Baseline to left parenthesis, 0 , 0 , right parenthesisCameraUpdate=Clast→RotationRestrictPClast+slow·Cimg,Cimg→0,0