/************************************************************* * ICS include file for the Persistance of Vision Ray Tracer * * part of the ELECTRONICS set * ************************************************************* * * Created by Mark Hanford, December 2001 * * * DIL() * A 14-pin DIL IC * * * Dependencies * electronics.inc - mainly for some constants * * * Optimisation options: * There's not much to optimise on this object yet, this may change... * * * Base units: millimetres *************************************************************/ /******************************************** * Check for and set some default variables * ********************************************/ #ifdef(View_POV_Include_Stack) #debug "including ics.inc\n" #end #ifdef (MH_ICs_Inc_Temp) //do nothing #else #declare MH_ICs_Inc_Temp=1; #include "electronics.inc" /************ * Textures * ************/ #declare T_IC= texture{ pigment{color Gray05} normal{bumps 0.1 scale 0.1} finish{ //ambient 0.3 // ambient surface reflection color [0.1] //diffuse 0.8 // amount [0.6] //brilliance 1.0 // tightness of diffuse illumination [1.0] phong 0.1 // amount [0.0] phong_size 5 // (1.0..250+) (dull->highly polished) [40] //specular 0.5 // amount [0.0] //roughness 0.003 // (~1.0..0.0005) (dull->highly polished) [0.05] } } #declare T_Legs = texture{pigment{color Silver} finish{phong 1}} /************* * Constants * *************/ /********** * The IC * **********/ #macro DIL() #declare PinCount=14; #declare ICLength=(HolePitch*(PinCount/2))+1.3; //This is one leg, it will be multiplied for each instance #local ICLeg= union{ box{<0,0,-0.45>, <1.3, 0.2, 6.85>} //horizontal bit union{ box{<0,0, 0.00>, <1.3, -2.3, 0.20> translate <0.00, 0.0, -0.45>}// pigment{color Red}} //larger vertical bit box{<0,0, 0.00>, <0.4, -3.0, 0.30> translate <0.50, -2.3, -0.45>}// pigment{color Red}} //thin vertical bit rotate 4*x } union{ box{<0,0, 0.00>, <1.3, -2.3, 0.20> translate <0.00, 0.0, -0.45>}// pigment{color Green}} //larger vertical bit box{<0,0, 0.00>, <0.4, -3.0, 0.30> translate <0.50, -2.3, -0.45>}// pigment{color Green}} //thin vertical bit rotate -4*x translate <0,0,7.3> } } //here are all the legs put together #local ICLegs= union{ #local ThisLeg=0; #while (ThisLeg, } //body of IC cylinder{<0,0.6,3.25>,<0, 2, 3.25>, 1} //the semicircular notch at the end cylinder{,, .6} //the circular dent at the other end (top) cylinder{,, 1} //the circular dent at the end (bottom) texture{T_IC} } box{<-.1, -.1, .1>, texture{T_IC}} //the mould-ridge around the middle object{ICLegs texture{T_Legs}} //the legs //line up pin 1 with the origin translate <-1.95, 4, 0.58> } #end /************* * Finish up * *************/ #end