# Avoid error with the coordinate of a plot?

Posted 10 months ago
1038 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?
Answer
5 Replies
Sort By:
Posted 10 months 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.
Answer
Posted 10 months 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:
Answer
Posted 10 months ago
 Your code above (not the notebook) works fine on my system Mma 7.0
Answer
Posted 10 months ago
 Update. I tried to quit the Kernel, but the situation is the same. I'm using Mathematica 11.2 if it helps.Maybe I'm doing something wrong running the code. I do " Evalutate Notebook" to see the output and I still get the same error. But it's like O1, O2, ... , O5 aren't read. Since if I go in O5 and I press MAIUSC + ENTER the plots works.
Answer
Posted 10 months ago
 It seems that your CinematicaInversa goes wrong. See notebook. And I think you should use Map instead of Apply in the last statement. That is for a first suggestion because I have to leave now. Attachments:
Answer
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments