GRATE
Section: Misc. Reference Manual Pages (HIPS)
Updated: 5 March 1991
Index
Return to Main Contents
NAME
grate
- Generates HIPS image from periodic functions (i.e. diffraction gratings).
SYNOPSIS
grate
[-r %d] [-c %d] [-b] [-s] [-i] [-f] [-frm %d] [-fx %d] [-fy %d] [-cx %f] [-cy %f] [-ox %f] [-oy %f] [-sx %f] [-sy %f] [-D[2]] [-h] > output_image
DESCRIPTION
Grate
generates a HIPS image by applying 2 periodic functions (one in the x direction,one in the y direction) to an image filled with the maximum gray value for a
pixel. Many options are available. By use of these, which particular
functions, cycles, offsets, and scaling factors in the x and y directions can
be specified. Byte, short, integer, or float may be specified for the output
image type. The size of the output image may be specified.
OPTIONS
- -h
-
gives a help page similar to this man page
- -r %d
-
number rows in the image (default = 512)
- -c %d
-
number cols in the image (default = 512)
- -n %d
-
number of frames to generate (default = 1)
- -fx %d
-
number of function to apply in x direction (default = 0 = Square Wave)
- -fy %d
-
number of function to apply in y direction (default = 0 = Square wave)
- -cx %f
-
number of cycles to span funct_x over in x direction (default = 0.5)
- -cy %f
-
number of cycles to span funct_y over in y direction (default = 0.5)
- -ox %f
-
offset to be applied to funct_x (i.e. funct_x(..) + ox) (default = 1.0)
- -oy %f
-
offset to be applied to funct_y (i.e. funct_y(..) + oy) (default = 1.0)
- -sx %f
-
scale factor to be applied to funct_x (i.e. sx * (funct_x() + ox) (default = 0.5)
- -sy %f
-
scale factor to be applied to funct_y (i.e. sy * (funct_y() + oy) (default = 0.5)
- -pox %f
-
phase offset applied to argument of funct_x (mult. by PI) (default = 0.0)
- -poy %f
-
phase offset applied to argument of funct_y (mult. by PI) (default = 0.0)
- -b
-
byte (8 bit) format (the default)
- -s
-
for short (16 bit) pixel output
- -i
-
for integer (32 bit) pixel output
- -f
-
for float (single precision) pixel output
- -D
-
gives one level of debugging messages
- -D2
-
causes all debugging messages to be printed
NOTES
***********FUNCTIONS***********
The existing functions are:
- 0
-
Square Wave
- 1
-
Sine Wave
- 2
-
Cosine Wave
- 3
-
Trianglar (Sawtooth) Wave
Adding an additional function is trivial:
- 1
-
Add the function name to the "#define" section of the program.
- 2
-
Add a case statement in fn() for the function according to the ones already there.
- 3
-
Add the function itself.
***********EXAMPLES************
To generate a 1D sin grating in the x direction,
grate -r 256 -c 512 -cx 10 -cy 0 -fx 1 -fy 0 -b -sx .5 -ox 1 -pox 0 | Xhips
Note: due to defaults, the above line is equivalent to
grate -r 256 -cx 10 -fx 1 | Xhips
Other examples:
grate -r 256 -fx 1 -fy 1 -cx 20 -cy 20 -f | scale_gray | Xhips
grate -r 100 -c 100 -fx 3 -fy 2 -cy 10 -sy .25 -oy 2 -pox .5 > weird_grating
grate -r 100 -c 100 -fx 2 -pox .5 -cx 10 | Xhips
SEE ALSO
checker, checkers, checkers2
AUTHOR
Bryan Skene, Lawrence Berkeley Laboratory.
- email:
-
skene@george.lbl.gov
DIAGNOSTICS
BUGS
Report to Bryan Skene.
Index
- NAME
-
- SYNOPSIS
-
- DESCRIPTION
-
- OPTIONS
-
- NOTES
-
- SEE ALSO
-
- AUTHOR
-
- DIAGNOSTICS
-
- BUGS
-
This document was created by
man2html,
using the manual pages.
Time: 01:46:09 GMT, December 05, 2024