#declare BuildingCore_debug = 1; #if(BuildingCore_debug) /********************************************************/ /* Camera & Lights */ /********************************************************/ #declare cx = 5; #declare cy = 6; #declare cz = 10; #declare Cam_location_vec = ; #declare Cam_look_at_vec = <0, cy/2, 0>; #declare Zoom = 1; #declare light_location_vec = ; #declare light_location_vec = <-1000, 2000, 3000>; #declare G_debug = 0; #declare G_debug_L = 10; #declare G_debug_R = 0.016; #include "FCcamera.INC" background { rgb<.45, .45, .55> } /*indicate that debug i set */ #debug "\n " #debug "\n * * * * * * * * * * * * * * " #debug "\n " #debug " BuildingCore is set for debug " #debug "\n * * * * * * * * * * * * * * " #debug "\n " #debug "\n " #end /* if debug */ /******************************************************/ /* Object Definition */ #macro BuildingCoreMac (p_W, p_H, p_T, p_x0, p_y0, p_z0, p_Txt, p_DoTxt, p_m, p_num) //----------------------------------------- // Var #local m = p_m; #local BlockW = p_W; #local BlockH = p_H; #local BlockT = p_T; #local BlockV = ; #local CoreBeamH = BlockH*1.25; #local CoreBeamThk = m/2 *.71; #local CoreBeamNumW = 6; #local CoreBeamNumT = 4; #local CoreSecW = BlockW/CoreBeamNumW*.844; #local CoreSecT = BlockT/CoreBeamNumT*.78; #local CoreArrW = (CoreBeamNumW-1)*CoreSecW; #local CoreArrT = (CoreBeamNumT-1)*CoreSecT; #local StoryH = m*3; #local StoryNum = p_num; //----------------------------------------- // Main union{ // LOAD ONCE #include "MeshPntTrn.Inc" mesh{ // - - - - - - - - - - - - - - - // ground limit #local bW = BlockW; #local bH = .1*m; #local bT = BlockT; #local bX0 = 0; #local bY0 = 0; #local bZ0 = 0; #include "Mesh.tch" // - - - - - - - - - - - - - - - // main H beams #local CountJ = CoreBeamNumT-1; #local J = 0; #while ( J <= CountJ ) #local CountI = CoreBeamNumW-1; #local I = 0; #while ( I <= CountI ) #local p0 = #local bW = CoreBeamThk/8; #local bH = CoreBeamH; #local bT = CoreBeamThk; #local bX0 = p0.x; #local bY0 = p0.y; #local bZ0 = p0.z; #include "Mesh.tch" #local bW = CoreBeamThk; #local bH = CoreBeamH; #local bT = CoreBeamThk/8; #local bX0 = p0.x; #local bY0 = p0.y; #local bZ0 = p0.z+bW/2; #include "Mesh.tch" #local bW = CoreBeamThk; #local bH = CoreBeamH; #local bT = CoreBeamThk/8; #local bX0 = p0.x; #local bY0 = p0.y; #local bZ0 = p0.z-bW/2; #include "Mesh.tch" #local I = I + 1; #end #local J = J + 1; #end // - - - - - - - - - - - - - - - // platform grid #local gde = m/4; #local CountJ = StoryNum; #local J = 1; #while ( J <= CountJ ) #local Count = CoreBeamNumW; #local I = -1; #while ( I <= Count ) #local bW = gde; #local bH = gde; #local bT = BlockT; #local bX0 = CoreArrW/2-CoreSecW*I; #local bY0 = StoryH*J; #local bZ0 = 0; #include "Mesh.tch" #local I = I + 1; #end #local Count = CoreBeamNumT; #local I = -1; #while ( I <= Count ) #local bW = BlockW; #local bH = gde; #local bT = gde; #local bX0 = 0; #local bY0 = StoryH*J; #local bZ0 = CoreArrT/2-CoreSecT*I; #include "Mesh.tch" #local I = I + 1; #end #local J = J + 1; #end // BOX PARAM #local bW = 1; #local bH = 4; #local bT = 1; #local Init_Trn = <0, 0, 0>; // ANGLE PARAM #local aX = 60; #local aY = 0; #local aZ = 0; // TRN PARAM #local Place_Trn = <0, 0, 0>; //#include "ROT_TRN.tch" /* #local r1 = seed(4378); #local r2 = seed(9765); #local r3 = seed(5436); #local Count = 300; #local I = 0; #while ( I <= Count ) // BOX PARAM #local bW = .75*m; #local bH = .25*m; #local bT = .25*m; #local Init_Trn = <0, 0, 0>; // ANGLE PARAM #local aX = 360*rand(r2)/90; #local aY = 360*rand(r2); #local aZ = 360*rand(r2)/90; // TRN PARAM #local Place_Trn = <0, 0, 0>+-; #include "ROT_TRN.tch" #local I = I + 1; #end */ } // mesh #if (p_DoTxt) texture{ p_Txt } #end translate } #end /******************************************************/ /* if not used as inc then draw object */ #if(BuildingCore_debug) #local l_m = .25; #local l_W = 19*l_m; #local l_H = 16*l_m; #local l_T = 11*l_m; #local l_Txt = texture{ pigment{ rgb<.5, .4, .3>*.87 } } #local l_DoTxt = 1; #local l_num = 5; #local BuildingCoreObj = BuildingCoreMac (l_W, l_H, l_T, 0, 0, 0, l_Txt, l_DoTxt, l_m, l_num) object{ BuildingCoreObj } object{ BuildingCoreObj translate<0,-3,0>} object{ BuildingCoreObj translate<0,-6,0>} // - - - - - - - - - - - - - - - - - - - - - - - - - - - // Scaffold arr #include "ScaffoldRW_v01p.Inc" // - - - - - - - - // Instance01 /* #local l_W = 19*l_m; #local l_H = 6*l_m; #local l_T = 11*l_m; */ #local l_H = 6*l_m; #local l_Txt = texture{ pigment{rgb .6} } #local l_DoTxt = 1; #local l_Num = 4; #local Scaff01Obj = ScaffoldArrMac (l_W, l_H, l_T, 0, 0, 0, l_Txt, l_DoTxt, l_m, l_Num) object{ Scaff01Obj } object{ Scaff01Obj translate<0,-1.5,0> } object{ Scaff01Obj translate<0,-1.5*2,0> } object{ Scaff01Obj translate<0,-1.5*3,0> } // - - - - - - - - // Instance02 /* #local l_W = 13*l_m; #local l_H = 6*l_m; #local l_T = 7*l_m; #local l_H = 6*l_m; #local l_Txt = texture{ pigment{rgb .6} } #local l_DoTxt = 1; #local l_Num = 8; #local Scaff02Obj = ScaffoldArrMac (l_W, l_H, l_T, 0, 0, 0, l_Txt, l_DoTxt, l_m, l_Num) object{ Scaff02Obj } */ // - - - - - - - - // Instance03 #local l_W = 7*l_m; #local l_H = 6*l_m; #local l_T = 7*l_m; #local l_H = 6*l_m; #local l_Txt = texture{ pigment{rgb .6} } #local l_DoTxt = 1; #local l_Num = 8; #local Scaff03Obj = ScaffoldArrMac (l_W, l_H, l_T, 0, 0, 0, l_Txt, l_DoTxt, l_m, l_Num) object{ Scaff03Obj } object{ Scaff03Obj translate<0,3,0> } #end /******************************************************/ /* The Call #include "BuildingCore.Inc" */ /*******************************************************/