Note: Several bug fixes were made on 8/17/98; pplot will now print on high-resolution color laser printers. The output from a QMS MagiColor2-EX (2400 x 600 DPI) or Xerox/Tek Phaser 2135 (1200 x 1200 DPI) is especially nice, with the stipple patterns so dense that they look essentially opaque. A bugfix introduced on 8/16/01 prevents PostScript errors if a page device larger than 8.5 inches is specified.
Click here for a sample color output from pplot (originally PostScript®): pressure sensor (19.3KB GIF). Unfortunately, this plot doesn't really tell the whole story. The GIF is generated by ghostscript, which uses the standard monitor resolution of 72dpi, which interacts with device-dependent code in the program. Consequently, stipple patterns come out large and ungainly. At 300dpi, they look reasonably good, and at 600dpi, nearly opaque.
In summary, input for the program net is a circuit description in a format which is a subset of LISP (see net.doc). The output of "net" is a file in ".sim" format, although the format has been extended to include other device types such as bipolar transistors and capacitors.
News: This program has now been ported to Linux (April 2000).
Here is the source tree of net.
Updates:
- September 5, 2001
- April 10, 2001 (fixes for PCI-DIO48H compatibility)
- July 19, 2002 (fixes for Linux kernel version 2.4 compatibility)
- September 4, 2002 (some Makefile fixes for "make install")
- February 26, 2003 (correct support for the PCI-DIO24H card)
- April 28, 2004 (support for ICS Advent cards: PCI-DIO24DB, PCI-DIO24HD, and the /CT variants. Thanks to Corinne Boyer at the Gemini Observatory in Hawaii)
- June 16, 2005 (support for Linux kernel versions 2.6---see below for earlier kernel versions)
- August 24, 2006 (bug fix; thanks to Dierdre Horan for the bug report)
CIO-DIO96.2.4.tgz is the version compatible with Linux kernel versions 2.4 and earlier.
For more information, see the Linux Lab Project.
Also see the "test" directory and file "diotest.c" in the driver distribution for example use of the driver.
diowrapper.tgz was contributed by Conrad Rehill; it is a wrapper program designed to act as a frontend for systems controlled by a DIO card. Conrad uses it for various household controls. His DIO card and driver program are "the basis for a home burglar alarm, fire alarm, relay controller for my heat/AC/circulator". See the README file in the top-level directory for more information. In brief: the original driver is in subdirectory dio96/src_driver/. Make and install this first (including loading the dio96.o kernel module). The wrapper software is in subdirectory dio96/src/. Go to that directory and run "make". Executables end up in the dio96/bin directory. I have not had time to play around with these programs, so until I do, I cannot provide much more information on how to use the system.
NICB-DIO96.1.1tar.gz is an outdated version for the NI clone card, also compatible with most of the ComputerBoards DIO-series cards. This older driver is not PCI-compatible, and in general the use of the new driver is much clearer.
Artificial Life
Warning: In spite of all efforts to optimize the computation
in this program, it still remains compute-intensive. The main
sensory source for each bug is its ``eyes'', which are made up of
a number of pixels spanning some angle of aperture in front of the
bug. The position of each object in the world is projected onto
the bug's eye. This necessitates a large amount of geometry
problem solving with its attendant sines, cosines, tangents,
squares, and square roots. It will run smoothly on a 400 MHz
machine. It runs exceptionally well on my dual-Pentium 400 box,
with the simulation and the X11 display neatly divided between the
two processors. On my 166 MHz laptop, it grinds along rather
slowly, but it's still good at holding my rapt attention for long
periods of time.
This program is provided as freeware under an artistic license. Improvements, changes, interpretations, discussions, and citations are all welcome. Useful and/or interesting code changes (or suggestions) should be referred back to the source (me) so I can add them to the distribution as the mood strikes me.
Notice: Source includes a binary executable for Linux systems. Source compilation requires Motif or Lesstif libraries.
August 1999: Added smooth fading to replace the stipple patterns; the program will revert to stipples if it cannot allocate all the colors necessary for the color fade. Added antialiasing to the segment lines for the smoothest graphics possible. Now includes the capability to play audio files for the hourly bell and the alarm, with alarm and bell icons to keep track of the enabled features.
November 1999: Repaired the audio play so that (1) playing the audio file does not leave behind a zombie process and (2) the audio executable can be specified as an X resource. Also put back Dan Heller's original dclock man page, modified to include the new features of this version.
January 2000: Major embarassment! Dclock is not Y2K compliant! Egads! Those who bother displaying the year in 4-digit format (I never do; I know what year it is) will discover that we have reverted to 1900. The Y2K-compliant version was posted January 3. Note that the Y2K-compliant version has taken the very sensible approach suggested by "mho" (mho@mho.nu) of using system function strftime() as the basis of its date-to-string conversion. Thus the format of the format (the meta-format?) has changed.
June 2000: Changed the timeout function from a fixed 1000 msec delay to a delay based on the number of microseconds to the next second boundary, as returned by gettimeofday(). Also added a time check during number fades so that the seconds won't stop counting during that period. Also make seconds digits draw before the minutes digits, so there is no extra delay between 59 and 00 seconds.
December 2000: Added patch by Matt Magri (magri@anarcho.com)
which added the "-dateup" option to print the date up at the top
(out of the way of obscuring windows) and which can be toggled in
real-time using the "u" key. Also, he added the "-nomiltime"
option which is mentioned in the man page but was heretofore
unimplemented.
February 2002: Added window manager hints so that dclock requests
input focus from the window manager for mouse clicks and keys.
Otherwise, some window managers refuse to give input focus to the
dclock window.
April 2002: Added patch by Andy Peterson (andy@petersonkids.com)
which adds the "-utc" option to print the date in universal
coordinated time (substitutes gmtime() for
localtime()).
January 2005: Altered the timer routine (see June 2000) to aim
for about 5ms later than the second boundary. This became a
problem with Fedora Core. Due to some change in the scheduling
algorithm, it is possible to trigger the timeout a few milliseconds
too early, resulting in apparently "skipped" seconds on the clock.
June 2008: Corrected a long-time annoyance, which is the handling
of the first "1" digit, such that its background consists only of
the two segments used. The original behavior left no segment
background when the "1" was not being displayed, and displayed
the unused horizontal segments' background (running off the left
edge of the window) when it was. Also changed the flashing ":"
background to the segment background color, instead of the window
background color. Also, added some changes from the Debian branch
version, in the hopes that the next Debian version will incorporate
the changes I've made in the last few revisions.
June 2008: Corrected a long-time error in the antialiasing routine,
which turned out to be due to round-off error producing a small
negative number for a (squared) distance metric, then passed to a
sqrt() function and resulting in "NaN". The result was occasional
pixels being drawn bright foreground color when they should have
been close to the background color. Also found another roundoff
error in the "insideness" routine (determines if a point is inside
a polygon using the winding number), and corrected it. At the same
time, I implemented antialiased circles for the colon between hours
and minutes.
dclock compiles readily under Linux; its status on other
systems is untested since the advent of the new version (please
let me know if you try).
Antialiasing is not built into X11, so the routine for generating
antialiased filled polygons had to be written by hand. If you
think that antialiasing isn't worth the trouble, or just want to
see what a difference it makes, then click here to compare against
the dclock display from my 1993 version,
with ``jaggies''. Note that antialiasing is slow by nature, requiring
per-pixel fill operations, but it works here because digits are drawn
only once, onto pixmaps, and copied to the window as necessary. Due
to the saved pixmaps, making dclock fill your background is bound to be
a waste of memory.
Joeri Sebrechts (joeri@sebrechts.net) suggests the color scheme
background=black, foreground=lavender, led_off=gray22. With
a black screen background, he describes the effect as looking like
one of ``those neon blue car radio displays molded into my background.
Very cool.'' He made a
screenshot of the result, posted
here with his permission.
Required: Xpm extension for X11 (included with modern versions
of Linux).
xman.tar.gz is available here and
via anonymous ftp.
Updated 3/2/00 with a bug fix by Robert Mitchell of
WFF/NASA which prevents url from getting confused by Netscape
windows other than the Print window, and picks up the _MOZILLA_URL
Atom from the correct window.
Simple (manual) compile instructions
are written in the first few comment lines of the program.
urlfilter.pl is a port of the urlfilter
script (above) to Perl. Make sure you configure this script so that
the first line points to your Perl executable (/usr/bin/perl on Linux,
but may be elsewhere on other systems), and that the variable $URL
points to the executable for url.c (above). Thanks to Robert
Mitchell for this script.
urlfilter.awk is a variation of the
urlfilter script using awk instead of sh or perl (above),
kindly provided by Jonathan R. Senning
(senning@gordon.edu), math and
CS professor at Gordon College, Wenham, Massachusetts. He has added
page numbering and date, printed at the bottom of the page. By
streaming the input, it works faster than the Perl and Shell versions
and does not alter the original Netscape PostScript output. This is
probably the best of the ``urlfilter'' versions listed here, and I
recommend it over the others.
RPM packages of urlfilter also provided by Jonathan Senning:
July 2008: Introduced a new version with date text based on Xft
(the anti-aliased font rendering server). The freefont font can
be specified on the command line with "-fontName
Also: Corrected behavior with respect to resizing in a window
manager implementing "opaque resize". Dclock punts on the resize
and redraw until all resize events have been processed. There is
a slight delay between resizing and redisplay, but this prevents
dclock from queueing up many (computationally expensive) resize
events.
Note: The original dclock is still around, though I have
not found it in a packaged form. Try the following link to the
``sipb locker'' at MIT:
Dan Heller's dclock
(screenshot).
Source code available here:
dclock-2.1.4.tgz (64KB)
New version based on Xft available here:
dclock-2.2.2.tgz (65KB)
Sample dclock window.
Sample dclock window from the
new (July 2008) 2.2 version, using Xft fonts.
Update: (11/16/99) Bug fix to prevent zombie processes from
accumulating after forking the audio play executable.
Update: (7/22/03) Fixed a few problems that prevent compilation
on Linux systems.
xbiff.tgz (41KB)
is available here.
Sample xbiff pixmap icon.
urlfilter is the companion script written
by Ed Hawkins III at JHU-APL for getting the url program to
write the current URL to the top of the printed page. Format is to
put the web page title on the upper left hand corner and the URL on
the upper right hand corner. Format adjusts appropriately for both
portrait and landscape page orientations. The PostScript statements
in the filter script can be customized to change the font and
appearance of the URL title on the page.
To use urlfilter, from the Netscape Print window, select
Print Command:
urlfilter | lpr
(i.e., prepend the urlfilter and pipe into whatever program you use for
the print spooler).
Required: Xw widget set.
Required: Xw widget set.
lpr -Pcolorps filename.ps
Comment: This method is outdated for the same reason as mentioned in the previous item.
Please contact me if you have any difficulty compiling this
package or any of the programs listed here which depend on it.
Clicking on the file name above will automatically transfer the
93KB compressed source file to your site.
Note: I have not looked at the source since version 3.2.
![]()
| email: |
|
---As always, Caveat end-user.
Last updated: July 7, 2008 at 9:06pm