
beginSETUP

// MODE 'Add' can be applied
fl_modeAdd	= 1

// MODE 'Compare' can be applied
fl_modeCompare	= 1

// MODE 'Force' can be applied
fl_modeForce	= 0

// Computes points only within modifier square radius
fl_squareRadius	= 0

// Computes points only within modifier radius
fl_Radius	= 0

// Height can't never be negative
fl_positiveHeight	= 0

description = This will raise or decrease an area with the shape of an hill.\n\nPlay with the Add mode and give a negative height to make depressions.

endSETUP

//////////////////////////////////////////////
//
//	PX PY PZ - current point to modify
//	MX MY    - modifier position
//	MH MR    - modifier height and radius
//	MAXZ     - max z value of the grid
//	MINZ     - min z value of the grid
//	PI       - pigreco 3.14 etc etc
//	NEWZ     - when you want, load here the new value for Z
//
// this modifier does:	NEWZ = MH / ( 1 + sqr[ sqrt{sqr(PX-MX)+sqr(PY-MY)} / MR ] )
//
beginCODE
	
	ex_dist2 d,PX,PY,MX,MY

	sqr MR
	div d,MR
	add d,1		
	
	mov NEWZ,MH
	div NEWZ,d

endCODE
