2
$\begingroup$

I would like to make a small right hand with fingers that curl to illustrate the right hand rule in Graphics3D. Does anyone know if this is possible?

For an example of what I'm looking to plot, see https://physics.stackexchange.com/questions/137975/how-to-visualise-the-direction-of-torque

Is there something like "drawing tools" for Graphics3D?

-David

$\endgroup$
5
  • 1
    $\begingroup$ You could probably find a 3D model online, or is that not acceptable for your application? e.g. google.co.uk/#q=thumbs+up+3d+model+free $\endgroup$ Commented Jan 17, 2015 at 19:56
  • $\begingroup$ Forgive my ignorance, but how would a "3D model" of a hand be used in graphics3d? $\endgroup$
    – David
    Commented Jan 17, 2015 at 19:58
  • $\begingroup$ Pick a format on this page and see the examples. $\endgroup$
    – user484
    Commented Jan 17, 2015 at 21:33
  • $\begingroup$ Thanks so far guys, you have been a significant help. I've never used a ".stl" file before. I have imported 3d model of a right hand, and combined with my graphics3d plot using the show command. The problem I now have is that the hand is much to large, is at the wrong location, and is at the wrong orientation. Are these things specifiable? $\endgroup$
    – David
    Commented Jan 17, 2015 at 23:57
  • $\begingroup$ In real life: img (Marseille, France) $\endgroup$
    – ybeltukov
    Commented Jan 18, 2015 at 12:21

2 Answers 2

9
$\begingroup$

It's easiest to control the position and size of all 3D objects if they are combined in the same Graphics3D. For an STL file, this could be done as follows (I didn't want to look for a hand model, so I chose the seashell model built into ExampleData, since it's also chiral):

Export["g.stl", ExampleData[{"Geometry3D", "Seashell"}]];

g = Import["g.stl"];

Graphics3D[{
  Map[{Apply[RGBColor, #], Arrow[Tube[{{0, 0, 0}, #}]]} &, 
   2 IdentityMatrix[3]],
  EdgeForm[], FaceForm[Orange, Brown], GeometricTransformation[
   g[[1]],
   Composition[
    TranslationTransform[{0, 1, 0}], 
    RotationTransform[Pi/2, {0, 0, 1}, {0, 0, 0}], 
    ScalingTransform[{.5, .5, .5}]
    ]
   ]
  }, Lighting -> "Neutral"
 ]

seashell

Here I called the imported STL graphics g. To insert it into the existing Graphics3D containing three axis arrows, I strip away the Head by doing g[[1]] which then contains only the polygon data. Also, I added the basic machinery to move, resize and rotate the seashell in the 3D scene, by wrapping g[[1]] in a GeometricTransformation containing a Composition of the three geometric operations. In particular, the ScalingTransform can be used to adjust the size, before shifting the object to the desired location with the TranslationTransform.

$\endgroup$
5
  • $\begingroup$ +1 for my new favorite coordinate system marker :D $\endgroup$
    – Yves Klett
    Commented Jan 18, 2015 at 10:41
  • $\begingroup$ I think that this answer will solve my problems, though I'll post back latter when I have tried to integrate it into my code. $\endgroup$
    – David
    Commented Jan 18, 2015 at 12:11
  • $\begingroup$ This is the hand that I am using right now: 123dapp.com/123C-3D-Model/Thumbs-Up/721284 $\endgroup$
    – David
    Commented Jan 18, 2015 at 12:41
  • $\begingroup$ If anyone has a better one, pls post the link. It would be better to have a hand that is less "clenched" than the one I posted, one with space between the fingers and palm so you can see them wrapping around a bit clearer. $\endgroup$
    – David
    Commented Jan 18, 2015 at 12:43
  • $\begingroup$ This worked for me, thanks! $\endgroup$
    – David
    Commented Jan 18, 2015 at 18:22
7
$\begingroup$
myThumb = Import["123dapp.com/123C-3D-Model/Thumbs-Up/721284"];

Show[myThumb, 
 Graphics3D[
  {
   {Red, Thick, Arrow[{{0, 0, 0}, {0, 0, -20}}]},
   {Green, Thick, Arrow[{{0, 0, 0}, {0, -20, 0}}]},
   {Blue, Thick, Arrow[{{0, 0, 0}, {-20, 0, 0}}]},
   {Text[Style["x", Italic, Blue, 24], {-22, 0, 0}]},
   {Text[Style["y", Italic, Red, 24], {0, 0, -22}]},
   {Text[Style["z", Italic, Green, 24], {0, -22, 0}]}
   }
  ]
 ]

enter image description here

$\endgroup$
2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.