Arrow field Tool.   4-25-01


Draws arrows on an image, to represent a vector field, where the field is given as a magnitude image and a direction image.  Magnitude and direction images should have the same dimensions as the image on which the arrows are drawn.


Buttons

Magn Im!    Set front image to be the source of magnitude values.

            (Click on the magnitude image, then click this button.)

Dir Im!     Set front image to be the source of direction values.

Draw Im!    Set front image to be where arrows are drawn.

Stress arrow color!     Set color of type in this button and the color

                        for drawing stress arrows to be the color of

                        '***Buttons*** / Pick Color'

Crack arrow color!            Set color of type in this button and the color

                        for drawing crack arrows to be the color of

                        '***Buttons*** / Pick Color'

Arrow Inc   Set the number of pixels between arrows, both

            horizontally and vertically.

Arrow Length Xf         Set the scale factor for the arrow length.

                        Length (pixels) = mag im value * this factor.

Arrow Heads!            Toggles between yes and no.  For values such as

                  stress that are 'bi directional', use 'no'.

Draw Arrows!      Draws field of arrows onto the 'Draw Im'

Buttons!          Pops the main image button window.

Hints!            Displays this file.


Example directions - displaying stress field

1) Load the microstructure image on which arrows are to be drawn.

If image is in a text file (see below), then the dimensions must first

be known.  See

'***Buttons*** / File / Info & other formats / Hints / ASCII'

for directions on loading this type of file.

Otherwise, just open the file (gif, jpeg, tiff).

2) Expand the image to full size if desired:  '***Buttons*** / <->!'

3) Load the magnitude and direction images.

If image is in a text file (see below), then the dimensions must first

be known.  Click on the microstructure image and then

'***Buttons*** / Info!' to see the image dimensions.

See

'***Buttons*** / File / Info & other formats / Hints / ASCII'

for directions on loading this type of file.

4) Resize the images as desired by clicking on each in turn, then

clicking '<->!'.

5) If the images are transposed with respect to the microstructure

image, use '***Buttons*** / Adjust / Transpose', and 'Yes' to close

the original images, to fix them.

6) Click on the magnitude image, then on '*Arrow Field* / Mag Im!'.

Do the same for the magnitude and draw images.

7) Set the parameters

      Arrow Inc   the greater the number, the wider the spaces

                  between arrows.

      Arrow Length Xf   The greater the value, the longer the arrows.

      Arrow Head size.  The heads are a constant size.  The greater

                        the value, the larger the heads.

                        Use zero for no heads.

8) Draw the arrows using 'Draw / ...'  Note that the drawing is

temporary.  To save images with arrows, use a screen grab.  To erase

the arrows, use '***Buttons*** / Redraw!'.


ASCII file formats

microstructure image ASCII file

Sample file name: microstructure.dat  --

One integer per line.  Symbol indicating type of material.

Sample lines from file:

...

1

1

2

2

...

1     matrix

2     rocks

3     pores

4     effective material  (should not have any of these).

---------------------------------

Stress image ASCII file

The stress images are in one ASCII text file, one pixel per line. 

Note that the image dimensions are not in the file and must be

input by hand using:

***Buttons*** / File / Info & other formats / ASCII / set dimensions

Zeros are for compressive stress and for pores.

Sample lines from the file:

    magnitude     angle (radians)

...

    0.00000000    0.00000000

    2.56360338   -0.13914777

    1.72512885   -0.13432072

...

---------------------------------------------------------------------