bin/rlux.pl
author Axel Jacobs <axel@jaloxa.eu>
Sun, 15 Dec 2013 23:13:40 +0000
changeset 49 66e192fe711e
parent 8 9ed02f081b72
permissions -rwxr-xr-x
epw2wea: New file converter for EnergyPlus weather to DaySim
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
8
9ed02f081b72 Added the rest of the files
Axel Jacobs <axel@jaloxa.eu>
parents:
diff changeset
     1
#!/usr/bin/perl
9ed02f081b72 Added the rest of the files
Axel Jacobs <axel@jaloxa.eu>
parents:
diff changeset
     2
#
9ed02f081b72 Added the rest of the files
Axel Jacobs <axel@jaloxa.eu>
parents:
diff changeset
     3
# Compute illuminance from ray origin and direction
9ed02f081b72 Added the rest of the files
Axel Jacobs <axel@jaloxa.eu>
parents:
diff changeset
     4
#
9ed02f081b72 Added the rest of the files
Axel Jacobs <axel@jaloxa.eu>
parents:
diff changeset
     5
# This is re-write of Greg's rlux.csh
9ed02f081b72 Added the rest of the files
Axel Jacobs <axel@jaloxa.eu>
parents:
diff changeset
     6
9ed02f081b72 Added the rest of the files
Axel Jacobs <axel@jaloxa.eu>
parents:
diff changeset
     7
use strict;
9ed02f081b72 Added the rest of the files
Axel Jacobs <axel@jaloxa.eu>
parents:
diff changeset
     8
use warnings;
9ed02f081b72 Added the rest of the files
Axel Jacobs <axel@jaloxa.eu>
parents:
diff changeset
     9
9ed02f081b72 Added the rest of the files
Axel Jacobs <axel@jaloxa.eu>
parents:
diff changeset
    10
if($#ARGV < 0) {
9ed02f081b72 Added the rest of the files
Axel Jacobs <axel@jaloxa.eu>
parents:
diff changeset
    11
	print "Usage: $0 [rtrace args] octree";
9ed02f081b72 Added the rest of the files
Axel Jacobs <axel@jaloxa.eu>
parents:
diff changeset
    12
	exit(1);
9ed02f081b72 Added the rest of the files
Axel Jacobs <axel@jaloxa.eu>
parents:
diff changeset
    13
}
9ed02f081b72 Added the rest of the files
Axel Jacobs <axel@jaloxa.eu>
parents:
diff changeset
    14
9ed02f081b72 Added the rest of the files
Axel Jacobs <axel@jaloxa.eu>
parents:
diff changeset
    15
my $args = join(' ', @ARGV);
9ed02f081b72 Added the rest of the files
Axel Jacobs <axel@jaloxa.eu>
parents:
diff changeset
    16
my $cmd = "rtrace -i+ -dv- -h- -x 1 $args";
9ed02f081b72 Added the rest of the files
Axel Jacobs <axel@jaloxa.eu>
parents:
diff changeset
    17
$cmd .= " | rcalc -e '$1=47.4*$1+120*$2+11.6*$3' -u";
9ed02f081b72 Added the rest of the files
Axel Jacobs <axel@jaloxa.eu>
parents:
diff changeset
    18
system "$cmd";
9ed02f081b72 Added the rest of the files
Axel Jacobs <axel@jaloxa.eu>
parents:
diff changeset
    19
9ed02f081b72 Added the rest of the files
Axel Jacobs <axel@jaloxa.eu>
parents:
diff changeset
    20
#EOF