#version unofficial megapov 1.1; global_settings { assumed_gamma 1.0 max_trace_level 100 /*radiosity { count 600 error_bound .16 brightness 1.8 pretrace_end .008 pretrace_start .02 }*/ } camera { location <-5, 6,-18>//<0,10,-50> up y*image_height right x*image_width look_at < 0, 1.5, 0>//y*10 angle 45 } #local floorOn = 1; // Floor visibility switch #local blackOrWhite = 0; // Black or white background switch #local Debug = 0; // Global debug switch // Black or White Background #if(blackOrWhite = 0) background {rgb <0,0,0>} #else background {rgb <1,1,1>} #end #local RsA = seed(3141592654); // Global Rand seed for general use // Color Variables #local cMultA = 0.45;//0.00095; // need to alter this based on number of glows :-( // For Reds #local seedR = seed(112080); #local cMultRmin0 = 0.5; #local cMultRmax0 = 0.55; #local cMultRmin1 = 0.6; #local cMultRmax1 = 0.66; // For Greens #local seedG = seed(208011); #local cMultGmin0 = 0.75; #local cMultGmax0 = 0.55; #local cMultGmin1 = 0.6; #local cMultGmax1 = 0.66; // For Blues #local seedB = seed(801120); #local cMultBmin0 = 0.75; #local cMultBmax0 = 0.555; #local cMultBmin1 = 0.66; #local cMultBmax1 = 0.666; // These 5 Macros By Chris Huff : [As Far As I Know] #macro SRand(RS) (rand(RS)*2 - 1) #end #macro RRand(RS, Min, Max) (rand(RS)*(Max-Min) + Min) #end #macro Clamp(V, Min, Max) (min(Max, max(Min, V))) #end #macro Range(V, Rmn, Rmx) (V*(Rmx-Rmn) + Rmn) #end #macro RClamp(V, Rmn, Rmx, Min, Max) (Clamp(Range(V, Rmn, Rmx), Min, Max)) #end // RVector Macro By Icewind : [As Far As I Know] #macro RVector(Vmin, Vmax, RandSeed) #local xMin = Vmin.x; #local yMin = Vmin.y; #local zMin = Vmin.z; #local xMax = Vmax.x; #local yMax = Vmax.y; #local zMax = Vmax.z; #local RandVector = <(rand(RandSeed)*(xMax-xMin) + xMin), (rand(RandSeed)*(yMax-yMin) + yMin), (rand(RandSeed)*(zMax-zMin) + zMin)>; (RandVector) #end #macro test_ray( start_pt, target_pt, test_obj ) #local epsilon = 1.0e-10; #local nrml = <0,0,0>; #local direc = target_pt - start_pt; #local intersec = trace( test_obj, start_pt, direc, nrml ); !(vlength(nrml) > 0 & vlength(direc) > vlength(intersec-start_pt)+epsilon) #end // cylinderMacro By [GDS|Entropy] #macro cylinderMacro(v1,v2,radi,useRot,rot,useTrans,trans) cylinder { v1, v2, radi #if(useRot = 1) rotate rot #end #if(useTrans = 1) translate trans #end } #end // isEvenOrOdd Macro By [GDS|Entropy] #macro isEvenOrOdd(integer) #if(mod(integer,2) = 0) #local isEven = 1; #local isOdd = 0; #else #local isEven = 0; #local isOdd = 1; #end #end #declare cyl = cylinderMacro(<0,0,0>,<0,1,0>,0.1,0,0,0,0); #macro endNode(nodeCenterVector,numSpokes,glowsOn) #local blueNode = union { #local J = 0; #while(J color rgb cMultA*< rand(RsA)*cMultRmin0, rand(RsA)*cMultGmin0, rand(RsA)*cMultBmin0> //shadowless glow { size rand(RsA)*0.01 // Determines if even or odd #if(mod(glowTypeRand,2) = 0) type 0 //#debug concat("Type 0, Even Rand = ", str(glowTypeRand, 0, -1),"\n") #else type 2 //#debug concat("Type 2, Odd Rand = ", str(glowTypeRand, 0, -1),"\n") #end } fade_distance 1 fade_power 3 } cylinder { <0,0,0>, <0,1,0.5>, 0.05 // z vector positive int = upturned, and obviously the inverse } } #else cylinder { <0,0,0>, <0,1,0.5>, 0.05 // z vector positive int = upturned, and obviously the inverse } #end object { groupGlow rotate x*-90 rotate <0,RRand(RsA,-180,180),0> translate nodeCenterVector //pigment {color rgb nodeCenterVector} pigment {color rgb 0} } #set J = J + 1; #end } object {blueNode} #end #macro fakeTreeBranch(twigLength,twigDiameter,branchLength,needleAmount,glowsOn) #local twigAmount = branchLength/twigDiameter; #declare twistStalk = //#declare i=0; #local j=0; object { union { //#while (i<=45) #while (j<=twigAmount) #declare cyl = union { cylinderMacro(<0,0,0>,<0,twigLength,0>,twigDiameter,0,0,0,0) object { endNode(<0,twigLength,0>,needleAmount,glowsOn) } } object { cyl rotate <90,22.5*j,0> translate } #set j=j+1; #end //#declare i=i+1; //#end cylinderMacro(<0,-twigDiameter,0>,<0,(twigDiameter*twigAmount)+twigDiameter,0>,twigDiameter*2,0,0,0,0) } } object { twistStalk pigment {color rgb 0} translate <0,0,0> } #end object { fakeTreeBranch(1.5,0.125,5.625,5,1) translate <-1,0,-5> } #if(floorOn = 1) box { <-15, 0,-10>, < 15, 0, 10> pigment {checker color rgb 0.05, color rgb 1} finish { //reflection {0.5, 0.75 metallic } diffuse 0.25 ambient 0 } } #end /* light_source { <0, 100, 0> color rgb 1.0 } */