Документ взят из кэша поисковой машины. Адрес оригинального документа : http://www.atnf.csiro.au/computing/software/gipsy/tsk/render.dc1
Дата изменения: Fri Jul 21 11:18:26 2000
Дата индексирования: Fri Jan 16 01:11:09 2009
Кодировка:

Поисковые слова: aurora

Program: RENDER

Purpose: Render 2d- and 3d GIPSY data and display 2d-slices at any
angle.

Category: PLOTTING

File: render.c

Author: M.G.R. Vogelaar
(GUI: J.P. Terlouw)

Warning: 1) For volume-rendering, the entire data cube is read from
disk and stored in memory. To avoid slow performance or
even hang-ups, use a machine with a lot of memory.

2) When building the frames of a movie loop, make sure
that no other window covers part of your plot, otherwise
the plot could be obscured by the overlay (this depends
on the X-server in use).

3) Blanks in your data are replaced by the minimum data value
in your (sub)set. If you want to replace blanks with another
value, use COPY to copy your original data and CBLANK to
replace blanks.

4) Reading data from a big set can take a while. If you
are planning to use a smaller box than the default
(entire (sub)set ) start RENDER in Hermes with a
pre-specified box e.g.
RENDER INSET=AURORA BOX=-150 -150 150 150


Keywords: Program RENDER is an easy to use data inspection tool to:

1) surface render a 2-dim. set
2) volume render a 3-dim. set
3) display slices at any angle through 3-dim. data
4) record a series of plots and play them in a movie

The listing below is an overview of buttons and input fields
of the Graphical User Interface for this program. Each button
or input field has an associated GIPSY keyword. This
enables you to start the program with pre-specified keywords.
Also the keyword macro's will work.


PLOTSIZE= Hidden keyword

Set the size of the plot window in pixels. This keyword
accepts one and two values. If one value is entered a
square plot window is made. Whatever the size of the plot window
is, the render output is always square. The default is:
PLOTSIZE=532 532


QUIT= Menu , option Exit

Abort program by selecting exit from menu. Open PGPLOT
devices will be closed. From within Hermes type QUIT=Y


PSFILE= Menu , option PostScript file

Select a name for the PostScript file to which the output
is redirected. The default name is rederplot.ps


PLOTTER= Menu "PLOTTER"

Before you make a hardcopy of the current plot, select
a plot device first from this menu. However if you want to
(pre) specify the keyword in Hermes, you have to enter a number.
The number of the first device is 0 etc.
Create the plot with the button.


PLOT= Button

A hardcopy is made on the selected device (See PLOTTER=).
The corresponding PostScript file name is set by PSFILE=
(File menu).


ANNOT= Button

Open a window to set plot annotations. See also keywords
XTITLE=, YTITLE=, ZTITLE=, PLOTTITLE= and CHARSIZE=


HELP= Button

Show the 'dc1' document for this program. This is the
document that you are reading now. String search can be
started with C


INSET= Input field "Set"

Maximum number of subsets is 1.
For this GIPSY data a surface plot is created. The data can
be 2 dimensional for a surface plot where the height represents
the data value, (e.g. INSET=aurora freq 0 if aurora is a
RA-DEC-FREQ cube) or 3 dimensional for an iso-surface plot
(e.g. INSET=aurora). In the 3-dim. case the ISOVAL= keyword
becomes active.
Note that reading a big cube into memory can disable the
gui for a while.


BOX= Input field "Box"

Data within this box will be used for plotting.
This field if reset by a default every time a new set is
entered. The default box is the entire set/subset.
You get the default by pressing Enter in an empty input field.


ZMINMAX= Input field "Min, max"

These are the minimum and maximum data values in your 2- or
3-dim. set/subset. Real data min. and max. values are displayed
in the gui every time new data is read. The values are used to
clip values in the surface rendering and are used to scale the
colours or gray scales in a slice. Note that for 3D-data
the default values for the minimum and maximum are the real
minimum and maximum in the data cube. If you want to compare
a colour slice with a subset viewed in GIDS then note that GIDS
reads values for the min. and max. from the header of the
displayed SUBset. These are usually not the same values as
displayed in the gui of RENDER.


ISOVAL= Input field "Isoval"

