-
Notifications
You must be signed in to change notification settings - Fork 12
/
warp_text.c
296 lines (289 loc) · 14.9 KB
/
warp_text.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
/* This defines a char * to the text of The Warper
* project description. It's a long text.
*/
/************************************************************************************/
char *Command_summary_string[] =
{
"\n\n*** SUMMARY OF OPTIONS ***\n",
"\n All options should be preceded with a - (dash). \n",
"\nExecute this program with any of the following arguments from the command line:\n",
"\nd <n> = Set delay after each picture, where <n> is a number of seconds to pause.\n",
"\ns <n> = Set the speed of the palette rotation. Just experiment with this one.\n",
"n = No Logo! This option tells acidwarp not to display the logo at startup.\n",
"w = Print info on building \"The Warper\". You may wish to redirect to\n",
" a file or pipe through DOS's MORE command.\n",
" ? = Print Help and Explaination info.\n",
"\n*** CTRL-BREAK will exit the program at any time. ***\n",
"\nThis program is free and public domain. It may not be\n",
"used for profit. I am not responsible for physical, personal,\n",
"property, or brain damage. Enjoy!\n",
" -- Noah Spurrier\n",
""
};
/************************************************************************************/
char *Help_string[] =
{
"\n",
" WHAT IS ACID WARP ?\n",
"\n",
"Acid Warp falls into the genre of programs known as kaleidoscopes or pretty\n",
"picture programs. Acid Warp generates pictures by evaluating a simple\n",
"mathematical formula over a two dimensional range and plotting the value at\n",
"some point as a color. Acid Warp selects from over thirty formulae to use\n",
"for a picture. A color palette pattern is also selected for each picture.\n",
"While the picture is displayed, the color palette is rotated in a variety\n",
"of ways. A crude timer-interrupt multitasking system is used to rotate the\n",
"color palette while Acid Warp works on the next picture. Picture generation\n",
"is extremely fast due to the elimination of any floating point variables.\n",
"Look-up-tables or approximations are used when Square Roots, Sines,\n",
"Arctangents, or other functions are necessary.\n",
"\n",
"Acid Warp has only a few options described in detail below. Enter them as\n",
"arguments when executing Acid Warp from the command line.\n",
"\n",
"'d' - Option for Delay\n",
" On fast machines the pictures may be generated so quickly that you\n",
" will not have time to appreciate each picture. If this is the case\n",
" then a delay may be added after each picture. Use the 'd' option\n",
" followed by a number of seconds to delay. DO add a space between\n",
" the 'd' and the number of seconds. The default delay is 20 seconds.\n",
"\n",
"'n' - This option tells acidwarp not to display the logo at starup.\n",
#ifdef HAVE_FULLSCREEN
"\n",
"'f' - Option for starting in full screen mode.\n",
"\n",
"'k' - Option for using desktop resolution in full screen mode.\n",
#endif
"\n",
"'u' - Option for disabling scaling of images in floating point\n",
" image generator.\n",
"\n",
"'o' - Option for using original image generator without floating\n",
" point computation or scaling. It is much faster.\n",
"\n",
"'s' - Speed. This option controls the speed at which the palettes rotate. \n",
"\n",
"'w' - Option to print \"The Warper\" text file\n",
" It is possible to take the pictures from Acid Warp and project them\n",
" onto a wall or movie screen using a very simple and inexpensive setup\n",
" that I have called \"The Warper\". The Warper allows you to view your\n",
" Acid Warp picture on a wall or screen just as you would view a slide\n",
" show or movie. You can get instructions for building The Warper by\n",
" selecting the 'w' option. These instructions fill quite a few\n",
" screens, so you may wish to redirect to a file or printer or you may\n",
" wish to pipe it through DOS's MORE command. I highly recommend\n",
" building The Warper. All you need are two cardboard boxes and a\n",
" Fresnel lens (sources for this are listed.) The Warper is lots of\n",
" fun; it is cheap; and anyone can build it in half an hour.\n",
""
};
/************************************************************************************/
char *The_warper_string[] =
{
"\n",
" ####### # #\n",
" ## ## ##\n",
" ## ## ##\n",
" ## ## # ##\n",
" ### ### # ######\n",
" ### ####### ###\n",
" ### ### # ###\n",
" ### ### # #######\n",
"\n",
" # # # # # # #\n",
" ## ## ### ### ### ## ###\n",
" ## ## ## # ## # ## # ## ## #\n",
" ## ## ## # ## # ## # ## ## #\n",
" ### # ## ###### ###### ###### ###### ######\n",
" ### ## ### ### # #### ### ### ####\n",
" ### ### ### ### # ### ## ### ### ### ##\n",
" ##### #### ### # ### # ### ####### ### #\n",
"\n",
"\n",
"\n",
"\n",
"\n",
" (c)Copyright 1992 by Noah Spurrier\n",
"\n",
"---------------------------\n",
" Description of The Warper\n",
"---------------------------\n",
"The Warper is a simple device for enhancing the pleasure that you get from\n",
"running your Acid Warp program. The Warper is a single lens projector that\n",
"attaches to your computer monitor and allows you to enlarge and project the\n",
"Acid Warp images onto a wall, movie screen, white bed-sheet, etc. The\n",
"device should cost you less than $20.00.\n",
"\n",
"I will give only a general schematic for building The Warper. The design is\n",
"quite simple and it will be easy for you to fit the design to your supplies\n",
"and equipment size. The only special item that you will need is one large\n",
"Fresnel lens. A Fresnel lens is usually encountered as a thin, floppy sheet\n",
"of plastic that has the same optical properties as a glass lens many inches\n",
"thicker. You may use a true glass lens. For our purposes we need a lens about\n",
"6 inches or more in diameter. A glass lens this size would be very heavy and\n",
"expensive, but if you have one on hand then try to use it because it should\n",
"give a better image. The following instructions assume that you will be using\n",
"a Fresnel lens.\n",
"\n",
"You will need a lens about 6\" x 6\". You can make The Warper with a smaller\n",
"lens, but it will be less effective. You can certainly use a larger lens.\n",
"I will give sources of cheap Fresnel lenses at the end of this text. Don't\n",
"worry about focal length. For surplus and hobby grade equipment, you must\n",
"take what you can get. A focal length of about 5 inches is fine. Often you\n",
"won't even be told what the focal length is. Only the focus will have to be\n",
"adjusted to compensate for the focal length of your lens.\n",
"\n",
"When you get your Fresnel lens, take it and your computer into a dark room.\n",
"Activate the computer and execute the Acid Warp program. Now Aim the\n",
"computer monitor at a white wall, movie screen, white sheet, etc. The\n",
"plane of the monitor screen should be roughly parallel to the plane of the\n",
"projection surface. Now hold your lens in front of the computer monitor.\n",
"The lens should also be roughly parallel to the projection surface and the\n",
"computer monitor. As you vary the distance between the lens and the monitor\n",
"you will be able to focus an upside-down image from the monitor onto the\n",
"projection surface. The exact distance between the screen and the lens will\n",
"vary on how far your monitor is from the projection surface and the focal\n",
"length of your lens. For my setup, a wall is about 12 feet away and the\n",
"lens is held about a foot from the screen. The image covers most of the\n",
"wall. You may never be able to get the focus good enough to read 80 column\n",
"text, but you should be able to easily read the Acid Warp title screen.\n",
"\n",
"Besides the wobbly image and arm strain this method is flawed for one\n",
"technical reason. A very large amount of light leaks off to the sides of\n",
"the lens and fills the room with stray light. This badly washes out the\n",
"image. All that is necessary to fix this is to enclose the monitor is a\n",
"black box with the lens as the only opening for light to escape.\n",
"\n",
"-------------------------\n",
" How to Build The Warper\n",
"-------------------------\n",
"Here is the simple method that you can scale to your supplies and skill. You\n",
"only need two cardboard boxes to make the black, light-tight box. Use wood,\n",
"metal, or plastic if you want a fancy box. You will have to work out the\n",
"details for those materials by yourself. For my first prototype I used wine\n",
"boxes that I got from a bar where I work. Wine boxes are very sturdy. For your\n",
"boxes one should fit inside the other. You may need to rip the side panel\n",
"seam on one box and reglue it so that it is slightly smaller or larger. Fit\n",
"is not critical, as long as the boxes are snug, yet slide easily. This\n",
"telescope action will allow you to focus.\n",
"\n",
"Spray paint the insides with FLAT BLACK paint. If you don't paint the inside\n",
"then the results will not be as good.\n",
"\n",
"Cut a hole for the lens in one end of the larger box and attach the lens\n",
"over this opening. Remove the flaps from the other end of the box or fold.\n",
"them in. If you fold them in then the bigger box will fit more snuggly around.\n",
"the smaller box.\n",
"\n",
"One end of the smaller box should have its flaps pulled open, but not cut\n",
"off. These flaps fit over and around the monitor. Remove the flaps from the\n",
"other end of the box.\n",
"\n",
"When complete, the flaps of the smaller box should be taped to the sides and\n",
"top of the monitor. It does not matter if the fit is rough. The important\n",
"thing is to make sure that very litle light escapes and that The Warper is\n",
"held straight and steady on the front of the monitor.\n",
"\n",
"The larger box will fit over the smaller box and slide toward or away from\n",
"the monitor screen. This will allow you to adjust the focus. You may need\n",
"to put some blocks under the front (lens end) of The Warper to prevent it\n",
"from sagging. I had no trouble with wine boxes.\n",
"\n",
"If you cannot move the lens close enough to the screen to get proper focus\n",
"then simply trim a few inches off the edges of the open ends of the boxes\n",
"where the smaller box meets to slide into the larger box.\n",
"\n",
" / FLAP\n",
" /'\n",
" |-------------------- /'.----------- BACK OF\n",
" | -------------------| \\ TOP |`\\ MONITOR\n",
" :| | # | `\\--, <------\n",
" : HOLE | # | | |\n",
" : | # | | |\n",
" : | # SIDE | | | CABLE\n",
" : | # | | |-------()\n",
" LENS :| | # | /--'\n",
" | -------------------| / BOTTOM | /\\ AC PLUG\n",
" |-------------------- `\\ `-----------' \\_________,--\n",
" < ------- > `\\ `--\n",
" MOVE `\\ FLAP\n",
" FOR\n",
" FOCUS\n",
" CROSS-SECTION DIAGRAM\n",
"\n",
"Your Warper is now ready for use!\n",
"\n",
"For best results: use a white projection surface; make the room very dark;\n",
"turn up the brightness of your monitor. You may also need to adjust color.\n",
"\n",
"-------------------------------\n",
" Sources for Your Fresnel Lens\n",
"-------------------------------\n",
"American Science and Surplus Co.\n",
"(Formerly Jerry Co.)\n",
"601 Linden Place\n",
"Evanston, IL 60202\n",
"Orders 708-475-8440\n",
"\n",
"AS&S sells a hodge podge of surplus items. Some of it is good,\n",
"some of it is junk. When you get their catalog, look for the \"Optics\"\n",
"section. They should still have a large supply of 11\" x 11\" fresnel lenses\n",
"for $1.95. They also sell an 11\" x 11\" Twin Layer lens for $3.25. These\n",
"lenses have minor scratches. A friend informed me that for our purposes\n",
"they work well. If they are sold out of these particular lenses then they\n",
"will probably have others that will work. Minimum Order is $10.00.\n",
"\n",
"\n",
"\n",
"Edmund Scientific Co.\n",
"101 East Gloucester Pike\n",
"Barrington, NJ 08007-1380\n",
"Orders 609-573-6250\n",
" 609-547-3488\n",
"FAX 609-573-6295\n",
"\n",
"Edmund Scientific Co. sells quality optics as well as hobby materials. When\n",
"you get their catalog, do not want to start looking in the Optics section\n",
"(unless you want to pay $30.00 for a 6\" x 7\" lens.) Look in the index under\n",
"\"Fresnel\" or \"Lenses\". There should be some lenses referenced in the hobby\n",
"section of their catalog. There, find a listing for an 8.5\" x 11\" lens for\n",
"about $7.95. They also sell a 7\" x 10\" lens for about $5.95. This is the\n",
"size I originally used.\n",
"\n",
"\n",
"\n",
"Herbach and Rademan Co.\n",
"18 Canal Street\n",
"P.O. 122\n",
"Bristol PA, 19007-0122\n",
"Orders 800-848-8001\n",
"FAX 215-788-9577\n",
"Office 215-788-5583\n",
"\n",
"H&R Co. sells new and surplus equipment for science and industry. They have\n",
"a small selection of inexpensive multilens units and rear projection screens\n",
"for TV projection systems. Most of the projection lenses are designed for a\n",
"specific size of TV tube and may not necessarily be ideal for a different\n",
"sized monitor, but the prices are low and these lenses are worthy of\n",
"experimentation. H&R also sells single multipurpose glass and fresnel lenses\n",
"in large sizes.\n",
"\n",
"\n",
"\n",
"Macrocoma Co.\n",
"Dept. m\n",
"15 North Main St.\n",
"Washington Crossing, PA 18977\n",
"Orders 215-736-2880\n",
"\n",
"Macrocoma is a weird company. They sell TV-Projector conversion kits. They\n",
"also sell a booklet on how to make Fresnel lenses. I don't recommend it.\n",
"They sell a Fresnel lens for about $15.00. I think the quality is supposed\n",
"to be quite good. Ask for \"The Master Lens\" (Special made, Triple\n",
"inspected, the best of the best.)\n",
"\n",
"The Warper (c)Copyright 1992 by Noah Spurrier\n",
""
};
/************************************************************************************/