26 |
|
|
27 |
|
char ourTempDir[TEMPLEN] = ""; /* our temporary directory */ |
28 |
|
|
29 |
– |
const FVECT Xaxis = {1., 0., 0.}; |
30 |
– |
const FVECT Yaxis = {0., 1., 0.}; |
31 |
– |
const FVECT Zaxis = {0., 0., 1.}; |
32 |
– |
|
29 |
|
const char frpref[] = "frefl"; |
30 |
|
const char ftpref[] = "ftrans"; |
31 |
|
const char brpref[] = "brefl"; |
46 |
|
char *progname; |
47 |
|
|
48 |
|
/* Get Fibonacci sphere vector (0 to NINCIDENT-1) */ |
49 |
< |
static void |
49 |
> |
static RREAL * |
50 |
|
get_ivector(FVECT iv, int i) |
51 |
|
{ |
52 |
|
const double phistep = PI*(3. - 2.236067978); |
56 |
|
r = sqrt(1. - iv[2]*iv[2]); |
57 |
|
iv[0] = r * cos((i+1.)*phistep); |
58 |
|
iv[1] = r * sin((i+1.)*phistep); |
59 |
+ |
|
60 |
+ |
return(iv); |
61 |
|
} |
62 |
|
|
63 |
+ |
/* Convert incident vector into sphere position */ |
64 |
+ |
static RREAL * |
65 |
+ |
cvt_sposition(FVECT sp, const FVECT iv, int inc_side) |
66 |
+ |
{ |
67 |
+ |
sp[0] = -iv[0]*sph_rad + inc_side*sph_xoffset; |
68 |
+ |
sp[1] = -iv[1]*sph_rad; |
69 |
+ |
sp[2] = iv[2]*sph_rad; |
70 |
+ |
|
71 |
+ |
return(sp); |
72 |
+ |
} |
73 |
+ |
|
74 |
|
/* Get temporary file name */ |
75 |
|
static char * |
76 |
|
tfile_name(const char *prefix, const char *suffix, int i) |
257 |
|
RBFNODE *rbf; |
258 |
|
get_ivector(ivec, i); |
259 |
|
if (input_orient < 0) { |
260 |
< |
ivec[0] = -ivec[0]; ivec[1] = -ivec[1]; ivec[2] = -ivec[2]; |
260 |
> |
ivec[0] = -ivec[0]; ivec[2] = -ivec[2]; |
261 |
|
} |
262 |
|
rbf = advect_rbf(ivec, 15000); |
263 |
|
if (!plotRBF(tfile_name(pref, dsuffix, i), rbf)) |
276 |
|
FVECT origin, refl; |
277 |
|
int i; |
278 |
|
|
279 |
< |
for (i = 3; i--; ) origin[i] = ivec[i]*sph_rad; |
271 |
< |
origin[0] -= inc_side*sph_xoffset; |
279 |
> |
cvt_sposition(origin, ivec, inc_side); |
280 |
|
|
281 |
< |
refl[0] = 2.*ivec[2]*ivec[0]; |
282 |
< |
refl[1] = 2.*ivec[2]*ivec[1]; |
281 |
> |
refl[0] = -2.*ivec[2]*ivec[0]; |
282 |
> |
refl[1] = -2.*ivec[2]*ivec[1]; |
283 |
|
refl[2] = 2.*ivec[2]*ivec[2] - 1.; |
284 |
|
|
285 |
|
printf("\n# Mirror arrow\n"); |
315 |
|
FVECT origin; |
316 |
|
int i; |
317 |
|
|
318 |
< |
for (i = 3; i--; ) origin[i] = ivec[i]*sph_rad; |
311 |
< |
origin[0] -= inc_side*sph_xoffset; |
318 |
> |
cvt_sposition(origin, ivec, inc_side); |
319 |
|
|
320 |
|
printf("\n# Transmission arrow\n"); |
321 |
|
printf("\narrow_mat cylinder trans_dir\n0\n0\n7"); |
371 |
|
put_BSDFs(void) |
372 |
|
{ |
373 |
|
const double scalef = bsdf_rad/(log10(overall_max) - min_log10); |
374 |
< |
FVECT ivec; |
374 |
> |
FVECT ivec, sorg, upv; |
375 |
|
RREAL vMtx[3][3]; |
376 |
|
char *fname; |
377 |
|
char cmdbuf[256]; |
383 |
|
NINCIDENT); |
384 |
|
|
385 |
|
printf("\nvoid glow arrow_glow\n0\n0\n4 1 0 1 0\n"); |
386 |
< |
printf("\nvoid mixfunc arrow_mat\n4 arrow_glow void .5 .\n0\n0\n"); |
386 |
> |
printf("\nvoid mixfunc arrow_mat\n4 arrow_glow void 0.25 .\n0\n0\n"); |
387 |
|
|
388 |
< |
if (front_comp & SDsampR) |
388 |
> |
if (front_comp & SDsampR) /* front reflection */ |
389 |
|
for (i = 0; i < NINCIDENT; i++) { |
390 |
|
get_ivector(ivec, i); |
391 |
|
put_mirror_arrow(ivec, 1); |
392 |
+ |
cvt_sposition(sorg, ivec, 1); |
393 |
+ |
ivec[0] = -ivec[0]; ivec[1] = -ivec[1]; /* normal */ |
394 |
+ |
upv[0] = ivec[0]*ivec[1]*(ivec[2] - 1.); |
395 |
+ |
upv[1] = ivec[0]*ivec[0] + ivec[1]*ivec[1]*ivec[2]; |
396 |
+ |
upv[2] = -ivec[1]*(ivec[0]*ivec[0] + ivec[1]*ivec[1]); |
397 |
|
sprintf(xfargs, "-s %f -t %f %f %f", bsdf_rad, |
398 |
< |
ivec[0]*sph_rad - sph_xoffset, |
387 |
< |
ivec[1]*sph_rad, ivec[2]*sph_rad); |
398 |
> |
sorg[0], sorg[1], sorg[2]); |
399 |
|
nxfa = 6; |
400 |
|
printf("\nvoid colorfunc scale_pat\n"); |
401 |
|
printf("%d bsdf_red bsdf_grn bsdf_blu bsdf2rad.cal\n\t%s\n0\n0\n", |
402 |
|
4+nxfa, xfargs); |
403 |
|
printf("\nscale_pat glow scale_mat\n0\n0\n4 1 1 1 0\n"); |
404 |
< |
SDcompXform(vMtx, ivec, Yaxis); |
404 |
> |
if (SDcompXform(vMtx, ivec, upv) != SDEnone) |
405 |
> |
continue; |
406 |
|
nxfa = addrot(xfargs, vMtx[0], vMtx[1], vMtx[2]); |
407 |
|
sprintf(xfargs+strlen(xfargs), " -s %f -t %f %f %f", |
408 |
< |
scalef, ivec[0]*sph_rad - sph_xoffset, |
397 |
< |
ivec[1]*sph_rad, ivec[2]*sph_rad); |
408 |
> |
scalef, sorg[0], sorg[1], sorg[2]); |
409 |
|
nxfa += 6; |
410 |
|
fname = tfile_name(frpref, dsuffix, i); |
411 |
< |
sprintf(cmdbuf, "gensurf scale_mat %s%d %s %s %s %d %d | xform -mx -my %s", |
412 |
< |
frpref, i+1, fname, fname, fname, SAMPRES-1, SAMPRES-1, |
411 |
> |
sprintf(cmdbuf, "gensurf scale_mat %s%d %s %s %s %d %d | xform %s", |
412 |
> |
frpref, i, fname, fname, fname, SAMPRES-1, SAMPRES-1, |
413 |
|
xfargs); |
414 |
|
if (!run_cmd(cmdbuf)) |
415 |
|
return(0); |
416 |
|
} |
417 |
< |
if (front_comp & SDsampT) |
417 |
> |
if (front_comp & SDsampT) /* front transmission */ |
418 |
|
for (i = 0; i < NINCIDENT; i++) { |
419 |
|
get_ivector(ivec, i); |
420 |
|
put_trans_arrow(ivec, 1); |
421 |
+ |
cvt_sposition(sorg, ivec, 1); |
422 |
+ |
ivec[0] = -ivec[0]; ivec[1] = -ivec[1]; /* normal */ |
423 |
+ |
upv[0] = ivec[0]*ivec[1]*(ivec[2] - 1.); |
424 |
+ |
upv[1] = ivec[0]*ivec[0] + ivec[1]*ivec[1]*ivec[2]; |
425 |
+ |
upv[2] = -ivec[1]*(ivec[0]*ivec[0] + ivec[1]*ivec[1]); |
426 |
|
sprintf(xfargs, "-s %f -t %f %f %f", bsdf_rad, |
427 |
< |
ivec[0]*sph_rad - sph_xoffset, |
412 |
< |
ivec[1]*sph_rad, ivec[2]*sph_rad); |
427 |
> |
sorg[0], sorg[1], sorg[2]); |
428 |
|
nxfa = 6; |
429 |
|
printf("\nvoid colorfunc scale_pat\n"); |
430 |
|
printf("%d bsdf_red bsdf_grn bsdf_blu bsdf2rad.cal\n\t%s\n0\n0\n", |
431 |
|
4+nxfa, xfargs); |
432 |
|
printf("\nscale_pat glow scale_mat\n0\n0\n4 1 1 1 0\n"); |
433 |
< |
SDcompXform(vMtx, ivec, Yaxis); |
433 |
> |
if (SDcompXform(vMtx, ivec, upv) != SDEnone) |
434 |
> |
continue; |
435 |
|
nxfa = addrot(xfargs, vMtx[0], vMtx[1], vMtx[2]); |
436 |
|
sprintf(xfargs+strlen(xfargs), " -s %f -t %f %f %f", |
437 |
< |
scalef, ivec[0]*sph_rad - sph_xoffset, |
422 |
< |
ivec[1]*sph_rad, ivec[2]*sph_rad); |
437 |
> |
scalef, sorg[0], sorg[1], sorg[2]); |
438 |
|
nxfa += 6; |
439 |
|
fname = tfile_name(ftpref, dsuffix, i); |
440 |
< |
sprintf(cmdbuf, "gensurf scale_mat %s%d %s %s %s %d %d | xform -I -mx -my %s", |
441 |
< |
ftpref, i+1, fname, fname, fname, SAMPRES-1, SAMPRES-1, |
440 |
> |
sprintf(cmdbuf, "gensurf scale_mat %s%d %s %s %s %d %d | xform -I %s", |
441 |
> |
ftpref, i, fname, fname, fname, SAMPRES-1, SAMPRES-1, |
442 |
|
xfargs); |
443 |
|
if (!run_cmd(cmdbuf)) |
444 |
|
return(0); |
445 |
|
} |
446 |
< |
if (back_comp & SDsampR) |
446 |
> |
if (back_comp & SDsampR) /* rear reflection */ |
447 |
|
for (i = 0; i < NINCIDENT; i++) { |
448 |
|
get_ivector(ivec, i); |
449 |
|
put_mirror_arrow(ivec, -1); |
450 |
< |
fname = tfile_name(brpref, dsuffix, i); |
450 |
> |
cvt_sposition(sorg, ivec, -1); |
451 |
> |
ivec[0] = -ivec[0]; ivec[1] = -ivec[1]; /* normal */ |
452 |
> |
upv[0] = ivec[0]*ivec[1]*(ivec[2] - 1.); |
453 |
> |
upv[1] = ivec[0]*ivec[0] + ivec[1]*ivec[1]*ivec[2]; |
454 |
> |
upv[2] = -ivec[1]*(ivec[0]*ivec[0] + ivec[1]*ivec[1]); |
455 |
|
sprintf(xfargs, "-s %f -t %f %f %f", bsdf_rad, |
456 |
< |
ivec[0]*sph_rad + sph_xoffset, |
438 |
< |
ivec[1]*sph_rad, ivec[2]*sph_rad); |
456 |
> |
sorg[0], sorg[1], sorg[2]); |
457 |
|
nxfa = 6; |
458 |
|
printf("\nvoid colorfunc scale_pat\n"); |
459 |
|
printf("%d bsdf_red bsdf_grn bsdf_blu bsdf2rad.cal\n\t%s\n0\n0\n", |
460 |
|
4+nxfa, xfargs); |
461 |
|
printf("\nscale_pat glow scale_mat\n0\n0\n4 1 1 1 0\n"); |
462 |
< |
SDcompXform(vMtx, ivec, Yaxis); |
462 |
> |
if (SDcompXform(vMtx, ivec, upv) != SDEnone) |
463 |
> |
continue; |
464 |
|
nxfa = addrot(xfargs, vMtx[0], vMtx[1], vMtx[2]); |
465 |
|
sprintf(xfargs+strlen(xfargs), " -s %f -t %f %f %f", |
466 |
< |
scalef, ivec[0]*sph_rad + sph_xoffset, |
448 |
< |
ivec[1]*sph_rad, ivec[2]*sph_rad); |
466 |
> |
scalef, sorg[0], sorg[1], sorg[2]); |
467 |
|
nxfa += 6; |
468 |
|
fname = tfile_name(brpref, dsuffix, i); |
469 |
< |
sprintf(cmdbuf, "gensurf scale_mat %s%d %s %s %s %d %d | xform -I -ry 180 -mx -my %s", |
470 |
< |
brpref, i+1, fname, fname, fname, SAMPRES-1, SAMPRES-1, |
469 |
> |
sprintf(cmdbuf, "gensurf scale_mat %s%d %s %s %s %d %d | xform -I -ry 180 %s", |
470 |
> |
brpref, i, fname, fname, fname, SAMPRES-1, SAMPRES-1, |
471 |
|
xfargs); |
472 |
|
if (!run_cmd(cmdbuf)) |
473 |
|
return(0); |
474 |
|
} |
475 |
< |
if (back_comp & SDsampT) |
475 |
> |
if (back_comp & SDsampT) /* rear transmission */ |
476 |
|
for (i = 0; i < NINCIDENT; i++) { |
477 |
|
get_ivector(ivec, i); |
478 |
|
put_trans_arrow(ivec, -1); |
479 |
< |
fname = tfile_name(btpref, dsuffix, i); |
479 |
> |
cvt_sposition(sorg, ivec, -1); |
480 |
> |
ivec[0] = -ivec[0]; ivec[1] = -ivec[1]; /* normal */ |
481 |
> |
upv[0] = ivec[0]*ivec[1]*(ivec[2] - 1.); |
482 |
> |
upv[1] = ivec[0]*ivec[0] + ivec[1]*ivec[1]*ivec[2]; |
483 |
> |
upv[2] = -ivec[1]*(ivec[0]*ivec[0] + ivec[1]*ivec[1]); |
484 |
|
sprintf(xfargs, "-s %f -t %f %f %f", bsdf_rad, |
485 |
< |
ivec[0]*sph_rad + sph_xoffset, |
464 |
< |
ivec[1]*sph_rad, ivec[2]*sph_rad); |
485 |
> |
sorg[0], sorg[1], sorg[2]); |
486 |
|
nxfa = 6; |
487 |
|
printf("\nvoid colorfunc scale_pat\n"); |
488 |
|
printf("%d bsdf_red bsdf_grn bsdf_blu bsdf2rad.cal\n\t%s\n0\n0\n", |
489 |
|
4+nxfa, xfargs); |
490 |
|
printf("\nscale_pat glow scale_mat\n0\n0\n4 1 1 1 0\n"); |
491 |
< |
SDcompXform(vMtx, ivec, Yaxis); |
491 |
> |
if (SDcompXform(vMtx, ivec, upv) != SDEnone) |
492 |
> |
continue; |
493 |
|
nxfa = addrot(xfargs, vMtx[0], vMtx[1], vMtx[2]); |
494 |
|
sprintf(xfargs+strlen(xfargs), " -s %f -t %f %f %f", |
495 |
< |
scalef, ivec[0]*sph_rad + sph_xoffset, |
474 |
< |
ivec[1]*sph_rad, ivec[2]*sph_rad); |
495 |
> |
scalef, sorg[0], sorg[1], sorg[2]); |
496 |
|
nxfa += 6; |
497 |
|
fname = tfile_name(btpref, dsuffix, i); |
498 |
< |
sprintf(cmdbuf, "gensurf scale_mat %s%d %s %s %s %d %d | xform -ry 180 -mx -my %s", |
499 |
< |
btpref, i+1, fname, fname, fname, SAMPRES-1, SAMPRES-1, |
498 |
> |
sprintf(cmdbuf, "gensurf scale_mat %s%d %s %s %s %d %d | xform -ry 180 %s", |
499 |
> |
btpref, i, fname, fname, fname, SAMPRES-1, SAMPRES-1, |
500 |
|
xfargs); |
501 |
|
if (!run_cmd(cmdbuf)) |
502 |
|
return(0); |
514 |
|
printf("\n# Simplified material because we have no XML input\n"); |
515 |
|
printf("\nvoid brightfunc latlong\n2 latlong bsdf2rad.cal\n0\n0\n"); |
516 |
|
if ((front_comp|back_comp) & SDsampT) |
517 |
< |
printf("\nlatlong trans %s\n0\n0\n7 .75 .75 .75 0 0 .5 .8\n", |
517 |
> |
printf("\nlatlong trans %s\n0\n0\n7 .75 .75 .75 0 .04 .5 .8\n", |
518 |
|
sph_mat); |
519 |
|
else |
520 |
|
printf("\nlatlong plastic %s\n0\n0\n5 .5 .5 .5 0 0\n", |
532 |
|
break; |
533 |
|
} |
534 |
|
printf("\n# Actual BSDF material for rendering the hemispheres\n"); |
535 |
< |
printf("\nvoid BSDF BSDFmat\n6 0 \"%s%s\" 0 1 0 .\n0\n0\n", |
535 |
> |
printf("\nvoid BSDF BSDFmat\n6 0 \"%s%s\" upx upy upz bsdf2rad.cal\n0\n0\n", |
536 |
|
curdir, XMLfile); |
537 |
|
printf("\nvoid plastic black\n0\n0\n5 0 0 0 0 0\n"); |
538 |
|
printf("\nvoid mixfunc %s\n4 BSDFmat black latlong bsdf2rad.cal\n0\n0\n", |
544 |
|
put_source(void) |
545 |
|
{ |
546 |
|
printf("\n# Overhead parallel light source\n"); |
547 |
< |
printf("\nvoid light bright\n0\n0\n3 2000 2000 2000\n"); |
547 |
> |
printf("\nvoid light bright\n0\n0\n3 2500 2500 2500\n"); |
548 |
|
printf("\nbright source light\n0\n0\n4 0 0 1 2\n"); |
549 |
|
printf("\n# Material used for labels\n"); |
550 |
|
printf("\nvoid trans vellum\n0\n0\n7 1 1 1 0 0 .5 0\n"); |
554 |
|
static void |
555 |
|
put_hemispheres(void) |
556 |
|
{ |
557 |
+ |
const int nsegs = 131; |
558 |
+ |
|
559 |
|
printf("\n# Hemisphere(s) for showing BSDF appearance (if XML file)\n"); |
537 |
– |
printf("\nvoid antimatter anti_sph\n2 void %s\n0\n0\n", sph_mat); |
560 |
|
if (front_comp) { |
561 |
< |
printf("\n%s sphere Front\n0\n0\n4 %f 0 0 %f\n", |
562 |
< |
sph_mat, -sph_xoffset, sph_rad); |
563 |
< |
printf("\n!genbox anti_sph sph_eraser %f %f %f | xform -t %f %f %f\n", |
542 |
< |
2.02*sph_rad, 2.02*sph_rad, 1.02*sph_rad, |
543 |
< |
-1.01*sph_rad - sph_xoffset, -1.01*sph_rad, -1.01*sph_rad); |
561 |
> |
printf( |
562 |
> |
"\n!genrev %s Front \"R*sin(A*t)\" \"R*cos(A*t)\" %d -e \"R:%g;A:%f\" -s | xform -t %g 0 0\n", |
563 |
> |
sph_mat, nsegs, sph_rad, 0.495*PI, sph_xoffset); |
564 |
|
printf("\nvoid brighttext front_text\n3 helvet.fnt . FRONT\n0\n"); |
565 |
|
printf("12\n\t%f %f 0\n\t%f 0 0\n\t0 %f 0\n\t.01 1 -.1\n", |
566 |
< |
-.22*sph_rad - sph_xoffset, -1.4*sph_rad, |
566 |
> |
-.22*sph_rad + sph_xoffset, -1.4*sph_rad, |
567 |
|
.35/5.*sph_rad, -1.6*.35/5.*sph_rad); |
568 |
|
printf("\nfront_text alias front_label_mat vellum\n"); |
569 |
|
printf("\nfront_label_mat polygon front_label\n0\n0\n12"); |
570 |
|
printf("\n\t%f %f 0\n\t%f %f 0\n\t%f %f 0\n\t%f %f 0\n", |
571 |
< |
-.25*sph_rad - sph_xoffset, -1.3*sph_rad, |
572 |
< |
-.25*sph_rad - sph_xoffset, (-1.4-1.6*.35/5.-.1)*sph_rad, |
573 |
< |
.25*sph_rad - sph_xoffset, (-1.4-1.6*.35/5.-.1)*sph_rad, |
574 |
< |
.25*sph_rad - sph_xoffset, -1.3*sph_rad ); |
571 |
> |
-.25*sph_rad + sph_xoffset, -1.3*sph_rad, |
572 |
> |
-.25*sph_rad + sph_xoffset, (-1.4-1.6*.35/5.-.1)*sph_rad, |
573 |
> |
.25*sph_rad + sph_xoffset, (-1.4-1.6*.35/5.-.1)*sph_rad, |
574 |
> |
.25*sph_rad + sph_xoffset, -1.3*sph_rad ); |
575 |
|
} |
576 |
|
if (back_comp) { |
577 |
< |
printf("\n%s bubble Back\n0\n0\n4 %f 0 0 %f\n", |
578 |
< |
sph_mat, sph_xoffset, sph_rad); |
579 |
< |
printf("\n!genbox anti_sph sph_eraser %f %f %f | xform -t %f %f %f\n", |
560 |
< |
2.02*sph_rad, 2.02*sph_rad, 1.02*sph_rad, |
561 |
< |
-1.01*sph_rad + sph_xoffset, -1.01*sph_rad, -1.01*sph_rad); |
577 |
> |
printf( |
578 |
> |
"\n!genrev %s Back \"R*cos(A*t)\" \"R*sin(A*t)\" %d -e \"R:%g;A:%f\" -s | xform -t %g 0 0\n", |
579 |
> |
sph_mat, nsegs, sph_rad, 0.495*PI, -sph_xoffset); |
580 |
|
printf("\nvoid brighttext back_text\n3 helvet.fnt . BACK\n0\n"); |
581 |
|
printf("12\n\t%f %f 0\n\t%f 0 0\n\t0 %f 0\n\t.01 1 -.1\n", |
582 |
< |
-.22*sph_rad + sph_xoffset, -1.4*sph_rad, |
582 |
> |
-.22*sph_rad - sph_xoffset, -1.4*sph_rad, |
583 |
|
.35/4.*sph_rad, -1.6*.35/4.*sph_rad); |
584 |
|
printf("\nback_text alias back_label_mat vellum\n"); |
585 |
|
printf("\nback_label_mat polygon back_label\n0\n0\n12"); |
586 |
|
printf("\n\t%f %f 0\n\t%f %f 0\n\t%f %f 0\n\t%f %f 0\n", |
587 |
< |
-.25*sph_rad + sph_xoffset, -1.3*sph_rad, |
588 |
< |
-.25*sph_rad + sph_xoffset, (-1.4-1.6*.35/4.-.1)*sph_rad, |
589 |
< |
.25*sph_rad + sph_xoffset, (-1.4-1.6*.35/4.-.1)*sph_rad, |
590 |
< |
.25*sph_rad + sph_xoffset, -1.3*sph_rad ); |
587 |
> |
-.25*sph_rad - sph_xoffset, -1.3*sph_rad, |
588 |
> |
-.25*sph_rad - sph_xoffset, (-1.4-1.6*.35/4.-.1)*sph_rad, |
589 |
> |
.25*sph_rad - sph_xoffset, (-1.4-1.6*.35/4.-.1)*sph_rad, |
590 |
> |
.25*sph_rad - sph_xoffset, -1.3*sph_rad ); |
591 |
|
} |
592 |
|
} |
593 |
|
|
596 |
|
put_scale(void) |
597 |
|
{ |
598 |
|
const double max_log10 = log10(overall_max); |
599 |
< |
const double leg_width = 2.*.75*(sph_xoffset - sph_rad); |
599 |
> |
const double leg_width = 2.*.75*(fabs(sph_xoffset) - sph_rad); |
600 |
|
const double leg_height = 2.*sph_rad; |
601 |
|
const int text_lines = 6; |
602 |
|
const int text_digits = 8; |
695 |
|
sprintf(cmdbuf, "xform -t %f %f %f -s %f -t %f %f 0 %s", |
696 |
|
-.5*(xmin+xmax), -.5*(ymin+ymax), -zmax, |
697 |
|
1.5*sph_rad/max_dim, |
698 |
< |
-sph_xoffset, -2.5*sph_rad, |
698 |
> |
sph_xoffset, -2.5*sph_rad, |
699 |
|
radfn); |
700 |
|
if (!run_cmd(cmdbuf)) |
701 |
|
return; |
705 |
|
sprintf(cmdbuf, "xform -t %f %f %f -s %f -ry 180 -t %f %f 0 %s", |
706 |
|
-.5*(xmin+xmax), -.5*(ymin+ymax), -zmin, |
707 |
|
1.5*sph_rad/max_dim, |
708 |
< |
sph_xoffset, -2.5*sph_rad, |
708 |
> |
-sph_xoffset, -2.5*sph_rad, |
709 |
|
radfn); |
710 |
|
if (!run_cmd(cmdbuf)) |
711 |
|
return; |