BobHegwood wrote:
t00fri wrote:
I bet that many more users have Perl installed (often without knowing) than LUA...
I will certainly not spend my time rewriting my scripts to LUA, given that
most of our BIG workscripts for Celestia are written in Perl, too: My galaxy extraction , my binary star extraction, my globulars extraction, Andrews' HIP star extraction, Andrews W UMa binaries add-on, etc.
Altogether this concerns MANY thousand lines of Perl code

Fridger
Just FYI here, I *do* have Cygwin installed on my machine. Are you saying that I can run any of your
Perl scripts under the bash shell?
I may have to experiment a bit, but I'd very much like to give it a go.
Thanks, Brain-Dead
Hey Bob,
yes of course you can run Perl there and hence also my CMOD script. That's actually a GOOD further reason for installing CYGWIN. First, you must make sure that you have Perl installed, but it's almost for sure. Just type 'perl -v' at the CYGWIN console prompt and see what happens. If you get a Perl header output, you are in. Otherwise just install Perl via a call to setup.exe from a CYGWIN archive.
Then you got to copy the two needed text files (my Perl script
phobos_cmod.pl and the phobos shape model data
m1phobos.tab) into your CYGWIN home directory. Suppose your CYGWIN username is
bob, then this is presumably at C:\cygwin\home\bob. You best use WE to copy the needed files there from their download location.
The model data file
m1phobos.tab you get with a click from here:
http://www.psi.edu/pds/asteroid/EAR_A_5 ... phobos.tab
Then open your CYGWIN console, type
ls (list command) at the prompt and look for these two file names in that directory. If found, just type at the prompt:
> perl phobos_cmod.pl < m1phobos.tab
After just 2 seconds, say you should have your desired result in form of the generated ascii CMOD, named
phobos_ascii.cmod. You should see it in the same directory, after typing
ls once more.
You could probably try out this file directly in Celestia or better -- with Chris' cmodfix-- convert it to a binary CMOD and have the normals calculated etc:
> cmodfix --normals --smooth 90 --weld --binary phobos_ascii.cmod phobos.cmod
You can
download cmodfix for Windows from here
http://www.shatters.net/~claurel/celestia/cmodtools/
The binary output CMOD,
phobos.cmod you may directly copy to your celestia/models directory and use it. But first save your original phobos.cmod file!
Good luck,
Fridger