Message Boards Message Boards

Avoid error with the coordinate of a plot?

Posted 6 years ago

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

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.

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:
POSTED BY: Hans Dolhaine

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 BY: Michael Rogers

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:

Your code above (not the notebook) works fine on my system Mma 7.0

POSTED BY: Hans Dolhaine
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract