* other special, indirect and consequential damages.
*
* Revision History:
- * 10-May-97: jwz@netscape.com: turned into a standalone program.
+ * 30-Jul-98: sineswiper@resonatorsoft.com: added curve factor (discovered
+ * while experimenting with the Gauss_Rand function).
+ * 10-May-97: jwz@jwz.org: turned into a standalone program.
* Made it render into an offscreen bitmap and then copy
* that onto the screen, to reduce flicker.
*/
# include "xlock.h" /* from the xlockmore distribution */
#endif /* !STANDALONE */
-ModeSpecOpt strange_opts = {
- 0, NULL, 0, NULL, NULL };
-
/*****************************************************/
/*****************************************************/
static PRM Prm[MAX_PRM];
static PRM *Fold = NULL;
+static int curve;
+
+static XrmOptionDescRec opts[] =
+{
+ {"-curve", ".strange.curve", XrmoptionSepArg, (caddr_t) "10"},
+};
+static OptionStruct desc[] =
+{
+ {"-curve", "set the curve factor of the attractors"},
+};
+
+ModeSpecOpt strange_opts = { 1, opts, 0, NULL, desc };
+
/******************************************************************/
/******************************************************************/
static DBL
Gauss_Rand(DBL c, DBL A, DBL S)
{
- DBL y;
+ DBL y,z;
y = (DBL) LRAND() / MAXRAND;
- y = A * (1.0 - exp(-y * y * S)) / (1.0 - exp(-S));
+ z = curve / 10;
+ y = A * (z - exp(-y * y * S)) / (z - exp(-S));
if (NRAND(2))
return (c + y);
else
{
ATTRACTOR *Attractor;
+ curve = get_integer_resource ("curve", "Integer");
+ if (curve <= 0) curve = 10;
+
if (Root == NULL) {
Root = (ATTRACTOR *) calloc(
MI_NUM_SCREENS(mi), sizeof (ATTRACTOR));