From f0a0118393a3d121bcb83047b5b9ac95eb0621ba Mon Sep 17 00:00:00 2001 From: taw27 Date: Wed, 16 Apr 2008 16:57:56 +0000 Subject: Initial import git-svn-id: svn://cook.msm.cam.ac.uk:745/thrust3d/thrust3d@1 84d2e878-0bd5-11dd-ad15-13eda11d74c5 --- scripts/model.pl | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100755 scripts/model.pl (limited to 'scripts') 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 = ) { + + 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); + -- cgit v1.2.3