w32tex
About: TeX Live provides a comprehensive TeX system including all the major TeX-related programs, macro packages, and fonts that are free software. Windows sources.
  Fossies Dox: w32tex-src.tar.xz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

pgmcrater.c File Reference
#include <math.h>
#include "pgm.h"
Include dependency graph for pgmcrater.c:

Go to the source code of this file.

Macros

#define M_PI   3.14159265358979323846
 
#define Cast(low, high)   ((low)+((high)-(low)) * ((rand() & 0x7FFF) / arand))
 
#define FALSE   0
 
#define TRUE   1
 
#define V   (void)
 
#define SCRX   screenxsize /* Screen width */
 
#define SCRY   screenysize /* Screen height */
 
#define SCRGAMMA   1.0 /* Display gamma */
 
#define ImageGamma   0.5 /* Inherent gamma of mapped image */
 
#define RGBQuant   255
 
#define Auxadr(x, y)   ((unsigned short *) (aux + ((((y)) * SCRX) + (x))))
 
#define rollmin   0.9
 

Typedefs

typedef int Boolean
 

Functions

static void gencraters ()
 
static void initseed ()
 
int main (int argc, argv)
 

Variables

static int screenxsize = 256
 
static int screenysize = 256
 
static double dgamma = 1.0
 
static double arand = 32767.0
 
static long ncraters = 50000L
 
static double CdepthPower = 1.5
 
static double DepthBias = 0.707107
 

Macro Definition Documentation

◆ Auxadr

#define Auxadr (   x,
  y 
)    ((unsigned short *) (aux + ((((y)) * SCRX) + (x))))

◆ Cast

#define Cast (   low,
  high 
)    ((low)+((high)-(low)) * ((rand() & 0x7FFF) / arand))

Definition at line 60 of file pgmcrater.c.

◆ FALSE

#define FALSE   0

Definition at line 65 of file pgmcrater.c.

◆ ImageGamma

#define ImageGamma   0.5 /* Inherent gamma of mapped image */

Definition at line 78 of file pgmcrater.c.

◆ M_PI

#define M_PI   3.14159265358979323846

Definition at line 55 of file pgmcrater.c.

◆ RGBQuant

#define RGBQuant   255

◆ rollmin

#define rollmin   0.9

◆ SCRGAMMA

#define SCRGAMMA   1.0 /* Display gamma */

Definition at line 74 of file pgmcrater.c.

◆ SCRX

#define SCRX   screenxsize /* Screen width */

Definition at line 72 of file pgmcrater.c.

◆ SCRY

#define SCRY   screenysize /* Screen height */

Definition at line 73 of file pgmcrater.c.

◆ TRUE

#define TRUE   1

Definition at line 66 of file pgmcrater.c.

◆ V

#define V   (void)

Definition at line 68 of file pgmcrater.c.

Typedef Documentation

◆ Boolean

typedef int Boolean

Definition at line 64 of file pgmcrater.c.

Function Documentation

◆ gencraters()

◆ initseed()

static void initseed ( )
static

Definition at line 90 of file pgmcrater.c.

References i, rand, srand, time(), and V.

Referenced by main().

◆ main()

Variable Documentation

◆ arand

double arand = 32767.0
static

Definition at line 83 of file pgmcrater.c.

◆ CdepthPower

double CdepthPower = 1.5
static

Definition at line 85 of file pgmcrater.c.

Referenced by gencraters().

◆ DepthBias

double DepthBias = 0.707107
static

Definition at line 86 of file pgmcrater.c.

Referenced by gencraters(), and main().

◆ dgamma

double dgamma = 1.0
static

Definition at line 82 of file pgmcrater.c.

Referenced by gencraters(), and main().

◆ ncraters

long ncraters = 50000L
static

Definition at line 84 of file pgmcrater.c.

Referenced by gencraters(), and main().

◆ screenxsize

int screenxsize = 256
static

Definition at line 80 of file pgmcrater.c.

Referenced by main().

◆ screenysize

int screenysize = 256
static

Definition at line 81 of file pgmcrater.c.

Referenced by main().