// HANDS // ***** // Here's the code for my hands. // It's still rather messy and uncommented, but here goes anyway. // Feel free to ask me if you have questions. ( rune.johansen@iname.com ) // Hand parts: // *********** #declare FPart1 = // 0.12 units long. Thinner in the middle. blob { threshold 1 cylinder {0,0.12*z,0.06,1.8 scale <1.1,1,1>} sphere {0.00*z,0.10,0.9} sphere {0.12*z,0.09,0.8} } #declare FPart2 = // 0.07 units long. Thinner in the middle and end. blob { threshold 1 cylinder {0,0.07*z,0.06,1.8 scale <1.1,1,1>} sphere {0.00*z,0.08,0.9} sphere {0.07*z,0.07,0.8} } #declare FPart3 = // 0.05 units long. Thicker in the end. blob { threshold 1 cylinder {0,0.05*z,0.06,2.8 scale <1.1,1,1>} sphere {0.05*z,0.07,0.2} } // Specifications for the thumb: // ***************************** // // Sideways bended max 45 degrees to both sides. // (1 = to the side, 0 = downwards) // // First link bended max 30 degrees. // (1 = rotated 60 degrees from the z vector) // (0 = rotated 30 degrees from the z vector) // // Second link bended max 70 degrees (0.9 = straight). // (also always twisted 30 degrees). // // Third link bended max 90 degrees (0.9 = straight). // Specifications for the other fingers: // ************************************* // // Sideways bended max 30 degrees to both sides. // (0 = towards thumb, 0.5 = straight, 1 = away from thumb) // // First link bended max 80 degrees (0.9 = straight). // // Second link bended max 100 degrees (0.9 = straight). // // Third link bended max 70 degrees (0.9 = straight). // The Hand Macro: // *************** #macro Handmacro (Control) union { blob { // "body" of the hand + first "limb" of the thumb. threshold 1 sphere {0,1.2,2.5 scale <0.1,0.07,0.1> translate <-0.02,0,-0.30>} sphere {0,0.5,0.9 scale <1,0.2,0.5> translate <0,0,-0.10>} cylinder {<-0.04,0.00,-0.20>,<-0.10,-0.02,0.04>,0.10,1.8} cylinder {<+0.00,0.00,-0.20>,<+0.00,-0.00,0.04>,0.10,1.8} cylinder {<+0.04,0.00,-0.20>,<+0.10,-0.02,0.00>,0.10,1.8} sphere { 0,0.1,1.0 // Note the similar translate <-0.1,-0.04,-0.15> // transformations here... } sphere { 0.08*z,0.1,1.0 rotate (-30-30*Control[1])*2/3*y// rotate (90-90*Control[0])*z // } ...and here... translate <-0.1,-0.04,-0.15> // } cylinder { 0,0.10*z-0.005*y,0.07,2.5 rotate (-30-30*Control[1])*y // rotate (90-90*Control[0])*z // } ...and here... translate <-0.1,-0.04,-0.15> // } } union { // The second and third "limb" of the thumb. object {FPart1 scale <1.1,1.0,0.8>} object {FPart2 scale <1.1,1.0,1.0> rotate (90-90/0.9*Control[3])*x translate <0,0,0.12*0.8> } rotate (70-70/0.9*Control[2])*x rotate 30*z // Thumb is twisted. translate 0.10*z rotate (-30-30*Control[1])*y // rotate (90-90*Control[0])*z // } ...and here! translate <-0.1,-0.04,-0.15> // } union { // Index finger. object {FPart1} // First "limb". union { object {FPart2} // Second "limb". object {FPart3 // Third "limb". rotate (70-70/0.9*Control[7])*x translate <0,0,0.07> } rotate (100-100/0.9*Control[6])*x translate <0,0,0.12> } rotate (80-80/0.9*Control[5])*x rotate (-30+60*Control[4])*y translate <-0.11,-0.01,0.05> } union { // Middle finger. object {FPart1 scale 1.1} union { object {FPart2 scale 1.1} object {FPart3 scale 1.1 rotate (70-70/0.9*Control[11])*x translate <0,0,0.07*1.1> } rotate (100-100/0.9*Control[10])*x translate <0,0,0.12*1.1> } rotate (80-80/0.9*Control[9])*x rotate (-30+60*Control[8])*y translate <+0.00,+0.00,0.05> } union { // Little finger. object {FPart1} union { object {FPart2} object {FPart3 rotate (70-70/0.9*Control[15])*x translate <0,0,0.07> } rotate (100-100/0.9*Control[14])*x translate <0,0,0.12> } rotate (80-80/0.9*Control[13])*x rotate (-30+60*Control[12])*y translate <+0.11,-0.01,0.01> } translate <0.02,0,0.33> } #end // Copyright 2000 Rune S. Johansen // If you make any pictures using my code, please give me kredit for the hands. // I would not like this code to be included in any collections // or to be distributed without my permission.