// 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 ) #include "hands.inc" #declare Image = 1; // 1 and 2 show different poses. // How to control the hand: // ************************ // // All values must be between 0 and 1, both included. // // Handmacro (array[16] { // 5) , 1) , 2) , 3) , // thumb // 4) , 1) , 2) , 3) , // index finger // 4) , 1) , 2) , 3) , // middle finger // 4) , 1) , 2) , 3) , // little finger // }) // // 1) Controls how much the first link of a given finger should be straightened out. // 0 = fully bended, 0.9 = straight, 1.0 = bended slightly backwards. // // 2) Same as 1), but controls the second link. // // 3) Same as 1) and 2), but controls the third link. // // 4) Controls how much the finger is bended sideways. // 0 = towards thumb, 0.5 = straight, 1.0 = away from thumb. // // 5) Controls how much the thumb is moved sideways. // 0 = downwards, 1 = to the side // // Also see the examples below. #declare Tex = texture { pigment {color <0,1,0>} normal {crackle 0.03 scale 0.01} finish {phong 0.05 phong_size 5} } #if (Image = 1) object { // "superb" (lower) Handmacro (array[16] { 0.5,1.0,0.5,4/9, // thumb 0.5,0.3,4/9,4/9, // index finger 0.5,0.8,0.8,0.8, // middle finger 0.5,1.0,0.9,0.9, // little finger }) texture {Tex} rotate -090*x-060*y translate <+0.1,-0.7,+0.0> rotate +030*z } object { // "relaxed" (upper) Handmacro (array[16] { 0.5,0.7,0.7,0.7, // thumb 0.5,0.8,0.8,0.8, // index finger 0.5,0.8,0.8,0.8, // middle finger 0.5,0.8,0.8,0.8, // little finger }) texture {Tex} rotate -090*x-035*y translate <+0.1,-0.7,+0.0> rotate +210*z } object { // "pointing" (right) Handmacro (array[16] { 0.9,1.0,1.0,1.0, // thumb 0.5,1.0,0.9,0.9, // index finger 0.5,0.0,0.0,0.0, // middle finger 0.5,0.0,0.0,0.0, // little finger }) texture {Tex} rotate -090*x-120*y translate <+0.1,-0.8,+0.0> rotate +110*z } object { // "agressive" (left) Handmacro (array[16] { 0.5,1.0,0.9,0.0, // thumb 0.0,0.9,0.3,0.3, // index finger 0.6,1.0,0.1,0.1, // middle finger 1.0,0.8,0.3,0.3, // little finger }) texture {Tex} rotate -090*x-140*y translate <+0.1,-0.8,+0.0> rotate +290*z } #end #if (Image = 2) object { // "victory" (lower right) Handmacro (array[16] { 0.1,0.0,0.2,0.2, // thumb 0.2,0.9,0.9,0.9, // index finger 0.8,0.9,0.9,0.9, // middle finger 0.8,0.0,0.0,0.0, // little finger }) texture {Tex} rotate -090*x-180*y translate <+0.1,-0.7,+0.0> rotate +030*z } object { // "flat" (upper left) Handmacro (array[16] { 1.0,0.2,0.5,0.7, // thumb 0.6,0.9,0.9,0.9, // index finger 0.5,0.9,0.9,0.9, // middle finger 0.4,0.9,0.9,0.9, // little finger }) texture {Tex} rotate -090*x-180*y translate <+0.1,-0.7,+0.0> rotate +210*z } object { // "fist" (upper right) Handmacro (array[16] { 0.5,0.5,0.4,0.4, // thumb 0.5,0.0,0.0,0.0, // index finger 0.5,0.0,0.0,0.0, // middle finger 0.5,0.0,0.0,0.0, // little finger }) texture {Tex} rotate -090*x-060*y translate <+0.1,-0.85,+0.0> rotate +120*z } object { // "crossing" (lower left) Handmacro (array[16] { 0.1,0.0,0.4,0.4, // thumb 0.8,0.8,1.0,0.9, // index finger 0.1,1.0,0.5,0.3, // middle finger 0.5,0.0,0.0,0.0, // little finger }) texture {Tex} rotate -090*x-055*y translate <+0.1,-0.85,+0.0> rotate +300*z } #end camera { location -3*z angle 26 look_at 0 } background {color rgb 0.5} light_source {<3,1,-1>*1000, color 0.6} light_source {<1,1,-3>*1000, color 0.6} // 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.