--- a/bin/ltpict.pl Thu Jan 30 21:54:21 2014 +0000
+++ b/bin/ltpict.pl Sun Mar 02 20:13:42 2014 +0000
@@ -5,8 +5,7 @@
# This is based on objpict.pl that renders four-view
# images of objects that are not light sources.
#
-# Written by Axel Jacobs,
-# with input from Rob Guglielmetti and Gre
+# Written by Axel Jacobs
use strict;
use warnings;
@@ -22,7 +21,7 @@
my $tiny = 0.01;
my $is_ies = 0;
my $rpict_cmd = "rpict -ab 0 -ds 0 -dv -av 0 0 0 -x $xres -y $yres";
-my $pfilt_cmd = "pfilt -r .6 -x /2 -y /2";
+my $pcond_cmd = "pcond -l";
my $ies = "$td/dist.ies";
my $fittings = "$td/fitting.rad";
@@ -88,22 +87,22 @@
# Different 'room' geometry for different views
my $OFFSET = 0.1;
-open(FH, ">$testroom1") or die("Can\'t write to temporary file $testroom1");
+open(FH, ">$testroom1") or die("Can't write to temporary file $testroom1");
# C0-C180
print FH "wall_mat polygon box.4620 0 0 12 -$OFFSET -5 5 -$OFFSET 5 5 -$OFFSET 5 -5 -$OFFSET -5 -5";
close(FH);
-open(FH, ">$testroom2") or die("Can\'t write to temporary file $testroom2");
+open(FH, ">$testroom2") or die("Can't write to temporary file $testroom2");
# C90-C270
print FH "wall_mat polygon box.1540 0 0 12 5 $OFFSET -5 5 $OFFSET 5 -5 $OFFSET 5 -5 $OFFSET -5";
close(FH);
-open(FH, ">$testroom3") or die("Can\'t write to temporary file $testroom3");
+open(FH, ">$testroom3") or die("Can't write to temporary file $testroom3");
# Lower hemisphere
print FH "wall_mat bubble lower 0 0 4 0 0 $dims[4] 5";
close(FH);
-open(FH, ">$testroom4") or die("Can\'t write to temporary file $testroom4");
+open(FH, ">$testroom4") or die("Can't write to temporary file $testroom4");
# Upper hemisphere
print FH "wall_mat bubble upper 0 0 4 0 0 $dims[5] 5";
close(FH);
@@ -141,9 +140,12 @@
my $vta = "$td/vta.hdr";
# Auto-expose right/front and down/up pairs separately
-system "pcompos $td/right.hdr 0 0 $td/front.hdr $xres 0 |$pfilt_cmd > $vtl";
-system "pcompos $td/down.hdr 0 0 $td/up.hdr $xres 0 |$pfilt_cmd > $vta";
-my $yres2 = $yres / 2;
-exec "pcompos $vtl 0 0 $vta 0 $yres2";
+system "pcompos $td/right.hdr 0 0 $td/front.hdr $xres 0 > $td/rf.hdr";
+system "$pcond_cmd $td/rf.hdr > $vtl";
+system "pcompos $td/down.hdr 0 0 $td/up.hdr $xres 0 > $td/du.hdr";
+system "$pcond_cmd $td/du.hdr > $vta";
+
+# Combine top two images with bottom row
+exec "pcompos -a 1 $vtl $vta";
#EOF