/******************************************************************** * BREADBOARD include file for the Persistance of Vision Ray Tracer * * part of the ELECTRONICS set * ******************************************************************** * * Created by Mark Hanford, December 2001 * * * Make sure that the folder with the images in can be found by POV. * * * Optimisation Options * MH_Detailed=no - swaps CSG carved holes with dark circles * * * Dependencies * electronics.inc * * Base units: millimetres ********************************************************************/ /******************************************** * Check for and set some default variables * ********************************************/ #ifdef(View_POV_Include_Stack) #debug "including protoboard.inc\n" #end #ifdef (MH_Breadboard_Inc_Temp) //do nothing #else #declare MH_Breadboard_Inc_Temp=1; #ifndef (MH_Detailed) #declare MH_Detailed=yes; #end #include "electronics.inc" /************* * Constants * *************/ #declare Jitter=0.001; /************ * Textures * ************/ #declare T_Breadboard = texture{pigment{color Gray90} finish{roughness 0.15}} /******************* * The Bread Board * *******************/ #macro Breadboard() //DetailLevel determines how to render the board #local BoardX = 80.8; #local BoardY = 8.4; #local BoardZ = 59.6; // this will be used to carve the holes // ------------------------------------ #declare Hole= cone { (8.70-2.5)*y, 0.0, (8.50)*y, 1.0 } // this will be used to make the boards interlock // ---------------------------------------------- #declare Wedge= prism { linear_sweep linear_spline 0, 5, 5, <0.0, 0.0>, <1.6, 0.4>, <1.6, 4.0>, <0.0, 4.4>, <0.0, 0.0> } // this is complete row of holes // ----------------------------- #declare RowsA= union{ #local HoleNum=0; #while (HoleNum < 29) object{Hole translate (4.7+(2.5*HoleNum))*x} #local HoleNum=HoleNum+1; #end } // this is an interrupted row of holes (usually the +ve and -ve rails) // ------------------------------------------------------------------- #declare RowsB= union{ #local HoleNum=0; #while (HoleNum < 29) #if (HoleNum = 5) #else #if (HoleNum = 11) #else #if (HoleNum = 17) #else #if (HoleNum = 23) #else object{Hole translate (4.7+(2.5*HoleNum))*x} #end #end #end #end #local HoleNum=HoleNum+1; #end } // this is the board all put together // ---------------------------------- union{ #if (MH_Detailed) difference{ //the main bulk and the carved holes #end box{< 0.00, 0.00, 0.00>, <80.80, 8.40, 59.60>} //the main bulk box{< 3.60, 6.80, 28.40>, <77.20, 8.40+Jitter, 31.30>} //the full-width trench box{< 3.60, 1.40, 28.40>, <18.80, 6.80+Jitter, 31.30>} //the left trench box{<22.20, 1.40, 28.40>, <58.40, 6.80+Jitter, 31.30>} //the middle trench box{<61.90, 1.40, 28.40>, <77.20, 6.80+Jitter, 31.30>} //the right trench box{< 3.60, 8.25, 3.40>, <77.20, 8.40+Jitter, 8.10>} //the near hole-dip box{< 3.60, 8.25, 14.70>, <77.20, 8.40+Jitter, 27.60>} //the next hole-dip box{< 3.60, 8.25, 32.60>, <77.20, 8.40+Jitter, 45.30>} //the next hole-dip box{< 3.60, 8.25, 51.60>, <77.20, 8.40+Jitter, 56.60>} //the far hole-dip union{ object{RowsB translate <0, 0, 4.3+(0*2.5)>} object{RowsB translate <0, 0, 4.3+(1*2.5)>} object{RowsA translate <0, 0, 15.6+(0*2.5)>} object{RowsA translate <0, 0, 15.6+(1*2.5)>} object{RowsA translate <0, 0, 15.6+(2*2.5)>} object{RowsA translate <0, 0, 15.6+(3*2.5)>} object{RowsA translate <0, 0, 15.6+(4*2.5)>} object{RowsA translate <0, 0, 33.7+(0*2.5)>} object{RowsA translate <0, 0, 33.7+(1*2.5)>} object{RowsA translate <0, 0, 33.7+(2*2.5)>} object{RowsA translate <0, 0, 33.7+(3*2.5)>} object{RowsA translate <0, 0, 33.7+(4*2.5)>} object{RowsB translate <0, 0, 52.4+(0*2.5)>} object{RowsB translate <0, 0, 52.4+(1*2.5)>} #if (MH_Detailed=no) pigment{color rgb<0.7,0.7,0.7>} #end } object{Wedge translate <80.8-1.6+Jitter, -Jitter, 15>} object{Wedge translate <80.8-1.6+Jitter, -Jitter, 40>} object{Wedge rotate 90*y translate < 7.0, -Jitter, 1.6-Jitter>} object{Wedge rotate 90*y translate <71.4, -Jitter, 1.6-Jitter>} #if (MH_Detailed) } #end text{ttf "c:\winnt\fonts\arial.ttf", "J", 0.5, 0 rotate 90*x scale 2 translate <1.2, 8.5, 15.0+(0*2.5)>} text{ttf "c:\winnt\fonts\arial.ttf", "I", 0.5, 0 rotate 90*x scale 2 translate <1.6, 8.5, 15.0+(1*2.5)>} text{ttf "c:\winnt\fonts\arial.ttf", "H", 0.5, 0 rotate 90*x scale 2 translate <1.2, 8.5, 15.0+(2*2.5)>} text{ttf "c:\winnt\fonts\arial.ttf", "G", 0.5, 0 rotate 90*x scale 2 translate <1.0, 8.5, 15.0+(3*2.5)>} text{ttf "c:\winnt\fonts\arial.ttf", "F", 0.5, 0 rotate 90*x scale 2 translate <1.2, 8.5, 15.0+(4*2.5)>} text{ttf "c:\winnt\fonts\arial.ttf", "E", 0.5, 0 rotate 90*x scale 2 translate <1.0, 8.5, 32.5+(0*2.5)>} text{ttf "c:\winnt\fonts\arial.ttf", "D", 0.5, 0 rotate 90*x scale 2 translate <1.0, 8.5, 32.5+(1*2.5)>} text{ttf "c:\winnt\fonts\arial.ttf", "C", 0.5, 0 rotate 90*x scale 2 translate <1.0, 8.5, 32.5+(2*2.5)>} text{ttf "c:\winnt\fonts\arial.ttf", "B", 0.5, 0 rotate 90*x scale 2 translate <1.1, 8.5, 32.5+(3*2.5)>} text{ttf "c:\winnt\fonts\arial.ttf", "A", 0.5, 0 rotate 90*x scale 2 translate <1.0, 8.5, 32.5+(4*2.5)>} text{ttf "c:\winnt\fonts\arial.ttf", "J", 0.5, 0 rotate 90*x scale 2 translate <77.2+1.2, 8.5, 15.0+(0*2.5)>} text{ttf "c:\winnt\fonts\arial.ttf", "I", 0.5, 0 rotate 90*x scale 2 translate <77.2+1.6, 8.5, 15.0+(1*2.5)>} text{ttf "c:\winnt\fonts\arial.ttf", "H", 0.5, 0 rotate 90*x scale 2 translate <77.2+1.2, 8.5, 15.0+(2*2.5)>} text{ttf "c:\winnt\fonts\arial.ttf", "G", 0.5, 0 rotate 90*x scale 2 translate <77.2+1.0, 8.5, 15.0+(3*2.5)>} text{ttf "c:\winnt\fonts\arial.ttf", "F", 0.5, 0 rotate 90*x scale 2 translate <77.2+1.2, 8.5, 15.0+(4*2.5)>} text{ttf "c:\winnt\fonts\arial.ttf", "E", 0.5, 0 rotate 90*x scale 2 translate <77.2+1.0, 8.5, 32.5+(0*2.5)>} text{ttf "c:\winnt\fonts\arial.ttf", "D", 0.5, 0 rotate 90*x scale 2 translate <77.2+1.0, 8.5, 32.5+(1*2.5)>} text{ttf "c:\winnt\fonts\arial.ttf", "C", 0.5, 0 rotate 90*x scale 2 translate <77.2+1.0, 8.5, 32.5+(2*2.5)>} text{ttf "c:\winnt\fonts\arial.ttf", "B", 0.5, 0 rotate 90*x scale 2 translate <77.2+1.1, 8.5, 32.5+(3*2.5)>} text{ttf "c:\winnt\fonts\arial.ttf", "A", 0.5, 0 rotate 90*x scale 2 translate <77.2+1.0, 8.5, 32.5+(4*2.5)>} text{ttf "c:\winnt\fonts\arial.ttf", "1", 0.5, 0 rotate 90*x scale 2 translate < 9.4, 8.5, 12.0>} text{ttf "c:\winnt\fonts\arial.ttf", "5", 0.5, 0 rotate 90*x scale 2 translate <19.3, 8.5, 12.0>} text{ttf "c:\winnt\fonts\arial.ttf", "10", 0.5, 0 rotate 90*x scale 2 translate <31.2, 8.5, 12.0>} text{ttf "c:\winnt\fonts\arial.ttf", "15", 0.5, 0 rotate 90*x scale 2 translate <44.0, 8.5, 12.0>} text{ttf "c:\winnt\fonts\arial.ttf", "20", 0.5, 0 rotate 90*x scale 2 translate <56.0, 8.5, 12.0>} text{ttf "c:\winnt\fonts\arial.ttf", "25", 0.5, 0 rotate 90*x scale 2 translate <68.4, 8.5, 12.0>} text{ttf "c:\winnt\fonts\arial.ttf", "1", 0.5, 0 rotate 90*x scale 2 translate < 9.4, 8.5, 46.0>} text{ttf "c:\winnt\fonts\arial.ttf", "5", 0.5, 0 rotate 90*x scale 2 translate <19.3, 8.5, 46.0>} text{ttf "c:\winnt\fonts\arial.ttf", "10", 0.5, 0 rotate 90*x scale 2 translate <31.2, 8.5, 46.0>} text{ttf "c:\winnt\fonts\arial.ttf", "15", 0.5, 0 rotate 90*x scale 2 translate <44.0, 8.5, 46.0>} text{ttf "c:\winnt\fonts\arial.ttf", "20", 0.5, 0 rotate 90*x scale 2 translate <56.0, 8.5, 46.0>} text{ttf "c:\winnt\fonts\arial.ttf", "25", 0.5, 0 rotate 90*x scale 2 translate <68.4, 8.5, 46.0>} object{Wedge translate <-1.6, 0, 15>} object{Wedge translate <-1.6, 0, 40>} object{Wedge rotate 90*y translate < 7.0, 0, 61>} object{Wedge rotate 90*y translate <71.4, 0, 61>} texture{T_Breadboard} translate <-4.7, -BoardY, -15.6> } #end /************* * Finish up * *************/ #end