| 7 |
|
RDU_PFILT = pfilt -1 -r 1 -x 128 -y 128 -pa 1 |
| 8 |
|
|
| 9 |
|
# Image comparison command |
| 10 |
< |
IMG_CMP = radcompare -rms 0.08 -max 1.5 |
| 10 |
> |
IMG_CMP = radcompare -rms 0.07 -max 1.5 |
| 11 |
|
|
| 12 |
|
# Default target is to test everything |
| 13 |
< |
all: test-dielectric-def test-dielectric-fish test-glass-def \ |
| 14 |
< |
test-glass-fish test-glass-up test-inst-def test-inst-fish \ |
| 13 |
> |
all: test-xform test-rfluxmtx \ |
| 14 |
> |
test-mixtex-def test-mixtex-fish test-mixtex-plan test-mixtex-rplan \ |
| 15 |
> |
test-trans2-def test-trans2-fish test-dielectric-def \ |
| 16 |
> |
test-dielectric-fish test-glass-def test-glass-fish test-glass-up \ |
| 17 |
> |
test-tfunc-def test-tfunc-fish test-inst-def test-inst-fish \ |
| 18 |
|
test-mesh-def test-mesh-cyl test-mirror-fish test-mist-def \ |
| 19 |
< |
test-tfunc-def test-tfunc-fish test-trans-def test-trans-fish \ |
| 20 |
< |
test-trans2-def test-trans2-fish |
| 19 |
> |
test-trans-def test-trans-fish test-patterns-def test-patterns-plan \ |
| 20 |
> |
test-rtrace |
| 21 |
|
|
| 22 |
|
clean: |
| 23 |
< |
rm -f *.oct *.amb *.dat *_*.hdr *.unf combined.rad |
| 23 |
> |
rm -f *.oct *.amb *_ill.dat blinds_ill?.dat *_*.hdr *.unf \ |
| 24 |
> |
*.[cg]pm{,.leaf} combined.rad rfmirror.mtx |
| 25 |
|
|
| 26 |
< |
# Special test of xform |
| 26 |
> |
### Special test of xform ### |
| 27 |
|
|
| 28 |
|
test-xform: combined_scene.rad |
| 29 |
< |
xform -f combined_scene.rad > combined.rad |
| 30 |
< |
radcompare ref/combined.rad combined.rad |
| 29 |
> |
xform -f combined_scene.rad | grep -v '^[ ]*#' > combined.rad |
| 30 |
> |
radcompare -max 0.04 ref/combined.rad combined.rad |
| 31 |
|
|
| 32 |
+ |
### Special test of rtrace ### |
| 33 |
+ |
|
| 34 |
+ |
test-rtrace: ref/mirror_fish.hdr rtmirror_fish.hdr |
| 35 |
+ |
$(RDU_PFILT) rtmirror_fish.hdr | $(IMG_CMP) -h ref/mirror_fish.hdr - |
| 36 |
+ |
|
| 37 |
+ |
rtmirror_fish.hdr: mirror.oct |
| 38 |
+ |
rad -v 0 mirror.rif OPT=mirror.opt |
| 39 |
+ |
vwrays -ff -vf fish.vf -x 2048 -y 2048 | rtrace -n 2 @mirror.opt \ |
| 40 |
+ |
-ffc -x 2048 -y 2048 mirror.oct | pfilt -1 -e +3 -r .6 -x /2 -y /2 \ |
| 41 |
+ |
> rtmirror_fish.hdr |
| 42 |
+ |
rm -f mirror.opt |
| 43 |
+ |
|
| 44 |
+ |
### Special test for rfluxmtx (and rcontrib) ### |
| 45 |
+ |
|
| 46 |
+ |
test-rfluxmtx: ref/rfmirror.mtx rfmirror.mtx |
| 47 |
+ |
radcompare -max .4 -rms .05 ref/rfmirror.mtx rfmirror.mtx |
| 48 |
+ |
|
| 49 |
+ |
rfmirror.mtx: mirror.rad dummysky.rad basic.mat diorama_walls.rad \ |
| 50 |
+ |
closed_end.rad front_cap.rad glass_pane.rad antimatter_portal.rad |
| 51 |
+ |
rfluxmtx -ab 2 -lw 1e-4 mirror.rad dummysky.rad basic.mat \ |
| 52 |
+ |
diorama_walls.rad closed_end.rad front_cap.rad glass_pane.rad \ |
| 53 |
+ |
antimatter_portal.rad > rfmirror.mtx |
| 54 |
+ |
|
| 55 |
|
### Octree for dielectric ### |
| 56 |
|
|
| 57 |
|
dielectric.oct: dielectric.rif |
| 400 |
|
rad -v win trans2.rif |
| 401 |
|
|
| 402 |
|
### End trans2-win tests |
| 403 |
+ |
|
| 404 |
+ |
### Octree for patterns ### |
| 405 |
+ |
|
| 406 |
+ |
patterns.oct: patterns.rif |
| 407 |
+ |
rad -v 0 patterns.rif |
| 408 |
+ |
|
| 409 |
+ |
### Reference and test for patterns view def ### |
| 410 |
+ |
|
| 411 |
+ |
test-patterns-def: ref/patterns_def.hdr patterns_def.hdr |
| 412 |
+ |
$(RDU_PFILT) patterns_def.hdr | $(IMG_CMP) ref/patterns_def.hdr - |
| 413 |
+ |
|
| 414 |
+ |
ref/patterns_def.hdr: |
| 415 |
+ |
make patterns_def.hdr |
| 416 |
+ |
$(RDU_PFILT) patterns_def.hdr > ref/patterns_def.hdr |
| 417 |
+ |
|
| 418 |
+ |
patterns_def.hdr: patterns.oct |
| 419 |
+ |
rad -v def patterns.rif |
| 420 |
+ |
|
| 421 |
+ |
### End patterns-def tests |
| 422 |
+ |
|
| 423 |
+ |
### Reference and test for patterns view plan ### |
| 424 |
+ |
|
| 425 |
+ |
test-patterns-plan: ref/patterns_plan.hdr patterns_plan.hdr |
| 426 |
+ |
$(RDU_PFILT) patterns_plan.hdr | $(IMG_CMP) ref/patterns_plan.hdr - |
| 427 |
+ |
|
| 428 |
+ |
ref/patterns_plan.hdr: |
| 429 |
+ |
make patterns_plan.hdr |
| 430 |
+ |
$(RDU_PFILT) patterns_plan.hdr > ref/patterns_plan.hdr |
| 431 |
+ |
|
| 432 |
+ |
patterns_plan.hdr: patterns.oct |
| 433 |
+ |
rad -v plan patterns.rif |
| 434 |
+ |
|
| 435 |
+ |
### End patterns-plan tests |
| 436 |
+ |
|
| 437 |
+ |
### Octree for mixtex ### |
| 438 |
+ |
|
| 439 |
+ |
mixtex.oct: mixtex.rif |
| 440 |
+ |
rad -v 0 mixtex.rif |
| 441 |
+ |
|
| 442 |
+ |
### Reference and test for mixtex view def ### |
| 443 |
+ |
|
| 444 |
+ |
test-mixtex-def: ref/mixtex_def.hdr mixtex_def.hdr |
| 445 |
+ |
$(RDU_PFILT) mixtex_def.hdr | $(IMG_CMP) ref/mixtex_def.hdr - |
| 446 |
+ |
|
| 447 |
+ |
ref/mixtex_def.hdr: |
| 448 |
+ |
make mixtex_def.hdr |
| 449 |
+ |
$(RDU_PFILT) mixtex_def.hdr > ref/mixtex_def.hdr |
| 450 |
+ |
|
| 451 |
+ |
mixtex_def.hdr: mixtex.oct |
| 452 |
+ |
rad -v def mixtex.rif |
| 453 |
+ |
|
| 454 |
+ |
### End mixtex-def tests |
| 455 |
+ |
|
| 456 |
+ |
### Reference and test for mixtex view fish ### |
| 457 |
+ |
|
| 458 |
+ |
test-mixtex-fish: ref/mixtex_fish.hdr mixtex_fish.hdr |
| 459 |
+ |
$(RDU_PFILT) mixtex_fish.hdr | $(IMG_CMP) ref/mixtex_fish.hdr - |
| 460 |
+ |
|
| 461 |
+ |
ref/mixtex_fish.hdr: |
| 462 |
+ |
make mixtex_fish.hdr |
| 463 |
+ |
$(RDU_PFILT) mixtex_fish.hdr > ref/mixtex_fish.hdr |
| 464 |
+ |
|
| 465 |
+ |
mixtex_fish.hdr: mixtex.oct |
| 466 |
+ |
rad -v fish mixtex.rif |
| 467 |
+ |
|
| 468 |
+ |
### End mixtex-fish tests |
| 469 |
+ |
|
| 470 |
+ |
### Reference and test for mixtex view plan ### |
| 471 |
+ |
|
| 472 |
+ |
test-mixtex-plan: ref/mixtex_plan.hdr mixtex_plan.hdr |
| 473 |
+ |
$(RDU_PFILT) mixtex_plan.hdr | $(IMG_CMP) ref/mixtex_plan.hdr - |
| 474 |
+ |
|
| 475 |
+ |
ref/mixtex_plan.hdr: |
| 476 |
+ |
make mixtex_plan.hdr |
| 477 |
+ |
$(RDU_PFILT) mixtex_plan.hdr > ref/mixtex_plan.hdr |
| 478 |
+ |
|
| 479 |
+ |
mixtex_plan.hdr: mixtex.oct |
| 480 |
+ |
rad -v plan mixtex.rif |
| 481 |
+ |
|
| 482 |
+ |
### End mixtex-plan tests |
| 483 |
+ |
|
| 484 |
+ |
### Reference and test for mixtex view rplan ### |
| 485 |
+ |
|
| 486 |
+ |
test-mixtex-rplan: ref/mixtex_rplan.hdr mixtex_rplan.hdr |
| 487 |
+ |
$(RDU_PFILT) mixtex_rplan.hdr | $(IMG_CMP) ref/mixtex_rplan.hdr - |
| 488 |
+ |
|
| 489 |
+ |
ref/mixtex_rplan.hdr: |
| 490 |
+ |
make mixtex_rplan.hdr |
| 491 |
+ |
$(RDU_PFILT) mixtex_rplan.hdr > ref/mixtex_rplan.hdr |
| 492 |
+ |
|
| 493 |
+ |
mixtex_rplan.hdr: mixtex.oct |
| 494 |
+ |
rad -v rplan mixtex.rif |
| 495 |
+ |
|
| 496 |
+ |
### End mixtex-rplan tests |