From: Gordon K. <kin...@us...> - 2004-10-06 09:41:18
|
Update of /cvsroot/teem/teem/src/echo/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3128/echo/test Modified Files: glyph.c test.c trend.c Log Message: converted all tabs to spaces Index: test.c =================================================================== RCS file: /cvsroot/teem/teem/src/echo/test/test.c,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** test.c 12 May 2004 11:07:24 -0000 1.17 --- test.c 6 Oct 2004 09:40:27 -0000 1.18 *************** *** 44,51 **** B = airDrand48(); echoSphereSet(sph, ! AIR_AFFINE(0, R, 1, -1, 1), ! AIR_AFFINE(0, G, 1, -1, 1), ! AIR_AFFINE(0, B, 1, -1, 1), ! 0.05); echoColorSet(sph, R, G, B, 1.0); echoMatterPhongSet(scene, sph, 0, 1, 0, 40); --- 44,51 ---- B = airDrand48(); echoSphereSet(sph, ! AIR_AFFINE(0, R, 1, -1, 1), ! AIR_AFFINE(0, G, 1, -1, 1), ! AIR_AFFINE(0, B, 1, -1, 1), ! 0.05); echoColorSet(sph, R, G, B, 1.0); echoMatterPhongSet(scene, sph, 0, 1, 0, 40); *************** *** 57,62 **** rect = echoObjectNew(scene, echoTypeRectangle); echoRectangleSet(rect, -1, -1, -1, ! 2, 0, 0, ! 0, 2, 0); echoColorSet(rect, 1, 1, 1, 1); echoMatterPhongSet(scene, rect, 0, 1, 0, 40); --- 57,62 ---- rect = echoObjectNew(scene, echoTypeRectangle); echoRectangleSet(rect, -1, -1, -1, ! 2, 0, 0, ! 0, 2, 0); echoColorSet(rect, 1, 1, 1, 1); echoMatterPhongSet(scene, rect, 0, 1, 0, 40); *************** *** 65,70 **** rect = echoObjectNew(scene, echoTypeRectangle); echoRectangleSet(rect, -0.25, -0.25, 2, ! 0.5, 0, 0, ! 0, 0.5, 0); echoColorSet(rect, 1, 1, 1, 1); echoMatterLightSet(scene, rect, 3, 1); --- 65,70 ---- rect = echoObjectNew(scene, echoTypeRectangle); echoRectangleSet(rect, -0.25, -0.25, 2, ! 0.5, 0, 0, ! 0, 0.5, 0); echoColorSet(rect, 1, 1, 1, 1); echoMatterLightSet(scene, rect, 3, 1); Index: glyph.c =================================================================== RCS file: /cvsroot/teem/teem/src/echo/test/glyph.c,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** glyph.c 7 Jan 2004 15:34:29 -0000 1.8 --- glyph.c 6 Oct 2004 09:40:27 -0000 1.9 *************** *** 39,44 **** void makeGlyphScene(limnCam *cam, EchoParm *eparm, ! Nrrd *nten, EchoGlyphParm *gparm, ! EchoObject **sceneP, airArray **lightArrP) { char me[]="makeGlyphScene"; int xi, yi, zi, sx, sy, sz, ng; --- 39,44 ---- void makeGlyphScene(limnCam *cam, EchoParm *eparm, ! Nrrd *nten, EchoGlyphParm *gparm, ! EchoObject **sceneP, airArray **lightArrP) { char me[]="makeGlyphScene"; int xi, yi, zi, sx, sy, sz, ng; *************** *** 82,127 **** y = ys * yi; for (xi=0; xi<sx; xi++) { ! x = xs * xi; ! /* don't render tensor if confidence threshold below 0.5 */ ! if (!( tdata[0] > 0.5 )) ! goto onward; ! /* do eigensystem solve; don't render if aniso threshold not met */ ! tenEigensolve(eval, evec, tdata); ! tenAnisoCalc(c, eval); ! if (!( c[gparm->aniso] > gparm->anthr )) ! goto onward; ! rgbGen(rgb, evec, c[gparm->aniso]); ! if (1) { ! glf = echoObjectNew(echoObjectSphere); ! echoObjectSphereSet(glf, 0, 0, 0, 0.5); ! } ! else { ! glf = echoObjectNew(echoObjectCube); ! } ! echoMatterMetalSet(glf, rgb[0], rgb[1], rgb[2], ! 0.8, 1.0, 0.0); ! echoMatterPhongSet(glf, rgb[0], rgb[1], rgb[2], 1.0, ! 0.1, 1.0, 0.3, 1); ! TEN_LIST2MAT(dmat, tdata); ! ELL_3M_SET_IDENTITY(ident); ! ELL_3M_SCALEADD(dmat, gparm->gscale*(1-gparm->show), ident, ! gparm->gscale*gparm->show, dmat); ! ELL_43M_INSET(MA, dmat); ! ELL_4M_SET_TRANSLATE(MB, x, y, z); ! ELL_4M_MUL(MC, MB, MA); ! inst = echoObjectNew(echoObjectInstance); ! echoObjectInstanceSet(inst, MC, glf, AIR_TRUE); ! echoObjectListAdd(scene, inst); ! ng++; onward: ! tdata += 7; } } --- 82,127 ---- y = ys * yi; for (xi=0; xi<sx; xi++) { ! x = xs * xi; ! /* don't render tensor if confidence threshold below 0.5 */ ! if (!( tdata[0] > 0.5 )) ! goto onward; ! /* do eigensystem solve; don't render if aniso threshold not met */ ! tenEigensolve(eval, evec, tdata); ! tenAnisoCalc(c, eval); ! if (!( c[gparm->aniso] > gparm->anthr )) ! goto onward; ! rgbGen(rgb, evec, c[gparm->aniso]); ! if (1) { ! glf = echoObjectNew(echoObjectSphere); ! echoObjectSphereSet(glf, 0, 0, 0, 0.5); ! } ! else { ! glf = echoObjectNew(echoObjectCube); ! } ! echoMatterMetalSet(glf, rgb[0], rgb[1], rgb[2], ! 0.8, 1.0, 0.0); ! echoMatterPhongSet(glf, rgb[0], rgb[1], rgb[2], 1.0, ! 0.1, 1.0, 0.3, 1); ! TEN_LIST2MAT(dmat, tdata); ! ELL_3M_SET_IDENTITY(ident); ! ELL_3M_SCALEADD(dmat, gparm->gscale*(1-gparm->show), ident, ! gparm->gscale*gparm->show, dmat); ! ELL_43M_INSET(MA, dmat); ! ELL_4M_SET_TRANSLATE(MB, x, y, z); ! ELL_4M_MUL(MC, MB, MA); ! inst = echoObjectNew(echoObjectInstance); ! echoObjectInstanceSet(inst, MC, glf, AIR_TRUE); ! echoObjectListAdd(scene, inst); ! ng++; onward: ! tdata += 7; } } *************** *** 132,136 **** echoObjectSphereSet(glf, 35+1000, 40, 35, 1000); echoMatterPhongSet(glf, 1, 1, 1, 1.0, ! 0.1, 1.0, 0.3, 1); inst = echoObjectNew(echoObjectInstance); echoObjectInstanceSet(inst, MC, glf, AIR_TRUE); --- 132,136 ---- echoObjectSphereSet(glf, 35+1000, 40, 35, 1000); echoMatterPhongSet(glf, 1, 1, 1, 1.0, ! 0.1, 1.0, 0.3, 1); inst = echoObjectNew(echoObjectInstance); echoObjectInstanceSet(inst, MC, glf, AIR_TRUE); *************** *** 143,153 **** rect = echoObjectNew(echoObjectRectangle); echoObjectRectangleSet(rect, ! AIR_AFFINE(0, gparm->lpos[0], 1, 0, sx*xs) ! - gparm->lrad, ! AIR_AFFINE(0, gparm->lpos[1], 1, 0, sy*ys) ! - gparm->lrad, ! 0, ! 2*gparm->lrad, 0, 0, ! 0, 2*gparm->lrad, 0); eparm->refDistance = sz*(gparm->ldref); printf("llev = %g\n", gparm->llev); --- 143,153 ---- rect = echoObjectNew(echoObjectRectangle); echoObjectRectangleSet(rect, ! AIR_AFFINE(0, gparm->lpos[0], 1, 0, sx*xs) ! - gparm->lrad, ! AIR_AFFINE(0, gparm->lpos[1], 1, 0, sy*ys) ! - gparm->lrad, ! 0, ! 2*gparm->lrad, 0, 0, ! 0, 2*gparm->lrad, 0); eparm->refDistance = sz*(gparm->ldref); printf("llev = %g\n", gparm->llev); *************** *** 161,167 **** light = echoLightNew(echoLightDirectional); echoLightDirectionalSet(light, 1, 1, 1, ! AIR_AFFINE(0, gparm->lpos[0], 1, -sx*xs, sx*xs), ! AIR_AFFINE(0, gparm->lpos[1], 1, -sy*ys, sy*ys), ! AIR_AFFINE(0, 0, 1, -sz*zs, sz*zs)); echoLightArrayAdd(*lightArrP, light); } --- 161,167 ---- light = echoLightNew(echoLightDirectional); echoLightDirectionalSet(light, 1, 1, 1, ! AIR_AFFINE(0, gparm->lpos[0], 1, -sx*xs, sx*xs), ! AIR_AFFINE(0, gparm->lpos[1], 1, -sy*ys, sy*ys), ! AIR_AFFINE(0, 0, 1, -sz*zs, sz*zs)); echoLightArrayAdd(*lightArrP, light); } *************** *** 214,219 **** } if (!( AIR_EXISTS((*nrrdP)->axis[1].spacing) && ! AIR_EXISTS((*nrrdP)->axis[2].spacing) && ! AIR_EXISTS((*nrrdP)->axis[3].spacing) )) { sprintf(err, "%s: need existant spacings on x,y,z axes", me); airMopError(mop); --- 214,219 ---- } if (!( AIR_EXISTS((*nrrdP)->axis[1].spacing) && ! AIR_EXISTS((*nrrdP)->axis[2].spacing) && ! AIR_EXISTS((*nrrdP)->axis[3].spacing) )) { sprintf(err, "%s: need existant spacings on x,y,z axes", me); airMopError(mop); *************** *** 268,311 **** hestOptAdd(&opt, "i", "nin", airTypeOther, 1, 1, &nten, NULL, ! "diffusion tensor data", ! NULL, NULL, &echoParseTenNrrdCB); hestOptAdd(&opt, "fr", "eye point", airTypeFloat, 3, 3, cam->from, ! "40 40 40", "camera eye point"); hestOptAdd(&opt, "at", "lookat", airTypeFloat, 3, 3, cam->at, "0 0 0", ! "camera look-at point"); hestOptAdd(&opt, "up", "up", airTypeFloat, 3, 3, cam->up, "0 0 1", ! "camera pseudo up vector"); hestOptAdd(&opt, "ur", "U range", echoPos_airType, 2, 2, ur, "-20 20", ! "range in U direction of image plane"); hestOptAdd(&opt, "vr", "V range", echoPos_airType, 2, 2, vr, "-20 20", ! "range in V direction of image plane"); hestOptAdd(&opt, "is", "image size", airTypeInt, 2, 2, is, "256 256", ! "image dimensions"); hestOptAdd(&opt, "ns", "# samples", airTypeInt, 1, 1, &(eparm->samples), "1", ! "# of samples per pixel (1 --> no jitter)"); hestOptAdd(&opt, "o", "output", airTypeString, 1, 1, &outS, "out.ppm", ! "PPM image output"); hestOptAdd(&opt, "ap", "aperture", airTypeFloat, 1, 1, &(eparm->aperture), ! "0.0", "camera aperture (0.0 --> no depth of field)"); hestOptAdd(&opt, "an", "aniso", airTypeEnum, 1, 1, &(gparm.aniso), "fa", ! "which anisotropy metric", NULL, &tenAniso); hestOptAdd(&opt, "th", "thresh", airTypeFloat, 1, 1, &(gparm.anthr), "0.8", ! "threshold on anisotropy"); hestOptAdd(&opt, "gs", "scale", airTypeFloat, 1, 1, &(gparm.gscale), "0.8", ! "over-all scaling on all glyphs"); hestOptAdd(&opt, "gh", "show", airTypeFloat, 1, 1, &(gparm.show), "1.0", ! "how much to \"show\" the data:\n " ! "0.0 --> all identity; 1.0 --> all data"); hestOptAdd(&opt, "lr", "light radius", airTypeFloat, 1, 1, ! &(gparm.lrad), "5", "\"radius\" of area light over volume"); hestOptAdd(&opt, "ld", "ref dist", airTypeFloat, 1, 1, ! &(gparm.ldref), "0.5", "\"reference distance\" for light, " ! "expressed as a fraction of Z dimension of volume"); hestOptAdd(&opt, "ll", "light level", airTypeFloat, 1, 1, ! &(gparm.llev), "1", "area light intensity"); hestOptAdd(&opt, "lp", "light position", airTypeFloat, 2, 2, ! &(gparm.lpos), "0.5 0.5", "area light position"); hestOptAdd(&opt, "sh", NULL, airTypeInt, 0, 0, ! &(eparm->shadow), NULL, "render shadows"); if (hestOptCheck(opt, &err)) { printf("%s\n", err); exit(1); } --- 268,311 ---- hestOptAdd(&opt, "i", "nin", airTypeOther, 1, 1, &nten, NULL, ! "diffusion tensor data", ! NULL, NULL, &echoParseTenNrrdCB); hestOptAdd(&opt, "fr", "eye point", airTypeFloat, 3, 3, cam->from, ! "40 40 40", "camera eye point"); hestOptAdd(&opt, "at", "lookat", airTypeFloat, 3, 3, cam->at, "0 0 0", ! "camera look-at point"); hestOptAdd(&opt, "up", "up", airTypeFloat, 3, 3, cam->up, "0 0 1", ! "camera pseudo up vector"); hestOptAdd(&opt, "ur", "U range", echoPos_airType, 2, 2, ur, "-20 20", ! "range in U direction of image plane"); hestOptAdd(&opt, "vr", "V range", echoPos_airType, 2, 2, vr, "-20 20", ! "range in V direction of image plane"); hestOptAdd(&opt, "is", "image size", airTypeInt, 2, 2, is, "256 256", ! "image dimensions"); hestOptAdd(&opt, "ns", "# samples", airTypeInt, 1, 1, &(eparm->samples), "1", ! "# of samples per pixel (1 --> no jitter)"); hestOptAdd(&opt, "o", "output", airTypeString, 1, 1, &outS, "out.ppm", ! "PPM image output"); hestOptAdd(&opt, "ap", "aperture", airTypeFloat, 1, 1, &(eparm->aperture), ! "0.0", "camera aperture (0.0 --> no depth of field)"); hestOptAdd(&opt, "an", "aniso", airTypeEnum, 1, 1, &(gparm.aniso), "fa", ! "which anisotropy metric", NULL, &tenAniso); hestOptAdd(&opt, "th", "thresh", airTypeFloat, 1, 1, &(gparm.anthr), "0.8", ! "threshold on anisotropy"); hestOptAdd(&opt, "gs", "scale", airTypeFloat, 1, 1, &(gparm.gscale), "0.8", ! "over-all scaling on all glyphs"); hestOptAdd(&opt, "gh", "show", airTypeFloat, 1, 1, &(gparm.show), "1.0", ! "how much to \"show\" the data:\n " ! "0.0 --> all identity; 1.0 --> all data"); hestOptAdd(&opt, "lr", "light radius", airTypeFloat, 1, 1, ! &(gparm.lrad), "5", "\"radius\" of area light over volume"); hestOptAdd(&opt, "ld", "ref dist", airTypeFloat, 1, 1, ! &(gparm.ldref), "0.5", "\"reference distance\" for light, " ! "expressed as a fraction of Z dimension of volume"); hestOptAdd(&opt, "ll", "light level", airTypeFloat, 1, 1, ! &(gparm.llev), "1", "area light intensity"); hestOptAdd(&opt, "lp", "light position", airTypeFloat, 2, 2, ! &(gparm.lpos), "0.5 0.5", "area light position"); hestOptAdd(&opt, "sh", NULL, airTypeInt, 0, 0, ! &(eparm->shadow), NULL, "render shadows"); if (hestOptCheck(opt, &err)) { printf("%s\n", err); exit(1); } *************** *** 340,344 **** /* do the glyph thing */ makeGlyphScene(cam, eparm, nten, &gparm, ! &scene, &lightArr); /* render */ --- 340,344 ---- /* do the glyph thing */ makeGlyphScene(cam, eparm, nten, &gparm, ! &scene, &lightArr); /* render */ *************** *** 366,370 **** } printf("%s: render time = %g seconds (%g fps)\n", ! me, state->time, 1.0/state->time); if (!E) E |= nrrdSave("raw.nrrd", nraw, NULL); if (!E) E |= nrrdSave("out.ppm", nppm, NULL); --- 366,370 ---- } printf("%s: render time = %g seconds (%g fps)\n", ! me, state->time, 1.0/state->time); if (!E) E |= nrrdSave("raw.nrrd", nraw, NULL); if (!E) E |= nrrdSave("out.ppm", nppm, NULL); Index: trend.c =================================================================== RCS file: /cvsroot/teem/teem/src/echo/test/trend.c,v retrieving revision 1.62 retrieving revision 1.63 diff -C2 -d -r1.62 -r1.63 *** trend.c 26 May 2004 02:11:00 -0000 1.62 --- trend.c 6 Oct 2004 09:40:27 -0000 1.63 *************** *** 24,28 **** void _dyeHSVtoRGB(float *R, float *G, float *B, ! float H, float S, float V) { float min, fract, vsf, mid1, mid2; int sextant; --- 24,28 ---- void _dyeHSVtoRGB(float *R, float *G, float *B, ! float H, float S, float V) { float min, fract, vsf, mid1, mid2; int sextant; *************** *** 56,60 **** void makeSceneAntialias(limnCamera *cam, echoRTParm *parm, ! echoObject **sceneP, airArray **lightArrP) { echoObject *scene, *rect; Nrrd *ntext; --- 56,60 ---- void makeSceneAntialias(limnCamera *cam, echoRTParm *parm, ! echoObject **sceneP, airArray **lightArrP) { echoObject *scene, *rect; Nrrd *ntext; *************** *** 85,93 **** rect = echoObjectNew(echoRectangle); echoRectangleSet(rect, ! -3, -3, 0, ! 6, 0, 0, ! 0, 6, 0); echoMatterPhongSet(rect, 1, 1, 1, 1.0, ! 1.0, 0.0, 0.0, 1); echoMatterTextureSet(rect, ntext); echoObjectAdd(scene, rect); --- 85,93 ---- rect = echoObjectNew(echoRectangle); echoRectangleSet(rect, ! -3, -3, 0, ! 6, 0, 0, ! 0, 6, 0); echoMatterPhongSet(rect, 1, 1, 1, 1.0, ! 1.0, 0.0, 0.0, 1); echoMatterTextureSet(rect, ntext); echoObjectAdd(scene, rect); *************** *** 130,137 **** sphere = echoObjectNew(echoSphere); echoSphereSet(sphere, ! 4*airDrand48()-2, 4*airDrand48()-2, 4*airDrand48()-2, 0.005); _dyeHSVtoRGB(&r, &g, &b, AIR_AFFINE(0, i, N, 0.0, 1.0), 1.0, 1.0); echoMatterPhongSet(sphere, r, g, b, 1.0, ! 1.0, 0.0, 0.0, 50); LIST(scene)->obj[i] = sphere; } --- 130,137 ---- sphere = echoObjectNew(echoSphere); echoSphereSet(sphere, ! 4*airDrand48()-2, 4*airDrand48()-2, 4*airDrand48()-2, 0.005); _dyeHSVtoRGB(&r, &g, &b, AIR_AFFINE(0, i, N, 0.0, 1.0), 1.0, 1.0); echoMatterPhongSet(sphere, r, g, b, 1.0, ! 1.0, 0.0, 0.0, 50); LIST(scene)->obj[i] = sphere; } *************** *** 175,180 **** printf("cube = %p\n", cube); echoMatterGlassSet(cube, ! 1.0, 1.0, 1.0, ! 1.5, 0.0, 0.0); echoObjectAdd(scene, cube); --- 175,180 ---- printf("cube = %p\n", cube); echoMatterGlassSet(cube, ! 1.0, 1.0, 1.0, ! 1.5, 0.0, 0.0); echoObjectAdd(scene, cube); *************** *** 184,192 **** printf("rect = %p\n", rect); echoRectangleSet(rect, ! -1, -1, -0.51, ! 2, 0, 0, ! 0, 2, 0); echoMatterPhongSet(rect, 1.0, 1.0, 1.0, 1.0, ! 0.1, 0.6, 0.3, 40); echoMatterTextureSet(rect, ntext); echoObjectAdd(scene, rect); --- 184,192 ---- printf("rect = %p\n", rect); echoRectangleSet(rect, ! -1, -1, -0.51, ! 2, 0, 0, ! 0, 2, 0); echoMatterPhongSet(rect, 1.0, 1.0, 1.0, 1.0, ! 0.1, 0.6, 0.3, 40); echoMatterTextureSet(rect, ntext); echoObjectAdd(scene, rect); *************** *** 236,241 **** */ echoMatterGlassSet(cube, ! 1.0, 1.0, 1.0, ! 1.33333, 0.0, 0.0); echoObjectAdd(scene, cube); --- 236,241 ---- */ echoMatterGlassSet(cube, ! 1.0, 1.0, 1.0, ! 1.33333, 0.0, 0.0); echoObjectAdd(scene, cube); *************** *** 245,253 **** printf("rect = %p\n", rect); echoRectangleSet(rect, ! -1, -1, -0.51, ! 2, 0, 0, ! 0, 2, 0); echoMatterPhongSet(rect, 1.0, 1.0, 1.0, 1.0, ! 0.0, 1.0, 0.0, 40); echoMatterTextureSet(rect, ntext); echoObjectAdd(scene, rect); --- 245,253 ---- printf("rect = %p\n", rect); echoRectangleSet(rect, ! -1, -1, -0.51, ! 2, 0, 0, ! 0, 2, 0); echoMatterPhongSet(rect, 1.0, 1.0, 1.0, 1.0, ! 0.0, 1.0, 0.0, 40); echoMatterTextureSet(rect, ntext); echoObjectAdd(scene, rect); *************** *** 303,309 **** trim = echoRoughSphere(8, 4, matx); echoMatterGlassSet(trim, 0.8, 0.8, 0.8, ! 1.3, 0.0, 0.0); echoMatterPhongSet(trim, 1, 1, 1, 1.0, ! 0.1, 0.5, 0.9, 50); echoObjectAdd(scene, trim); */ --- 303,309 ---- trim = echoRoughSphere(8, 4, matx); echoMatterGlassSet(trim, 0.8, 0.8, 0.8, ! 1.3, 0.0, 0.0); echoMatterPhongSet(trim, 1, 1, 1, 1.0, ! 0.1, 0.5, 0.9, 50); echoObjectAdd(scene, trim); */ *************** *** 320,326 **** rect = echoObjectNew(scene, echoTypeRectangle); echoRectangleSet(rect, ! -3.5, -3.5, -3.5, ! 7, 0, 0, ! 0, 7, 0); echoColorSet(trim, 1.0, 1.0, 1.0, 1.0); echoMatterPhongSet(scene, rect, 0.1, 0.5, 0.9, 50); --- 320,326 ---- rect = echoObjectNew(scene, echoTypeRectangle); echoRectangleSet(rect, ! -3.5, -3.5, -3.5, ! 7, 0, 0, ! 0, 7, 0); echoColorSet(trim, 1.0, 1.0, 1.0, 1.0); echoMatterPhongSet(scene, rect, 0.1, 0.5, 0.9, 50); *************** *** 328,334 **** rect = echoObjectNew(scene, echoTypeRectangle); echoRectangleSet(rect, ! -3.5, -3.5, -3.5, ! 0, 7, 0, ! 0, 0, 7); echoColorSet(rect, 1.0, 1.0, 1.0, 1.0); echoMatterPhongSet(scene, rect, 0.1, 0.5, 0.9, 50); --- 328,334 ---- rect = echoObjectNew(scene, echoTypeRectangle); echoRectangleSet(rect, ! -3.5, -3.5, -3.5, ! 0, 7, 0, ! 0, 0, 7); echoColorSet(rect, 1.0, 1.0, 1.0, 1.0); echoMatterPhongSet(scene, rect, 0.1, 0.5, 0.9, 50); *************** *** 337,343 **** rect = echoObjectNew(scene, echoTypeRectangle); echoRectangleSet(rect, ! -3.5, -3.5, -3.5, ! 0, 0, 7, ! 7, 0, 0); */ rect = echoObjectNew(scene, echoTypeSphere); --- 337,343 ---- rect = echoObjectNew(scene, echoTypeRectangle); echoRectangleSet(rect, ! -3.5, -3.5, -3.5, ! 0, 0, 7, ! 7, 0, 0); */ rect = echoObjectNew(scene, echoTypeSphere); *************** *** 415,421 **** rect = echoObjectNew(scene, echoTypeRectangle); echoRectangleSet(rect, ! -1, 1, 0, ! 0, -2, 0, ! 2, 0, 0); echoColorSet(rect, 1.0, 1.0, 1.0, 1.0); echoMatterPhongSet(scene, rect, 1.0, 0.0, 0.0, 40); --- 415,421 ---- rect = echoObjectNew(scene, echoTypeRectangle); echoRectangleSet(rect, ! -1, 1, 0, ! 0, -2, 0, ! 2, 0, 0); echoColorSet(rect, 1.0, 1.0, 1.0, 1.0); echoMatterPhongSet(scene, rect, 1.0, 0.0, 0.0, 40); *************** *** 426,432 **** rect = echoObjectNew(scene, echoTypeRectangle); echoRectangleSet(rect, ! -0.25, -0.25, 10, ! 0.5, 0, 0, ! 0, 0.5, 0); echoColorSet(rect, 1, 1, 1, 1); echoMatterLightSet(scene, rect, 1, 0); --- 426,432 ---- rect = echoObjectNew(scene, echoTypeRectangle); echoRectangleSet(rect, ! -0.25, -0.25, 10, ! 0.5, 0, 0, ! 0, 0.5, 0); echoColorSet(rect, 1, 1, 1, 1); echoMatterLightSet(scene, rect, 1, 0); *************** *** 478,484 **** rect = echoObjectNew(scene, echoTypeRectangle); echoRectangleSet(rect, ! 0.5, 0.5, 0.5, ! 0, -1, 0, ! 0, 0, -1); echoColorSet(rect, 1.0, 1.0, 1.0, 1.0); echoMatterMetalSet(scene, rect, 0.7, 0.0, 0.0, 0.2); --- 478,484 ---- rect = echoObjectNew(scene, echoTypeRectangle); echoRectangleSet(rect, ! 0.5, 0.5, 0.5, ! 0, -1, 0, ! 0, 0, -1); echoColorSet(rect, 1.0, 1.0, 1.0, 1.0); echoMatterMetalSet(scene, rect, 0.7, 0.0, 0.0, 0.2); *************** *** 487,493 **** rect = echoObjectNew(scene, echoTypeRectangle); echoRectangleSet(rect, ! -1.5, -1.5, -1, ! 3, 0, 0, ! 0, 3, 0); echoColorSet(rect, 1.0, 1.0, 1.0, 1.0); echoMatterPhongSet(scene, rect, 0.1, 0.6, 0.3, 40); --- 487,493 ---- rect = echoObjectNew(scene, echoTypeRectangle); echoRectangleSet(rect, ! -1.5, -1.5, -1, ! 3, 0, 0, ! 0, 3, 0); echoColorSet(rect, 1.0, 1.0, 1.0, 1.0); echoMatterPhongSet(scene, rect, 0.1, 0.6, 0.3, 40); *************** *** 496,502 **** rect = echoObjectNew(scene, echoTypeRectangle); echoRectangleSet(rect, ! 0.5-0.2, -0.2, 40, ! 0.4, 0, 0, ! 0, 0.4, 0); echoColorSet(rect, 1, 1, 1, 1); echoMatterLightSet(scene, rect, 1, 0); --- 496,502 ---- rect = echoObjectNew(scene, echoTypeRectangle); echoRectangleSet(rect, ! 0.5-0.2, -0.2, 40, ! 0.4, 0, 0, ! 0, 0.4, 0); echoColorSet(rect, 1, 1, 1, 1); echoMatterLightSet(scene, rect, 1, 0); *************** *** 531,537 **** rect = echoObjectNew(scene, echoTypeRectangle); echoRectangleSet(rect, ! -2, -2, 0, ! 4, 0, 0, ! 0, 4, 0); echoColorSet(rect, 1, 1, 1, 1); echoMatterPhongSet(scene, rect, 0.1, 1, 0.9, 50); --- 531,537 ---- rect = echoObjectNew(scene, echoTypeRectangle); echoRectangleSet(rect, ! -2, -2, 0, ! 4, 0, 0, ! 0, 4, 0); echoColorSet(rect, 1, 1, 1, 1); echoMatterPhongSet(scene, rect, 0.1, 1, 0.9, 50); *************** *** 552,556 **** trim = echoRoughSphere(80, 40, matx); echoMatterPhongSet(trim, 1, 1, 1, 1.0, ! 0.1, 0.5, 0.9, 50); echoMatterTextureSet(trim, ntext); echoObjectAdd(scene, trim); --- 552,556 ---- trim = echoRoughSphere(80, 40, matx); echoMatterPhongSet(trim, 1, 1, 1, 1.0, ! 0.1, 0.5, 0.9, 50); echoMatterTextureSet(trim, ntext); echoObjectAdd(scene, trim); *************** *** 559,565 **** rect = echoObjectNew(scene, echoTypeRectangle); echoRectangleSet(rect, ! 0, 0, 60, ! 0, 2, 0, ! 0, 0, 2); echoColorSet(rect, 1, 1, 1, 1); echoMatterLightSet(scene, rect, 1, 1); --- 559,565 ---- rect = echoObjectNew(scene, echoTypeRectangle); echoRectangleSet(rect, ! 0, 0, 60, ! 0, 2, 0, ! 0, 0, 2); echoColorSet(rect, 1, 1, 1, 1); echoMatterLightSet(scene, rect, 1, 1); *************** *** 596,602 **** rect = echoObjectNew(scene, echoTypeRectangle); echoRectangleSet(rect, ! -0.5, 1.5, -3, ! 2, 0, 0, ! 0, -2, 0); echoColorSet(rect, 1, 0.5, 0.5, 1); echoMatterPhongSet(scene, rect, 1.0, 0.0, 0.0, 1); --- 596,602 ---- rect = echoObjectNew(scene, echoTypeRectangle); echoRectangleSet(rect, ! -0.5, 1.5, -3, ! 2, 0, 0, ! 0, -2, 0); echoColorSet(rect, 1, 0.5, 0.5, 1); echoMatterPhongSet(scene, rect, 1.0, 0.0, 0.0, 1); *************** *** 606,612 **** rect = echoObjectNew(scene, echoTypeRectangle); echoRectangleSet(rect, ! -1, 1, 0, ! 2, 0, 0, ! 0, -2, 0); echoColorSet(rect, 0.5, 1, 0.5, 1); echoMatterPhongSet(scene, rect, 1.0, 0.0, 0.0, 1); --- 606,612 ---- rect = echoObjectNew(scene, echoTypeRectangle); echoRectangleSet(rect, ! -1, 1, 0, ! 2, 0, 0, ! 0, -2, 0); echoColorSet(rect, 0.5, 1, 0.5, 1); echoMatterPhongSet(scene, rect, 1.0, 0.0, 0.0, 1); *************** *** 616,622 **** rect = echoObjectNew(scene, echoTypeRectangle); echoRectangleSet(rect, ! -1.5, 0.5, 3, ! 2, 0, 0, ! 0, -2, 0); echoColorSet(rect, 0.5, 0.5, 1, 1); echoMatterPhongSet(scene, rect, 1.0, 0.0, 0.0, 1); --- 616,622 ---- rect = echoObjectNew(scene, echoTypeRectangle); echoRectangleSet(rect, ! -1.5, 0.5, 3, ! 2, 0, 0, ! 0, -2, 0); echoColorSet(rect, 0.5, 0.5, 1, 1); echoMatterPhongSet(scene, rect, 1.0, 0.0, 0.0, 1); *************** *** 668,674 **** tri = echoObjectNew(scene, echoTypeTriangle); echoTriangleSet(tri, ! 0, -1, -1, ! 0, 1, -1, ! 0, 0, 1); echoColorSet(tri, 1, 1, 0, 1.0); echoMatterPhongSet(scene, tri, 0.1, 0.6, 0.3, 40); --- 668,674 ---- tri = echoObjectNew(scene, echoTypeTriangle); echoTriangleSet(tri, ! 0, -1, -1, ! 0, 1, -1, ! 0, 0, 1); echoColorSet(tri, 1, 1, 0, 1.0); echoMatterPhongSet(scene, tri, 0.1, 0.6, 0.3, 40); *************** *** 677,683 **** rect = echoObjectNew(scene, echoTypeRectangle); echoRectangleSet(rect, ! 1.7, 1.7, -2, ! -3.4, 0, 0, ! 0, -3.4, 0); echoColorSet(rect, 1.0, 0.8, 1.0, 1.0); echoMatterPhongSet(scene, rect, 0.1, 0.3, 0.7, 3000); --- 677,683 ---- rect = echoObjectNew(scene, echoTypeRectangle); echoRectangleSet(rect, ! 1.7, 1.7, -2, ! -3.4, 0, 0, ! 0, -3.4, 0); echoColorSet(rect, 1.0, 0.8, 1.0, 1.0); echoMatterPhongSet(scene, rect, 0.1, 0.3, 0.7, 3000); *************** *** 686,692 **** rect = echoObjectNew(scene, echoTypeRectangle); echoRectangleSet(rect, ! 1.0, 0.2, 4, ! 0.2, 0, 0, ! 0, 0.2, 0); echoColorSet(rect, 1, 1, 1, 1); echoMatterLightSet(scene, rect, 1, 0); --- 686,692 ---- rect = echoObjectNew(scene, echoTypeRectangle); echoRectangleSet(rect, ! 1.0, 0.2, 4, ! 0.2, 0, 0, ! 0, 0.2, 0); echoColorSet(rect, 1, 1, 1, 1); echoMatterLightSet(scene, rect, 1, 0); *************** *** 722,728 **** rect = echoObjectNew(scene, echoTypeRectangle); echoRectangleSet(rect, ! -5, -5, -1.4, ! 10, 0, 0, ! 0, 10, 0); echoColorSet(rect, 1, 1, 1, 1.0); echoMatterPhongSet(scene, rect, 0.1, 0.5, 0.6, 50); --- 722,728 ---- rect = echoObjectNew(scene, echoTypeRectangle); echoRectangleSet(rect, ! -5, -5, -1.4, ! 10, 0, 0, ! 0, 10, 0); echoColorSet(rect, 1, 1, 1, 1.0); echoMatterPhongSet(scene, rect, 0.1, 0.5, 0.6, 50); *************** *** 745,751 **** tri = echoObjectNew(scene, echoTypeTriangle); echoTriangleSet(tri, ! 0.1, 0.1, 2, ! 2, 2, 2, ! 0, 2, 2); echoColorSet(tri, 1, 0.4, 0.4, 1.0); echoMatterPhongSet(scene, tri, 0.4, 0.6, 0.0, 90); --- 745,751 ---- tri = echoObjectNew(scene, echoTypeTriangle); echoTriangleSet(tri, ! 0.1, 0.1, 2, ! 2, 2, 2, ! 0, 2, 2); echoColorSet(tri, 1, 0.4, 0.4, 1.0); echoMatterPhongSet(scene, tri, 0.4, 0.6, 0.0, 90); *************** *** 754,760 **** tri = echoObjectNew(scene, echoTypeTriangle); echoTriangleSet(tri, ! -0.1, 0.1, 2, ! -2, 2, 2, ! -2, 0, 2); echoColorSet(tri, 0.4, 1.0, 0.4, 1.0); echoMatterPhongSet(scene, tri, 0.4, 0.6, 0.0, 90); --- 754,760 ---- tri = echoObjectNew(scene, echoTypeTriangle); echoTriangleSet(tri, ! -0.1, 0.1, 2, ! -2, 2, 2, ! -2, 0, 2); echoColorSet(tri, 0.4, 1.0, 0.4, 1.0); echoMatterPhongSet(scene, tri, 0.4, 0.6, 0.0, 90); *************** *** 763,769 **** tri = echoObjectNew(scene, echoTypeTriangle); echoTriangleSet(tri, ! -0.1, -0.1, 2, ! -2, -2, 2, ! 0, -2, 2); echoColorSet(tri, 0.4, 0.4, 1.0, 1.0); echoMatterPhongSet(scene, tri, 0.4, 0.6, 0.0, 90); --- 763,769 ---- tri = echoObjectNew(scene, echoTypeTriangle); echoTriangleSet(tri, ! -0.1, -0.1, 2, ! -2, -2, 2, ! 0, -2, 2); echoColorSet(tri, 0.4, 0.4, 1.0, 1.0); echoMatterPhongSet(scene, tri, 0.4, 0.6, 0.0, 90); *************** *** 772,778 **** rect = echoObjectNew(scene, echoTypeRectangle); echoRectangleSet(rect, ! -0.5, -0.5, 10, ! 1.0, 0.0, 0, ! 0.0, 1.0, 0); echoColorSet(rect, 1, 1, 1, 1); echoMatterLightSet(scene, rect, 1, 0); --- 772,778 ---- rect = echoObjectNew(scene, echoTypeRectangle); echoRectangleSet(rect, ! -0.5, -0.5, 10, ! 1.0, 0.0, 0, ! 0.0, 1.0, 0); echoColorSet(rect, 1, 1, 1, 1); echoMatterLightSet(scene, rect, 1, 0); *************** *** 822,828 **** rect = echoObjectNew(scene, echoTypeRectangle); echoRectangleSet(rect, ! w/2, AIR_AFFINE(0, i, N-1, -1-w/2, 1-w/2), 1.5, ! 0, w, 0, ! w, 0, 0); _dyeHSVtoRGB(&r, &g, &b, AIR_AFFINE(0, i, N, 0.0, 1.0), 1.0, 1.0); echoColorSet(rect, r, g, b, 1); --- 822,828 ---- rect = echoObjectNew(scene, echoTypeRectangle); echoRectangleSet(rect, ! w/2, AIR_AFFINE(0, i, N-1, -1-w/2, 1-w/2), 1.5, ! 0, w, 0, ! w, 0, 0); _dyeHSVtoRGB(&r, &g, &b, AIR_AFFINE(0, i, N, 0.0, 1.0), 1.0, 1.0); echoColorSet(rect, r, g, b, 1); *************** *** 898,902 **** } printf("render time = %g seconds (%g fps)\n", ! state->time, 1.0/state->time); if (!E) E |= nrrdSave("raw.nrrd", nraw, NULL); if (E) { --- 898,902 ---- } printf("render time = %g seconds (%g fps)\n", ! state->time, 1.0/state->time); if (!E) E |= nrrdSave("raw.nrrd", nraw, NULL); if (E) { |