Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- vx = sin(0.8 * f) * (VIDEOX * 0.5) - (VIDEOX * 0.5) + state;
- vy = cos(1.2 * f) * (VIDEOY * 0.5) - (VIDEOY * 0.5) + state;
- /* draw plasma */
- for(y = 0; y < VIDEOY; y++)
- {
- for(x = 0; x < VIDEOX; x++)
- {
- xx = vx;
- xx += x;
- xx *= xx;
- yy = vy;
- yy += y;
- yy *= yy;
- c1 = x;
- c1 *= 0.02;
- c1 += f;
- c1 += y;
- c1 *= 0.005;
- c1 = sin(c1);
- c2 = xx;
- c2 += yy;
- c2 = sqrt(c2);
- c2 *= 0.02;
- c2 = sin(c2);
- c3 = c1;
- c3 += c2;
- c3 *= 0.5;
- c3 += 1;
- c3 *= 127;
- res = ceil(c3);
- ppixel(screen, x, y, r[res], g[res], b[res]);
- }
- }
Add Comment
Please, Sign In to add comment