// Last edited on 2011-03-02 00:51:19 by stolfilocal #macro microbe_take_01(tt,VY) // The microbe swimming along the Y axis with velocity VY // Set only one of these: #local test_straight = 0; #local test_wiggle = 0; #local do_frame = 1; #declare tx_gold_mirror = texture{ pigment{ color rgb < 1.000, 0.750, 0.100 > } finish{ diffuse 0.20 reflection 0.75*< 1.000, 0.750, 0.100 > ambient 0.05 } } #declare tx_matt_orange = texture{ pigment{ color rgb < 1.000, 0.700, 0.100 > } finish{ diffuse 0.90 ambient 0.10 } } #declare tx_u_stripes = texture{ pigment{ uv_mapping checker color rgb < 0.500, 0.850, 0.600 >, color rgb < 1.000, 0.980, 0.600 > translate 0.0001*z scale < 1000.0, 0.125, 1.0 > } finish{ diffuse 0.9 ambient 0.1 } } #local len = 50.00; #local wid = 8.00; #local hgt = 4.00; #local amp = 4.00; #local wav = VY; #local org = <0, -VY/2, 5>; #local vel = <0, VY, 0>; //#local tx_body = tx_gold_mirror; #local tx_body = tx_u_stripes; #local tx_grid = tx_matt_orange; // #local r_grid = 0.1; #local r_grid = 0; #if (test_straight) object{ microbe_swimming(len,wid,hgt,0,wav,0,tx_body,r_grid,tx_grid) } #end #if (test_wiggle) #local N = 15; #local ystep = 100/N; union{ #local i = 0; #while (i <= N) #local pha = i/N; object{ microbe_swimming(len,wid,hgt,amp,wav,pha,tx_body,r_grid,tx_grid) translate (i-N/2)*ystep*y } #local i = i + 1; #end } #end #if (do_frame) #local pha = tt; union{ object{ microbe_swimming(len,wid,hgt,amp,wav,pha,tx_body,r_grid,tx_grid) rotate 90*z translate org + vel*tt } } #end #end