Lines Matching defs:fs
98 flamestruct *fs = &flames[screen];
104 fs->width = xwa.width;
105 fs->height = xwa.height;
107 fs->max_levels = batchcount;
108 fs->win = win;
111 XFillRectangle(dsp, win, Scr[screen].gc, 0, 0, fs->width, fs->height);
114 fs->pixcol = halfrandom(Scr[screen].npixels);
115 XSetForeground(dsp, Scr[screen].gc, Scr[screen].pixels[fs->pixcol]);
122 recurse(fs, x, y, l)
123 flamestruct *fs;
130 if (l == fs->max_levels) {
131 fs->total_points++;
132 if (fs->total_points > MAXTOTAL) /* how long each fractal runs */
136 xp = fs->pts[fs->num_points].x = (int) ((fs->width / 2)
138 yp = fs->pts[fs->num_points].y = (int) ((fs->height / 2)
140 fs->num_points++;
141 if (fs->num_points > MAXBATCH) { /* point buffer size */
142 XDrawPoints(dsp, fs->win, Scr[screen].gc, fs->pts,
143 fs->num_points, CoordModeOrigin);
144 fs->num_points = 0;
148 for (i = 0; i < fs->SNUM; i++) {
149 nx = fs->f[0][0][i] * x + fs->f[0][1][i] * y + fs->f[0][2][i];
150 ny = fs->f[1][0][i] * x + fs->f[1][1][i] * y + fs->f[1][2][i];
151 if (i < fs->ANUM) {
155 if (!recurse(fs, nx, ny, l + 1))
167 flamestruct *fs = &flames[screen];
172 if (!(fs->cur_level++ % fs->max_levels)) {
173 XClearWindow(dsp, fs->win);
178 Scr[screen].pixels[fs->pixcol]);
179 if (--fs->pixcol < 0)
180 fs->pixcol = Scr[screen].npixels - 1;
185 fs->SNUM = 2 + (fs->cur_level % 3);
189 fs->ANUM = 0;
191 fs->ANUM = halfrandom(fs->SNUM) + 2;
194 for (k = 0; k < fs->SNUM; k++) {
197 fs->f[i][j][k] = ((double) (random() & 1023) / 512.0 - 1.0);
199 fs->num_points = 0;
200 fs->total_points = 0;
201 (void) recurse(fs, 0.0, 0.0, 0);
203 fs->pts, fs->num_points, CoordModeOrigin);