# Avoid error with the coordinate of a plot?

Posted 1 year ago
1264 Views
|
5 Replies
|
3 Total Likes
|
 Hi guys. I don't understand why I get this error: "Coordinate {10, 8, 3, 1} should be a triple of numbers, or a Scaled form." T[x_, y_, z_] := {{1, 0, 0, x}, {0, 1, 0, y}, {0, 0, 1, z}, {0, 0, 0, 1}}; Rx[α_] := {{1, 0, 0, 0}, {0, Cos[α], -Sin[α], 0}, {0, Sin[α], Cos[α], 0}, {0, 0, 0, 1}} Ry[α_] := {{Cos[α], 0, Sin[α], 0}, {0, 1, 0, 0}, {-Sin[α], 0, Cos[α], 0}, {0, 0, 0, 1}} Rz[α_] := {{Cos[α], -Sin[α], 0, 0}, {Sin[α], Cos[α], 0, 0}, {0, 0, 1, 0}, {0, 0, 0, 1}} T01 = T[x0, 0, 0].Rz[α0]; MatrixForm[T01] T12 = T[0, 0, z1].Rz[θ1]; MatrixForm[T12] T23 = T[-a1, 0, 0].Ry[-θ2]; MatrixForm[T23] T34 = T[L1, 0, 0].Ry[π - θ3]; MatrixForm[T34] T45 = T[L2, 0, 0]; MatrixForm[T45] T05 = FullSimplify[T01.T12.T23.T34.T45]; MatrixForm[T05] O1 = T01.{0, 0, 0, 1}; O1 = O1[[1 ;; 3]]; O2 = T01.T12.{0, 0, 0, 1}; O2 = O2[[1 ;; 3]]; O3 = T01.T12.T23.{0, 0, 0, 1}; O3 = O3[[1 ;; 3]]; O4 = T01.T12.T23.T34.{0, 0, 0, 1}; O4 = O4[[1 ;; 3]]; O5 = FullSimplify[T01.T12.T23.T34.T45.{0, 0, 0, 1}]; O5 = O5[[1 ;; 3]]; Manipulate[ Block[ {x0 = 10, z1 = 3, a1 = 2, α0 = π/2, L1 = 30, L2 = 20, θ1 = q1, θ2 = q2, θ3 = q3}, Graphics3D[{Red, Thick, Line[{O1, O2, O3, O4, O5}], LightBlue, Cuboid[{0, 0, 0}, {0, 30, 40}], LightGray, Cuboid[{0, 0, 0}, {10, 30, 0}]} , PlotRange -> {{0, 10}, {0, 30}, {0, 40} }] ], {{q1, 0}, -π, π}, {q2, 0, 3π/4}, {q3, 0, π} ] I guess the problem comes from the origins O1,O2, etc. Could you help me?
5 Replies
Sort By:
Posted 1 year ago
 I don't get any error. Try quitting the kernel and re-execute your code. Perhaps something has the wrong definition lurking in memory.
Posted 1 year ago
 I tried but I keep getting this error. I attach the Notebook of the code. I have the same error in all the plot of the notebook. Attachments:
Posted 1 year ago
 Your code above (not the notebook) works fine on my system Mma 7.0