Add preview of 1984-2019
The 2020 winners are hinted it, but the source code is not there,
nor are the hints. Someone could look into the HTML and
see what was commented out, but that is not a problem because
WHO won is known and the name of their AWARD is known already.
Moreover a number of the winners have talked about what their
entirs do, so the commented out spoiler text is not a bit problem.
One will find HTML commented out with:
<!-- XXX remove when 2020 is ready
2020 links here
XXX remove when 2020 is ready -->
The "XXX remove when 2020 is ready" string is found at the
start and end comment blocks. Again, soneone could read
what was commented out, but that is OK since most of that
information is known or can be known. The following files
have such HTML comment blocks in them.
./winners.html
./years-spoiler.html
./years.html
In addition, ./all/summary.txt was modified to not
include the 2020 entries for the momemt.
The 2020 winner code AND write-ups are NOT part of this set.
p.s. The all/all.tar.bz2 does not contain the 2020 source code (yet?).
This commit is contained in:
1 parent
28efc67f5d
commit
c0663537cb
1683 files changed
+220064
No files matched your search
@@ -0,0 +1,39 @@
|
||||
# 2006 makefile
|
||||
#
|
||||
# Copyright (C) 2006-2009, Landon Curt Noll, Simon Cooper, Peter Seebach
|
||||
# and Leonid A. Broukhis. All Rights Reserved. Permission for personal,
|
||||
# educational or non-profit use is granted provided this copyright and
|
||||
# notice are included in its entirety and remains unaltered. All other
|
||||
# uses must receive prior permission from the contest judges.
|
||||
|
||||
# Special flags for this entry
|
||||
#
|
||||
#CFLAGS=
|
||||
|
||||
# data files for this entry
|
||||
#
|
||||
DATA= altar box box2 box3 carpet circles cross cross2 cross3 \
|
||||
crystal curve diamonds diamonds2 dragon dragon2 dragon3 \
|
||||
fern gasket gasket_mod gasket_mod2 ioccc maze octagon \
|
||||
pentagon pentagons rings rings2 spirals spirals2 spirals3 \
|
||||
spirals4 squares stars stars2 tree tree2 tree3 tree4 triangle
|
||||
|
||||
|
||||
build: ${ENTRY}
|
||||
|
||||
|
||||
clean:
|
||||
-${RM} ${ENTRY}
|
||||
|
||||
|
||||
clobber: clean
|
||||
|
||||
|
||||
alt:
|
||||
|
||||
|
||||
data:
|
||||
|
||||
|
||||
${ENTRY}: ${ENTRY}.c ${DATA}
|
||||
${CC} ${CFLAGS} ${ENTRY}.c -o ${ENTRY}
|
||||
@@ -0,0 +1,6 @@
|
||||
3 0 0 1 1
|
||||
-.5 0 0 .5 .5 0 .333
|
||||
.5 0 0 .5 .5 0 .333
|
||||
0 -.5 .5 0 .5 .5 .334
|
||||
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
4 0 0 1 1
|
||||
0 -.5 .5 0 .5 0 .25
|
||||
.5 0 0 .5 0 .5 .25
|
||||
-.5 0 0 .5 1 .5 .25
|
||||
.333 0 0 .333 .33 .33 .25
|
||||
@@ -0,0 +1,7 @@
|
||||
5 0 0 1 1
|
||||
0 -.5 .5 0 .5 0 .1
|
||||
.5 0 0 .5 0 .5 .1
|
||||
-.5 0 0 .5 1 .5 .1
|
||||
-.5 0 0 -.5 1 .5 .1
|
||||
.333 0 0 .333 .33 .33 .6
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
3 0 0 1 1
|
||||
.5 0 0 .5 0 0 .333
|
||||
.5 0 0 .5 .5 0 .333
|
||||
0 -.5 .5 0 1 .5 .334
|
||||
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
#To build
|
||||
|
||||
gcc prog.c -o prog
|
||||
@@ -0,0 +1,9 @@
|
||||
8 0 0 1 1
|
||||
.3333333 0 0 .3333333 0 0 .125
|
||||
.3333333 0 0 .3333333 0 .3333333 .125
|
||||
.3333333 0 0 .3333333 0 .6666667 .125
|
||||
.3333333 0 0 .3333333 .3333333 0 .125
|
||||
.3333333 0 0 .3333333 .3333333 .6666667 .125
|
||||
.3333333 0 0 .3333333 .6666667 0 .125
|
||||
.3333333 0 0 .3333333 .6666667 .3333333 .125
|
||||
.3333333 0 0 .3333333 .6666667 .6666667 .125
|
||||
@@ -0,0 +1,15 @@
|
||||
6 -.75 -.75 .75 .75
|
||||
.1 0 0 .1 .5 0 .1667
|
||||
.05 0 0 .05 .2 0 .1666
|
||||
.76604444 .64278761 -.64278761 .76604444 0 0 .1667
|
||||
.76604444 -.64278761 .64278761 .76604444 0 0 .1667
|
||||
.01 0 0 .01 0 0 .1666
|
||||
.30901699 .95105652 -.95105652 .30901699 0 0 .1667
|
||||
.30901699 .95105652 -.95105652 .30901699 0 0 .25
|
||||
.30901699 .95105652 -.95105652 .30901699 0 0 .25
|
||||
-.80901699 .58778525 -.58778525 -.80901699 0 0 .25
|
||||
-.80901699 -.58778525 .58778525 -.80901699 0 0 .25
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
5 -.5 -.5 .5 .5
|
||||
.5 0 0 .2 .25 0 .4
|
||||
.25 0 0 -.25 .125 0 .0
|
||||
0 1 -1 0 0 0 .2
|
||||
0 -1 1 0 0 0 .2
|
||||
.70710678 .70710678 -.70710678 .70710678 0 0 .2
|
||||
|
||||
-1 0 0 -1 0 0 .0
|
||||
// rotations
|
||||
90
|
||||
180
|
||||
270
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
4 -.75 -.75 .75 .75
|
||||
.5 0 0 .2 .25 0 .4
|
||||
.25 0 0 -.25 .125 0 .0
|
||||
0 1 -1 0 0 0 .2
|
||||
0 -1 1 0 0 0 .4
|
||||
|
||||
|
||||
.70710678 .70710678 -.70710678 .70710678 0 0 .0
|
||||
|
||||
-1 0 0 -1 0 0 .0
|
||||
// rotations
|
||||
90
|
||||
180
|
||||
270
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
4 -.75 -.75 .75 .75
|
||||
.5 0 0 .2 .25 0 .4
|
||||
.125 0 0 .125 .125 .125 .1
|
||||
0 1 -1 0 0 0 .2
|
||||
0 -1 1 0 0 0 .3
|
||||
|
||||
|
||||
.70710678 .70710678 -.70710678 .70710678 0 0 .0
|
||||
|
||||
-1 0 0 -1 0 0 .0
|
||||
// rotations
|
||||
90
|
||||
180
|
||||
270
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
4 0 0 1 1
|
||||
.255 0 0 .255 .3726 .6714 .25
|
||||
.255 0 0 .255 .1145 .2232 .25
|
||||
.255 0 0 .255 .6306 .2232 .25
|
||||
.370 -.642 .642 .370 .6356 -.0061 .25
|
||||
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
4 0 -.5 1 .5
|
||||
.3333333 0 0 .3333333 0 0 .25
|
||||
.1666667 -.289 .289 .1666667 .3333333 0 .25
|
||||
.1666667 .289 -.289 .1666667 .5 .289 .25
|
||||
.3333333 0 0 .3333333 .6666667 0 .25
|
||||
@@ -0,0 +1,8 @@
|
||||
5 0 0 1 1
|
||||
.3333 0 0 .3333 .3333 .3333 .2
|
||||
.3333 0 0 .3333 .3333 0 .2
|
||||
.3333 0 0 .3333 0 .3333 .2
|
||||
.3333 0 0 .3333 .6667 .3333 .2
|
||||
.3333 0 0 .3333 .3333 .6667 .2
|
||||
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
4 -.75 -.75 .75 .75
|
||||
.5 0 0 .3 .25 0 .4
|
||||
.25 0 0 -.25 .125 0 .0
|
||||
0 1 -1 0 0 0 .2
|
||||
0 -1 1 0 0 0 .4
|
||||
|
||||
|
||||
.70710678 .70710678 -.70710678 .70710678 0 0 .0
|
||||
|
||||
-1 0 0 -1 0 0 .0
|
||||
// rotations
|
||||
90
|
||||
180
|
||||
270
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
2 -.5 -1 1.5 1
|
||||
.5 -.5 .5 .5 0 0 .5
|
||||
-.5 -.5 .5 -.5 1 0 .5
|
||||
@@ -0,0 +1,3 @@
|
||||
2 -.5 -.5 1.5 1.5
|
||||
.5 -.5 .5 .5 0 0 .5
|
||||
.5 .5 -.5 .5 .5 .5 .5
|
||||
@@ -0,0 +1,3 @@
|
||||
2 -7 -2 7 12
|
||||
.824074 .281428 -.212346 .864198 -1.882290 -.110607 .8
|
||||
.088272 .520988 -.463889 -.377778 .785630 8.095795 .2
|
||||
@@ -0,0 +1,5 @@
|
||||
4 -5.5 0 5.5 11
|
||||
0 0 0 .16 0 0 .01
|
||||
.85 .04 -.04 .85 0 1.6 .85
|
||||
.2 -.26 .23 .22 0 1.6 .07
|
||||
-.15 .28 .26 .24 0 .44 .07
|
||||
@@ -0,0 +1,4 @@
|
||||
3 0 0 1 1
|
||||
.5 0 0 .5 0 0 .33
|
||||
.5 0 0 .5 .5 0 .33
|
||||
.5 0 0 .5 .25 .433 .34
|
||||
@@ -0,0 +1,5 @@
|
||||
4 0 0 1 1
|
||||
.5 0 0 .5 0 0 .25
|
||||
.5 0 0 .5 .5 0 .25
|
||||
.5 0 0 .5 .25 .5 .25
|
||||
.25 0 0 .25 .375 .25 .25
|
||||
@@ -0,0 +1,8 @@
|
||||
4 0 -0.05 1.05 1
|
||||
.5 0 0 .5 0 0 .25
|
||||
.5 0 0 .5 .5 0 .25
|
||||
.5 0 0 .5 .25 .433 .25
|
||||
.15556349 -.15556349 .15556349 .15556349 .475 .18 .25
|
||||
|
||||
// a .22 scale and 25 degrees
|
||||
.19938771 -.092976018 .092976018 .2265 .43 .21 .25
|
||||
@@ -0,0 +1,159 @@
|
||||
# Best Computed Graphics
|
||||
|
||||
Thomas Stewart
|
||||
US
|
||||
|
||||
## Judges' Comments:
|
||||
|
||||
### To build:
|
||||
|
||||
make stewart
|
||||
|
||||
### Try:
|
||||
|
||||
stewart 640 480 FILE
|
||||
|
||||
where FILE is one of:
|
||||
|
||||
altar box box2 box3 build carpet circles cross cross2 cross3
|
||||
crystal curve diamonds diamonds2 dragon dragon2 dragon3
|
||||
fern gasket gasket_mod gasket_mod2 ioccc maze octagon
|
||||
pentagon pentagons rings rings2 spirals spirals2 spirals3
|
||||
spirals4 squares stars stars2 tree tree2 tree3 tree4 triangle
|
||||
|
||||
Note the interesting choice of using a #define in the output.
|
||||
The selection of input files makes this one endlessly fun to play
|
||||
with. Many image viewers will be able to read the results, as will
|
||||
a reasonably experienced user who can parse formats in their mind. :-)
|
||||
|
||||
## Selected Author's Comments:
|
||||
|
||||
### Execution
|
||||
|
||||
The program should be run with the following
|
||||
|
||||
prog <m> <n> <ifs>
|
||||
m = The size of the picture (picture will be m X m in size).
|
||||
n = The number of iterations to run (More will make for a
|
||||
clearer picture).
|
||||
ifs = The file to use as input.
|
||||
|
||||
The program will spit out a xbm image on standard out.
|
||||
Minimal checking is done on the arguments mainly that there are 3.
|
||||
Wrong arguments will cause the program to bomb out.
|
||||
|
||||
Ex:
|
||||
|
||||
./stewart 1024 1000000 gasket > gasket.xbm
|
||||
|
||||
### Compilation/Testing
|
||||
|
||||
The program compiles without warning with gcc -ansi -Wall.
|
||||
lint also seems to like the code. This must be a bug in lint.
|
||||
|
||||
The program was tested on Linux on a x86 and NetBSD on an alpha.
|
||||
Only gcc was tested for compilers (4.0.3 and 3.3.3)
|
||||
|
||||
|
||||
### Entry originality
|
||||
|
||||
In looking through past winners. THere seem to be only 2 (92 and 94)
|
||||
that generated fractals. Both of those were Julia fractals from the
|
||||
Mandlebrot set. Those do make for some pretty pictures. I figured
|
||||
it would be nice to add some more fractals to the IOCCC, since one
|
||||
hasn't won since 1994.
|
||||
|
||||
Instead of something that has already won I figured I would go with
|
||||
another kind of fractal, those from the Iterated Function System (IFS).
|
||||
|
||||
|
||||
### Input File
|
||||
|
||||
The format of the input file is as follows:
|
||||
|
||||
<num ifs> <x min> <y min> <x max> <y max>
|
||||
<a> <b> <c> <d> <e> <f> <p>
|
||||
<a> <b> <c> <d> <e> <f> <p>
|
||||
<a> <b> <c> <d> <e> <f> <p>
|
||||
.
|
||||
.
|
||||
.
|
||||
|
||||
This file describe an IFS.
|
||||
|
||||
One of the most well known would be the Sierpinski Gasket:
|
||||
|
||||
3 0 0 1 1
|
||||
.5 0 0 .5 0 0 .33
|
||||
.5 0 0 .5 .5 0 .33
|
||||
.5 0 0 .5 .25 .433 .34
|
||||
|
||||
or the fern:
|
||||
|
||||
4 -5.5 0 5.5 11
|
||||
0 0 0 .16 0 0 .01
|
||||
.85 .04 -.04 .85 0 1.6 .85
|
||||
.2 -.26 .23 .22 0 1.6 .07
|
||||
-.15 .28 .26 .24 0 .44 .07
|
||||
|
||||
etc...
|
||||
|
||||
Included in my submission will be a tar ball of some ifs files,
|
||||
including one that attempts (not very well) to mimic the IOCCC logo
|
||||
(I figure it can't hurt to attempt to suck up, right?)
|
||||
|
||||
I would try to explain how to create an IFS file but I am not smart
|
||||
enough to condense it down to something that is coherent.
|
||||
|
||||
Basically the break down is:
|
||||
num is the number of equations in the IFS.
|
||||
x (min, max) and y (min, max) define the ranges that will be displayed
|
||||
in the xbm.
|
||||
|
||||
The a b c d e f are used to iterative find points that lie in the IFS
|
||||
from the algorithm
|
||||
|
||||
x = a * prevx + b * prevy + e;
|
||||
y = c * prevx + d * prevy + f;
|
||||
|
||||
The p is for the probability that the equation will run.
|
||||
|
||||
|
||||
### Obfuscations
|
||||
|
||||
The main obfuscation is using a void* as my only variable (aside from
|
||||
the args for main). This causes me to do much casting and porinter
|
||||
arithmetic to get the correct location and completely does away with
|
||||
any meaning the variables could have. This also makes the code more
|
||||
convientient to read in the current form vs preprocessed. After
|
||||
preprocessing there will almost be 300 casts in the code and I believe
|
||||
they are all needed... (I would double check but my brain is kinda
|
||||
mushy right now from chasing down a segfault in the code.)
|
||||
|
||||
The other main obfuscation being that it generates an IFS. Which isn't
|
||||
all that common for a program to do. I mean google only has something
|
||||
like 66,000 hits for "Iterated function system" so that means it is
|
||||
obscure, right?
|
||||
|
||||
Some other minor obfuscations:
|
||||
Since I formatted it as a "normal" program I did inject something that
|
||||
on first glance will looks like a possible bug. (When you run it through
|
||||
a c-beautifier this will be removed.)
|
||||
|
||||
I decided not to use rand() to generate a pseudo random number. Instead
|
||||
I use xor and bit shifting.
|
||||
|
||||
The input file is used to make the program flexible and to allow it to
|
||||
generate many different IFSs. This has the added bonus of hiding
|
||||
information about the algorithm.
|
||||
|
||||
The use of many magic numbers. I figured if I get yelled about them in
|
||||
a review they must be bad, right?
|
||||
|
||||
Silly things:
|
||||
The use of decimal numbers where one would expect hex. Octal numbers
|
||||
where one would expect decimal. Shifts instead of devides.
|
||||
|
||||
Using xbm as the output format. This might confuse someone who doesn't
|
||||
have an X background. It happens to be easy but is probably a very bad
|
||||
choice from a filesize standpoint. 1024x1024 image is 641k in size.
|
||||
@@ -0,0 +1,18 @@
|
||||
14 -.5 -3.5 10.5 7.5
|
||||
0 .25 .4 0 0 0 .071428571
|
||||
.09 0 0 .24 2.25 3 .071428571
|
||||
.09 0 0 .24 2.25 0 .071428571
|
||||
0 .25 .2 0 1.5 1 .071428571
|
||||
0 .25 .2 0 3 1 .071428571
|
||||
.09 0 0 .24 5 3 .071428571
|
||||
.09 0 0 .24 5 0 .071428571
|
||||
0 .25 .2 0 4.5 1 .071428571
|
||||
.09 0 0 .24 7 3 .071428571
|
||||
.09 0 0 .24 7 0 .071428571
|
||||
0 .25 .2 0 6.5 1 .071428571
|
||||
.09 0 0 .24 9 3 .071428571
|
||||
.09 0 0 .24 9 0 .071428571
|
||||
0 .25 .2 0 8.5 1 .071428571
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
3 0 0 1 1
|
||||
.3333333 0 0 .3333333 .3333333 .6666667 .3333333
|
||||
0 .3333333 1 0 .6666667 0 .3333333
|
||||
0 -.3333333 1 0 .3333333 0 .3333333
|
||||
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
3 -.75 -.75 .75 .75
|
||||
.01 0 0 .4 .3 0 .33
|
||||
.76604444 .64278761 -.64278761 .76604444 0 0 .33
|
||||
.76604444 -.64278761 .64278761 .76604444 0 0 .34
|
||||
.30901699 .95105652 -.95105652 .30901699 0 0 .25
|
||||
.30901699 .95105652 -.95105652 .30901699 0 0 .25
|
||||
.30901699 .95105652 -.95105652 .30901699 0 0 .25
|
||||
-.80901699 .58778525 -.58778525 -.80901699 0 0 .25
|
||||
-.80901699 -.58778525 .58778525 -.80901699 0 0 .25
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
5 -.4 -.25 1.6 1.75
|
||||
.382 0 0 .382 0 0 .2
|
||||
.382 0 0 .382 .618 0 .2
|
||||
.382 0 0 .382 .809 .588 .2
|
||||
.382 0 0 .382 .309 .951 .2
|
||||
.382 0 0 .382 -.191 .588 .2
|
||||
@@ -0,0 +1,9 @@
|
||||
4 -.75 -.75 .75 .75
|
||||
.5 0 0 .4 .25 0 .25
|
||||
.30901699 .95105652 -.95105652 .30901699 0 0 .25
|
||||
-.80901699 .58778525 -.58778525 -.80901699 0 0 .25
|
||||
-.80901699 -.58778525 .58778525 -.80901699 0 0 .25
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
4 -.5 -.5 .5 .5
|
||||
.5 0 0 -.5 0 -.25 .2
|
||||
-.5 -.8660254 .8660254 -.5 0 0 .3
|
||||
.25 0 0 -.25 0 .125 .2
|
||||
-.5 .8660254 -.8660254 -.5 0 0 .3
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
4 -.75 -.75 .75 .75
|
||||
.1 0 0 .1 .3 0 .25
|
||||
.76604444 .64278761 -.64278761 .76604444 0 0 .25
|
||||
.76604444 -.64278761 .64278761 .76604444 0 0 .25
|
||||
.30901699 .95105652 -.95105652 .30901699 0 0 .25
|
||||
.30901699 .95105652 -.95105652 .30901699 0 0 .25
|
||||
.30901699 .95105652 -.95105652 .30901699 0 0 .25
|
||||
-.80901699 .58778525 -.58778525 -.80901699 0 0 .25
|
||||
-.80901699 -.58778525 .58778525 -.80901699 0 0 .25
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
3 -8 -3 8 13
|
||||
0.787879 -0.424242 0.242424 0.859848 1.758647 1.408065 0.90
|
||||
-0.121212 0.257576 0.151515 0.053030 -6.721654 1.377236 0.05
|
||||
0.181818 -0.136364 0.090909 0.181818 6.086107 1.568035 0.05
|
||||
@@ -0,0 +1,18 @@
|
||||
2 -.75 -1 1.25 1
|
||||
.25 0 0 .25 .75 0 .49
|
||||
.77942286 .45 -.45 .77942286 0 0 .49
|
||||
-.45 .77942286 -.77942286 -.45 0 0 .1
|
||||
.76604444 .64278761 -.64278761 .76604444 0 0 .1
|
||||
.76604444 -.64278761 .64278761 .76604444 0 0 .1
|
||||
.01 0 0 .01 0 0 .1
|
||||
.30901699 .95105652 -.95105652 .30901699 0 0 .1
|
||||
-.37460659 -.92718385 .92718385 -.37460659 0 0 .1
|
||||
.99026807 -.1391731 .1391731 .99026807 0 0 .1
|
||||
.8480481 .52991926 -.52991926 .8480481 0 0 .1
|
||||
1 0 0 -1 0 0 .1
|
||||
-.80901699 .58778525 -.58778525 -.80901699 0 0 .25
|
||||
-.80901699 -.58778525 .58778525 -.80901699 0 0 .25
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
5 -1 -1 1 1
|
||||
.333 0 0 .333 .6 -.6 .25
|
||||
-.3 0 0 -.3 -.25 -.75 .25
|
||||
.7517541 .27361611 -.27361611 .7517541 0 0 .5
|
||||
.77036162 .35922552 -.35922552 .77036162 0 0 .5
|
||||
.7878462 .13891854 -.13891854 .7878462 0 0 .5
|
||||
.8 0 0 .8 0 0 .2
|
||||
.70710678 .70710678 -.70710678 .70710678 0 0 .2
|
||||
.70710678 -.70710678 .70710678 .70710678 0 0 .2
|
||||
-.70710678 .70710678 -.70710678 -.70710678 0 0 .2
|
||||
-.70710678 -.70710678 .70710678 -.70710678 0 0 .2
|
||||
|
||||
-1 0 0 -1 0 0 .0
|
||||
// rotations
|
||||
20 * .8
|
||||
25 * .85
|
||||
10 * .8
|
||||
270
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
5 -1.1 -1.5 1.1 .5
|
||||
.333 0 0 .333 .6 -.6 .25
|
||||
-.060776862 -.34468271 .34468271 -.060776862 -.75 -.85 .25
|
||||
.72504623 .33809461 -.33809461 .72504623 0 0 .5
|
||||
.77036162 .35922552 -.35922552 .77036162 0 0 .5
|
||||
.7517541 .27361611 -.27361611 .7517541 0 0 .5
|
||||
.7878462 .13891854 -.13891854 .7878462 0 0 .5
|
||||
.8 0 0 .8 0 0 .2
|
||||
.70710678 .70710678 -.70710678 .70710678 0 0 .2
|
||||
.70710678 -.70710678 .70710678 .70710678 0 0 .2
|
||||
-.70710678 .70710678 -.70710678 -.70710678 0 0 .2
|
||||
-.70710678 -.70710678 .70710678 -.70710678 0 0 .2
|
||||
|
||||
-1 0 0 -1 0 0 .0
|
||||
// rotations
|
||||
25 * .8
|
||||
25 * .85
|
||||
20 * .8
|
||||
10 * .8
|
||||
270
|
||||
|
||||
|
||||
full window
|
||||
@@ -0,0 +1,8 @@
|
||||
5 0 0 1 1
|
||||
.4 0 0 .4 0 0 .2
|
||||
.4 0 0 .4 0 .6 .2
|
||||
.4 0 0 .4 .6 0 .2
|
||||
.4 0 0 .4 .6 .6 .2
|
||||
.2 0 0 .2 .4 .4 .2
|
||||
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
3 0 0 1 1
|
||||
.5 0 0 .5 .25 .25 .333
|
||||
0 .35 .75 0 0 .125 .333
|
||||
0 .35 .75 0 .65 .125 .334
|
||||
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
4 -.75 -.75 .75 .75
|
||||
.5 0 0 .2 .3 0 .25
|
||||
.30901699 .95105652 -.95105652 .30901699 0 0 .25
|
||||
-.80901699 .58778525 -.58778525 -.80901699 0 0 .25
|
||||
-.80901699 -.58778525 .58778525 -.80901699 0 0 .25
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#define P printf
|
||||
#define F(x,y) ((FILE*)Z(x,y))
|
||||
#define U(x,y) ((unsigned char*)Z(x,y))
|
||||
#define X(x,y,z) ((double*)x+y+7*z)
|
||||
#define Y(x,y) ((double*)x+y)
|
||||
#define Z(x,y) *(long*)Y(x,y)
|
||||
#define R(x,y) (x=y,y^=(y<<11),y^=(y>>15),y^=(y<<3),(x+y)&0x7fffffff)
|
||||
|
||||
int main(int c,char**o)
|
||||
{
|
||||
void* v=malloc(0170UL);
|
||||
memset(v,0,0170UL);
|
||||
if(c!=4)P("bad args\n"),exit(1);
|
||||
Z(v,2)=atoi(o[1]);
|
||||
Z(v,1)=atoi(o[2]);
|
||||
Z(v,0)=Z(v,2)*Z(v,2)>>3;
|
||||
Z(v,6)=(long)malloc(Z(v,0));
|
||||
memset((void*)Z(v,6),0,Z(v,0));
|
||||
Z(v,13)=(long)fopen(o[3],"r");
|
||||
fscanf(F(v,13),"%ld",(long*)Y(v,3));
|
||||
Z(v,8)=(long)malloc(050+Z(v,3)*070);
|
||||
Z(Z(v,8),0)=Z(v,3);
|
||||
fscanf(F(v,13),"%lf %lf %lf %lf",Y(Z(v,8),1),Y(Z(v,8),2),Y(Z(v,8),3),Y(Z(v,8),4));
|
||||
for(Z(v,3)=0;Z(v,3)<Z(Z(v,8),0);
|
||||
fscanf(F(v,13),"%lf %lf %lf %lf %lf %lf %lf",X(Z(v,8),5,Z(v,3)),
|
||||
X(Z(v,8),6,Z(v,3)),X(Z(v,8),7,Z(v,3)),X(Z(v,8),8,Z(v,3)),
|
||||
X(Z(v,8),9,Z(v,3)),X(Z(v,8),10,Z(v,3)),X(Z(v,8),11,Z(v,3))),
|
||||
++Z(v,3));
|
||||
fclose(F(v,13));
|
||||
Z(v,14)=8675309;
|
||||
for(Z(v,3)=0;Z(v,3)<Z(v,1);++Z(v,3))
|
||||
{
|
||||
*Y(v,7)=(R(Z(v,4),Z(v,14))/(double)0x7fffffff),Z(v,5)=0;
|
||||
for(Z(v,4)=0;Z(v,4)<Z(Z(v,8),0);++Z(v,4),++Z(v,5))
|
||||
if(*Y(v,7)<*X(Z(v,8),11,Z(v,5)))
|
||||
break;
|
||||
else
|
||||
*Y(v,7)-=*X(Z(v,8),11,Z(v,5));
|
||||
*Y(v,11)=*X(Z(v,8),5,Z(v,5))**Y(v,9)+*X(Z(v,8),6,Z(v,5))**Y(v,10)+*X(Z(v,8),9,Z(v,5));
|
||||
*Y(v,12)=*X(Z(v,8),7,Z(v,5))**Y(v,9)+*X(Z(v,8),8,Z(v,5))**Y(v,10)+*X(Z(v,8),10,Z(v,5));
|
||||
*Y(v,9)=*Y(v,11);
|
||||
*Y(v,10)=*Y(v,12);
|
||||
if(Z(v,3)>10)
|
||||
if((*Y(v,9)>=*Y(Z(v,8),1))&&(*Y(v,9)<=*Y(Z(v,8),3))&&(*Y(v,10)>=*Y(Z(v,8),2))&&(*Y(v,10)<=*Y(Z(v,8),4)))
|
||||
*Y(v,11)=(*Y(v,9)+-*Y(Z(v,8),1))/(*Y(Z(v,8),3)-*Y(Z(v,8),1)),
|
||||
*Y(v,12)=(*Y(v,10)+-*Y(Z(v,8),2))/(*Y(Z(v,8),4)-*Y(Z(v,8),2)),
|
||||
*(U(v,6)+((((long)(Z(v,2)-*Y(v,12)*Z(v,2))*Z(v,2))+(long)(*Y(v,11)*Z(v,2)))>>3))|=
|
||||
1<<((((long)(Z(v,2)-*Y(v,12)*Z(v,2))*Z(v,2))+(long)(*Y(v,11)*Z(v,2)))&7);
|
||||
}
|
||||
P("#define x_width %ld\n#define x_height %ld\nstatic char x_bits[] = {\n",Z(v,2),Z(v,2));
|
||||
for(Z(v,3)=0;Z(v,3)<Z(v,0);++Z(v,3))
|
||||
{
|
||||
if(Z(v,3))
|
||||
P(",");
|
||||
P("0x%02x",*(U(v,6)+Z(v,3)));
|
||||
}
|
||||
P("};\n");
|
||||
free(Y(Z(v,6),0));
|
||||
free(Y(Z(v,8),0));
|
||||
free(v);
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
4 -.25 0 .25 .5
|
||||
0 0 0 .5 0 0 .05
|
||||
.42 -.42 .42 .42 0 .2 .4
|
||||
.42 .42 -.42 .42 0 .2 .4
|
||||
.1 0 0 .1 0 .2 .15
|
||||
@@ -0,0 +1,8 @@
|
||||
7 -1 -1 1 1
|
||||
0.0500 0.0000 0.0000 0.4000 -0.0600 -0.4700 .14285714
|
||||
-0.0500 0.0000 0.0000 -0.4000 -0.0600 -0.4700 .14285714
|
||||
0.0300 -0.1400 0.0000 0.2600 -0.1600 -0.0100 .14285714
|
||||
-0.0300 0.1400 0.0000 -0.2600 -0.1600 -0.0100 .14285714
|
||||
0.5600 0.4400 -0.3700 0.5100 0.3000 0.1500 .14285714
|
||||
0.1900 0.0700 -0.1000 0.1500 -0.2000 0.2800 .14285714
|
||||
-0.3300 -0.3400 -0.3300 0.3400 -0.5400 0.3900 .14285714
|
||||
@@ -0,0 +1,6 @@
|
||||
3 0 0 1 1
|
||||
0 -.5 .5 0 .5 0 .3333333
|
||||
0 .5 -.5 0 .5 .5 .3333333
|
||||
.5 0 0 .5 .25 .5 .3333334
|
||||
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
10 -.75 -.75 .75 .75
|
||||
.5 0 0 .5 .25 0 .15
|
||||
.5 0 0 .5 0 0 .15
|
||||
.25 0 0 .75 .25 0 .2
|
||||
0 .1 -.8 0 0 0 .2
|
||||
0 -.1 .8 0 0 0 .1
|
||||
.5 0 0 1 0 0 .1
|
||||
.5 0 0 1 0 0 .1
|
||||
0 0 0 0 0 0 0
|
||||
0 0 0 0 0 0 0
|
||||
0 0 0 0 0 0 0
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
3 0 0 1 1
|
||||
.5 0 0 .5 0 0 .33
|
||||
.5 0 0 .5 0 .5 .33
|
||||
.5 0 0 .5 .5 0 .34
|
||||
Reference in new issue
Block a user