aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authortaw27 <taw27@84d2e878-0bd5-11dd-ad15-13eda11d74c5>2008-04-16 16:57:56 +0000
committertaw27 <taw27@84d2e878-0bd5-11dd-ad15-13eda11d74c5>2008-04-16 16:57:56 +0000
commitf0a0118393a3d121bcb83047b5b9ac95eb0621ba (patch)
treecfc4f3f7955b4829317fa9b7865e328ccabfb129 /scripts
Initial import
git-svn-id: svn://cook.msm.cam.ac.uk:745/thrust3d/thrust3d@1 84d2e878-0bd5-11dd-ad15-13eda11d74c5
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/model.pl26
1 files changed, 26 insertions, 0 deletions
diff --git a/scripts/model.pl b/scripts/model.pl
new file mode 100755
index 0000000..04367b7
--- /dev/null
+++ b/scripts/model.pl
@@ -0,0 +1,26 @@
+#!/usr/bin/perl -w
+
+use strict;
+
+open(FH, $ARGV[0]);
+
+while ( my $line = <FH> ) {
+
+ chomp $line;
+
+ if ( $line =~ /^\s*([0-9,\.\-]+)\s+([0-9,\.\-]+)\s+([0-9,\.\-]+)/ ) {
+
+ my $x = $1; my $y = $2; my $z = $3;
+
+ printf("%8.2f%8.2f%8.2f\n", $x/100.0, $y/100.0, $z/100.0);
+
+ } else {
+ printf("%s\n", $line);
+ }
+
+}
+
+close(FH);
+
+exit(0);
+