PDA

View Full Version : Alice modified for Monte Carlo Assistant?


eaglesondouglas
05-20-2007, 09:04 PM
Hello,

I use EGS4 a radiation transport code to model radiation, Gamma and electrons. I am researching an interfacing technology to allow EGS4 to run within ALICE.

MY basic question is how to evaluate the suitability. Can I use scripts to output fortran. EGS4 is a worldwide benchmark and I can not translate it to Alice's language. BUt can I use Alice to write fortran code?

That is my basic question.

My hope is to use the collision techniques and 3D models of game programming to assist.

Once the code is written, allowing compilation and running within Alice should be easy. Each particle follows a complex geometric path within a model. Currently little technology is around for EGS4.

DrJim
05-21-2007, 06:44 PM
First, let me qualify the rest of this post by saying I’d never heard of the particular transport code you asked about and hence am basing my reply on a brief scan of the description at http://www-personal.umich.edu/~sjwnc/EGS5/slac730.pdf .

The program does look like an excellent candidate to update and redo with a modern, object oriented approach. This is the type of complex, multi-variable, multi-user code that procedural oriented languages (especially 30 year old (!) FORTRAN 77) really had/have problems with. Recoding and updating in Java or C# should improve both performance and usability – the question would be whether or not there is still enough interest in the code to justify the effort.

However, I think Alice would be very much the wrong choice for such a project for many reasons. To just name just three:

1. Alice simply does not work smoothly when there are a lot (over a couple dozen) of objects (and hence calculations) involved. I would expect a typical transport problem would involve several thousand entities at a minimum.

2. The native collision detection tools in Alice are very minimal compared to a typical “game engine.” I’ve been playing a bit with Blitz3D – which probably would be classified as low-end to mid-range – and even it allows the choice of collision geometry shapes and post-collision actions. These would have to be individually programmed in Alice.

3. The Alice 2.0 “system development” environment really isn’t suited for large programming projects – it’s primarily a teaching tool. In particular, there is no method for entering code (i.e., no text entry capability) other than “drag and drop” in the main programming screens.

Only one opinion – would really like to hear others. :) The transition from the Alice “environment” to that needed for a major software project is a path that is a very grey area to me.

DickBaldwin
05-21-2007, 11:32 PM
I will express my agreement with DrJim's item 3. Although I consider Alice to be an excellent teaching tool for first-time programmers, I wouldn't consider developing a major application in Alice.

Since my forte is Java, I would probably tend toward the use of hard-core Java3D, but I am probably biased in that regard.

Dick Baldwin

eaglesondouglas
05-23-2007, 08:07 PM
Thank you all for your knowlegable insight.

A basic renderer written in java and a phrase generator written in java would likely be my best bet.

I had hoped to use the file format as a basis for geotric definition. IN reality a 3D java geometry could power the FORTRAN phraser.

So maybe a jave renderer open source is what I need.
Thanks again Doug

hgs
05-21-2008, 05:53 AM
Thank you all for your knowlegable insight.

A basic renderer written in java and a phrase generator written in java would likely be my best bet.

I had hoped to use the file format as a basis for geotric definition. IN reality a 3D java geometry could power the FORTRAN phraser.

So maybe a jave renderer open source is what I need.
Thanks again Doug

I don't know enough about the various game engines to say what is worth exploring there, but you may get mileage from looking at Blender http://www.blender.org/ which supports import of various formats, has particle systems built in which you presumably could use, adapt and add to. Also, migrating the code to Fortran 90 or 95 would seem to be useful since they are much better at supporting parallelism. Blender is based around Python as its scripting language, and there has been work on integrating Python with other languages, and it has its own Numeric Library (NumPy) as well, as well as Scientific libraries.

There are probably lots of other ways to tackle this. Many game engines have Lua built in http://www.lua.org/ which is easy to interface to C, not sure if that helps with Fortran.

I suppose the best path will be determined by what you want to get out of interfacing the fortran to a 3D graphics package. Do you want ease of display, or is it the particularly easy interaction that you want? The user interface of Alice is easy to pick up, but that of Blender is much less so. But the graphical abilities of Blender are astounding. Using game engines may be a good compromise.