// Persistence Of Vision Ray Tracer Scene Description File // ------------------------------------------------------- // File: @(#)blocks.pov // Description: mechanics simulation sample scene // Features demonstrated: mechsim // Creation Date: $ 14 Oct 2002, 16:55:14 $ // Last modified: $ 12 Jul 2004, 22:36:49 $ // Author: Christoph Hormann // // @@ Demonstrating groups and mass-face-collisions. // // Render instructions: // -------------------- // // First render as still with: // // -w320 -h240 // // Then as animation with: // // -w320 -h240 +a0.3 -j +kff70 #version unofficial megapov 1.1; #include "mechsim.inc" //#declare fn_Env = function { y+0.5*abs( pow( sin(z/2)+cos(x/2) , 5 ) * sin(clock*5) ) } #declare fn_Env = function { y } global_settings { max_trace_level 10 assumed_gamma 1 mechsim { gravity <0, -9.81, 0> method 2 bounding 3 environment { function { fn_Env(x, y, z) } stiffness 240000 damping 35000 friction 0.2, 1.001 } collision { 2, 2, 0 stiffness 18e4 damping 3e5 friction 0.9, 1.001 } #if (frame_number > 1) #declare anim_FPS = 1/clock_delta; #declare COUNT = 100; // 300 step_count COUNT //500 time_step (1/anim_FPS)/COUNT //500 topology { load_file "blocks1.dat" save_file "blocks1.dat" } #else step_count 0 topology { // ttttttttttttt #declare Stiff= 24e3*10; //x wiekszy sitf = twardsze obiekty - lepiej sie odbijaja #declare Damp = 3e3; #include "rand.inc" #declare RND = seed(76083); #local NUM=0; #while (NUM<4) group { #declare Trans1 = transform { rotate translate *<1,.3,1>/2 translate <0,1 + NUM*3,0> } MechSim_Generate_Grid_Std(<0, 0, 0>, 0.1, 22000, Stiff, Damp, true, <3,3,3>*(1/6), 6, Trans1, 3) } #local NUM=NUM+1; #end save_file "blocks1.dat" } #end } } //MechSim_Show_All_Objects(0.03, false, false, "") #declare MSim_Tex_Mesh = texture { pigment { rgb z } finish { specular 1 roughness 0.01 reflection .3 brilliance 3 } } MechSim_Show_All_Objects(0.03, true, false, "") /* MechSim_Show_Grid(0, 4,4,4, true, false, 0, "") MechSim_Show_Grid(108, 4,4,4, true, false, 0, "") #include "shapes.inc" #declare obj = MechSim_Show_Grid(216, 9, 3, 3, true, true, 0, "") object { obj pigment { bozo scale .3 #local A=<1,1,1>; #local B=<1,1,1>; Extents(obj,A,B) translate (A+B)/2 } } */ camera { location <0,10,-10> look_at <0,3,0> angle 50 } light_source { <100, 1000, -700> color rgb .9 } light_source { <500, 300, -700> color rgb .6 } sky_sphere { pigment { gradient z color_map { [0.00 rgb <0.8,0.9,1.0>] [0.10 rgb <0.6,0.7,1.0>] [0.25 rgb <0.2,0.3,0.8>] } } } plane { y, 0 texture { pigment { checker rgb 1 rgb .6 } finish { ambient 0.05 diffuse 0.9 } } } fog { fog_type 2 fog_alt 100 distance 50 rgb .7 }