/* * FILE: formula3_1.dat * * example for displaying a iso surface of a function * with marching cube * */ form1 = FORMULA3( "x*x + y*y + z*z - 1;", () ); grid1 = GRIDEVAL3( (-2.,10,0.4), (-2.,10,0.4), (-2.,10,0.4), form1 ); march1 = MARCHCUBE( grid1 ); front1 = FRONT_MATERIAL ( (0.05, 0.15, 0.075, 1.0), /* diffuse color */ (0.0125, 0.0375, 0.019, 1.0), /* ambient color */ (0.0, 0.0, 0.0, 1.0), /* emissive color */ (0.2, 0.6, 0.3, 1.0), /* specular color */ 0.5 /* shininess */ ); back1 = BACK_MATERIAL ( (0.3, 0.15, 0.12, 1.0), /* diffuse color */ (0.075, 0.0375, 0.03, 1.0), /* ambient color */ (0.0, 0.0, 0.0, 1.0), /* emissive color */ (0.8, 0.4, 0.3, 1.0), /* specular color */ 0.5 /* shininess */ ); SCENEROOT = SCENENODE ( (), (ATTRIBS(front1,back1)), (march1) );