This is a monochrome pattern displayed after the "preburst image", containing up to 4000 individually moving pixels. Each pixel has a starting coordinate and an initial velocity (that is, all pixels move in straight lines).
The program is invoked under DOS by typing:
C:\PROMPT> K5SPLODE INFILE OUTFILE
- OUTFILE: a 5MSC0004.BIN style file that can be imported by ModKeen.
- INFILE: a text file where each line has the following form:
p start.bmp <X(x,y);Y(x,y)>
- p: an integer from 0 to 4000 that limits how many points are in this pointset. The sum of p from all lines must be < 4000.
- start.bmp: a 320x200 pixel 16-color or 2-color bitmap. All non-zero (i.e., non black) pixels will be counted as points. If the number of non-zero pixels in start.bmp exceeds p, then pixels will be randomly discarded from start.bmp until the limit is satisfied.
- <X(x,y);Y(x,y)>: The respective x- and y-components that describe a vector field F(x,y) = X(x,y)i + Y(x,y)j, where i and j are the unit vectors <1,0> and <0,1>. The vector field describes the velocities of every point in the pointset. All velocities are constant throughout the length of the explosion. F(x,y) is evaluated for each point by passing the x and y coordinates of the point as arguments. We consider the origin of the vector field to be at the center of the bitmap (screen 160,100), and the positive X and Y directions of the vector field to be up and right on the screen, respectively.
You may comment out a line by placing a # in the first column of text.
Mathematical operations you can perform. Take care with regards to division by zero and function domains.
|addition:||a + b|
|subtraction:||a - b|
|multiplication:||a * b|
|division:||a / b (careful not to divide by 0!)|
|exponentiation:||a ^ b|
Exponential & Logarithmic Functions
|Base 10 log||log(a)|
|Inverse Hyperbolic Sine||sinh(a)|
|Inverse Hyperbolic Cosine||cosh(a)|
|Inverse Hyperbolic Tangent||tanh(a)|
Rounding, Absolute Value, and Remainder Functions
|Sign:||1 if a>0, -1 if a<0, 0 if a=0 sgn(a)|
|Random Number in -a<x<a||rnd(x)|
You can use these constants in your equations
Runnning the program with input file instr.txt
C:\PROMPT>K5SPLODE.EXE INSTR.TXT 5MSC0004.BIN
Check out INSTR.TXT for 3 example pointsets:
#Examples. Uncomment the lines to include in 5MSC0004.BIN #(You can include multiple lines at once). #Example 1: This slides points in test1.bmp up and left, one pixel per frame #500 test1.bmp <-1;1> #Example 2: This replicates the original galaxy burst #You can change "3.2" and "2.0" to speed up the respective x and y speeds 1000 test2.bmp <3.2*x/sqrt(x^2+y^2);2.0*y/sqrt(x^2+y^2)> #Example 3: Interesting pattern. #2500 test3.bmp <0.01*y/cos(x*2*Pi/scw);0.005*x/sin(y*2*Pi/sch)>