For three dimensional sets the program renders an iso
surface. The surface is a volume plot of data boundaries with
the same value (in units of the data). The default is
a value half between the minimum and maximum data values.
The input field is not erased if a new set or box is
entered.


APOINT= Input field "Slice point"

Enter x, y and z values of a point on the slice that you want
to plot. The values for x, y and z are in coordinates of your
box. The normal of the slice is set by PHI= and THETA=.


THETA= Input field "Slice normal: Theta"

Enter a value in degrees. This is an angle of the normal
of your slice in the xz (horizontal) plane. Zero degrees
points in the z-direction. Note that the angles are defined
in a unit cell (all sides have length 1), i.e. the angles
are not with respect to the pixel coordinate system.


PHI= Input field "Slice normal: Phi"

Enter a value in degrees. This is an angle of the normal
of your slice in the xy (vertical) plane. Zero degrees
points in the x-direction.


XTITLE= Input field "X-title"

The default title is copied from header item corresponding
to the axis name of the first axis in your set.


YTITLE= Input field "Y-title"

The default title is copied from header item corresponding
to the axis name of the first axis in your set.


ZTITLE= Input field "Z-title"

Only for a 3-dim. set/subset a z-axis is plotted.
The default title is copied from header item corresponding
to the axis name of the first axis in your set.


PLOTTITLE= Input field "Plot title"

Enter text to label the plot.
The position of the title is always top-middle.


PSFILE= Input field "PS file"

Enter the name of the PostScript file on disk where to
hardcopy output is directed.


CHARSIZE= Input field "Char.size"

This value applies to all characters on the plot. The default
is set to 1.1.


COLOPTION= Button

