// Magic Lamp - copyright 2002 Rune S. Johansen // // Suggested command line settings: // +kff125 #version 3.5; // easyblob macro by Rune S. Johansen #macro easyblob (_threshold,_visibleradius,_blobbiness) #local _strength = (1+1/_blobbiness)*_threshold; #local _actualradius = _visibleradius/sqrt(1-sqrt(_threshold/_strength)); _actualradius, _strength #end #declare Lamp = blob { threshold 1 sphere {0, easyblob(1,1,0.1) scale <.16,0.16,.16> translate 1.9*y} sphere {0, easyblob(1,1,0.1) scale <1.0,0.30,0.8> translate 1.5*y} sphere {0, easyblob(1,1,1)*-0.4 scale <1.8,1.00,1.4> translate 2.5*y} sphere {0, easyblob(1,1,1) scale <1.8,1.00,1.4> translate 1.0*y} sphere {0, easyblob(1,1,1) scale <0.8,0.15,0.6> translate 0.05*y} sphere {0, easyblob(1,0.9,1)*-1 scale <0.8,0.15,0.6> translate -0.1*y} #declare C = 0; #declare Cm = 20; #while (C<=Cm) #declare V = C/Cm; #declare P = <1.3,0.8,0> + 1.5*V*x + (-cos(V*pi)/2+0.5)*y; sphere {P, 0.6-0.4*V, 2} #declare C = C+1; #end sphere {0, 1, -5 scale <0.4,0.1,0.2> translate <2.8,1.82,0>} #declare C = 0; #declare Cm = 60; #while (C,55*z) + <-2.1,1.1,0.0>; sphere {P, 0.16+0.06*cos(V*2*pi), 2 scale <1,1,1.5>} #declare C = C+1; #end pigment {color <1.0,0.8,0.2>} finish {phong 0.3 phong_size 1 specular 0.8} rotate -90*y bounded_by {box {<-1.6,-0.1,-3.0>, <1.6,2.1,2.9>}} } camera { location <-10,10,-30> look_at 5*y angle 30 } light_source { < -3, 20, -7>, color 0.9 spotlight point_at 5*y radius 10 falloff 70 } light_source { <-10, 10,-30>, color 0.6 shadowless spotlight point_at 5*y radius 5 falloff 25 } union { plane { y, 0} plane {-z, -5} plane {-x, -5} pigment {color <1.00,0.85,0.60>} normal {wrinkles 0.3 turbulence 1} } #declare Location_Spline = spline { cubic_spline 0.00, < -2,0, 2>, 0.10, < -2,0, 2>, 0.11, < -2,0, 2>, 0.20, < -2,5, 2>, 0.30, < -2,5, 2>, 0.40, < -4,5, -2>, 0.55, < 2,5, -6>, 0.65, < -2,6,-10>, 0.75, < -2,6,-10>, 1.00, <-32,9,-40> } #declare Rotation_Spline = spline { cubic_spline 0.00, 90*y, 0.10, 90*y, 0.11, 90*y, 0.20, 110*y, 0.30, 120*y, 0.40, 200*y, 0.55, 500*y, 0.65, 590*y, 0.75, 585*y, 1.00, 585*y } object { Lamp rotate 1*Rotation_Spline(clock) translate 1*Location_Spline(clock) }