Set the color mode for plotting. Default is monochrome in
the colour set by MONORGB= (input field Mono color in gui).
The other option is a colour scheme set by GIDS, which is
automatically started. RENDER borrows the colours from
GIDS in the condition as it is at the moment of pressing
the button. Note that in order to get colours you need
to set a value for NCBAND= (i.e. # Bands input field in gui)
greater than 1. If you are interested in colours only,
set the diffuse value to 0. This is the default if you
select colours from GIDS.


NCBAND= Input field "# Bands"

In colour mode you can plot different bands of colour.
Problems can arise if RENDER cannot allocate as much colours
as the number of colour bands. The default value is 1 for
monochrome and n > 1 for colours from GIDS.


LI_HOR= Dial "Light-H"

Dial for setting the rotation of the light source.
Value in degrees. Default is 0. (See also LIGHT=)
The direction of the arrow is along the imaginary line that
connects the light source and the fixed object in the middle
of the circle.


LI_VER= Dial "Light-V"

Dial for setting the tilt of the light source.
Value in degrees. Default is 0. (See also LIGHT=)


MONORGB= Input field "Mono color"

This colour is the main surface colour of the plot when
plotting in monochrome mode. The default values for red,
green and blue are 0, 1 and 0.


BACKRGB= Input field "Back color"

Red, green and blue values between 0 and 1 for the
background colour The default values are
BACKRGB=0.2 0.4 0.7 which is some kind of blue.


EYE= Input field "Eye"

This a distance in arbitrary units. The default is 8.
You will see perspective effects only with values smaller
than 1.0.


DIFFUSE= Input field "Diffuse"

Number between 0 and 1 and the default is set to 0.8.
The higher this number, the more dynamic range you will get.
If you switch to colours from GIDS, the diffuse number is set
to 0.0 so that plot colours correspond to colours set by GIDS.


POLISH= Input field "Polish"

If you want a shiny object, SHINE= must be greater than 0.
For these objects POLISH= sets the size of the shiny
reflections. The default value is 1.


SHINE= Input field "Shine"

SHINE determines the whiteness of the shiny reflections
(or grayness if < 1). The range is from 0 to 1 and
the default is set to 0.


TRANS= Input field "Transp."

Set the level of transparency for iso surface (=3-dim.)
data rendering. There are four numbers for four levels:
0 = not transparent, 1 = 25%, 2 = 50% and 3 = 75% transpa-
rency.


ROTATION= Dial "Rotation"

Dial (or circular valuator) to rotate the object.
Object is rotated in a horizontal plane. Default value is
40 deg. A value can also be entered manually in the
corresponding input field. You can also adjust values by
dragging the cube in the small plot window using the left
mouse button.


TILT= Dial "Tilt"

Dial (or circular valuator) to rotate the object
Object is rotated in a vertical plane. Default value is
20 deg. See also ROTATION=


GO= Button "GO"

Use the current values set by the user to create a (new)
plot on screen. If you want a plot on a hardcopy device,
select a device first with the PLOTTER= and PLOT= keywords
or the and buttons


LWIDTH= Hidden keyword

Keyword which sets the line width (between 1 and 20)
of the plot title. Default value is 2. Other line widths
must be set in Hermes with LWIDTH=n where n is a number
between 1 and 21. It does NOT apply to the line widths
of the coordinate system.


LIGHT= Hidden Keyword

Keyword for setting the direction (x,y,z) of the light.
Default is 0 0 -1. The values are set by two circular valuators
that transform their values into a vector which represents the
direction of the light. Imagine the (rotated and tilted) object
in the middle of the circular valuators. The left valuator
sets the direction an a horizontal plane and the right
valuator sets the direction an a vertical plane.
See also 'Description: Coordinate system'.


ANIMATOR WINDOW (movies)
------------------------

ANIMATOR= Button

Pressing this button will pop up a new window with the all the
movie controls for your current input. The input fields
correspond to the fields in the main gui, but here you
enter a start value in the left column and an end value in
the right column for the values that you want to animate.
The number of frames (input field '#frames') sets the step
size for each pair of start and end value. If you enter
more frames than the system can handle, it will change
automatically to the maximum value that is allowed. Value
for the start and end column can be imported from the main
gui with the and buttons next to 'load:'.
You can also export start and end values to the main gui
with and next to 'Store:'.

Before a movie can be played, you have to build the frames
by pressing the button. After displaying the
frames one by one, you can start the movie by pressing one
of the buttons: << <-> or >> which stands for: play backwards,
play forth and back and play the frames in increasing order.


FRAME= Input field and slider "Frame"

Select your frame number by hand or with the slider.


SPEED= Input field and slider "Speed"

Approximately the number of frames per second. Note that
the higher the speed, the more difficult it becomes to
interact with the system.


BUILD= Button

Before playing a movie, you need to build it. This command
sets the loop rotations and tilts etc. and calls repeatedly
the plot routines.


ANIMATOR= Button

Close current animator window.



Description: Program RENDER creates a surface plot of 2-dim. GIPSY datasets
f(x,y) or it creates an iso surface of 3-dim. data f(x,y,z).
This selection depends on the dimensionality of the
input set (Set field in gui or INSET= keyword).


Coordinate system
-----------------

Your screen is taken at z=0 in an right handed system
xyz so that the +z axis comes out of the screen.
Data is scaled onto a unit cell. The viewpoint of the
eye remains the same after the rotation. Only the
lattice vectors are rotated.


Example: Next keywords display volume rendered GIPSY data
with a slice in RA-DEC through pixel coordinate 0,0,0.
The colours originate from GIDS (See COLOR menu).

APOINT= 0 0 0
BACKRGB= 0.2 0.4 0.7
BOX= -100 -100 -32 100 100 38
CHARSIZE= 1.1
COLOPTION= 1
DIFFUSE= 0
EYE= 8
GO=
INSET= n2403-13
ISOVAL= 2
LIGHT= 0 0 -1
LWIDTH= 2
MONORGB= 0 1 0
NCBAND= 60
PHI= 0
PLOTTER= 0
PLOTTITLE= W.U. '
POLISH= 1
PSFILE= renderplot.ps
ROTATION= 40.00
SHINE= 0
THETA= 0
TILT= 20.00
TRANS= 0
XTITLE= RA---NCP
YTITLE= DEC--NCP
ZMINMAX= 0 3
ZTITLE= FREQ-RHEL



Copyright: Program RENDER is based on the Fortran subroutine library
PGXTALL made by D.S. Sivia of the Rutherford Appleton
Laboratory, Chilton, Oxon OX11 0QX, U.K.
(http://www.isis.rl.ac.uk/dataanalysis/dsplot/pgxtal.htm)
Notes:

Updates: Nov 23, 1998: VOG, Document created.
May 29, 2000: JPT, Eliminated PostScript-specific code.