Personal info for toby

This person is currently certified at Apprentice level.

Name: Toby Thain

Homepage: http://www.telegraphics.com.au/

Notes:

  • PostScript/Mac/UNIX developer since 1986, resident in Melbourne, Australia. PostScript-based graphic arts has been my full-time occupation since 1987.
  • collector of 16-, 32- and 64-bit UNIX hardware
  • graphic designer and photographer
  • typographer and type designer

    I'm responsible for:

  • plug-ins for Adobe Illustrator and Photoshop
  • contributor of original colour dither algorithm to Mathematica's Mac front-end (1989)
  • early port of TeX & METAFONT to Macintosh Programmer's Workshop (ca 1990)
  • only known port of TeX & METAFONT to Inmos Transputer (Mac host) (ca 1990)
  • paper (1992), Packing METAFONTs into PostScript, TUGboat 13(1)--Using native PK-compressed bitmap fonts with a PostScript RIP. Accompanying code is a candidate for an "Obfuscated PostScript" contest 8-)
  • probable first port of GhostScript to Mac MPW (ca 1991)
  • first port of TeX & METAFONT to Power Macintosh (1993)
  • ongoing research in digital typography, image processing and stochastic screening

    Further information on request

    This person is:

    Recent diary entries for toby:

    6 Jul 2001 (updated 7 Jul 2001)  »

    I've now had a chance to play with the MacOS X Project Builder (ships on CD with MacOS X). It works like a dream! The spookiest part was realising that everything I've learned about the Mac Toolbox is still valid with Carbon; the source for the sample applications is the same Toolbox code we've been writing for years (with minor tweaks). So no-one has an excuse not to rebuild for X! The icing on the cake is that the Carbon APIs are supported all the way back to MacOS 8.1 (for "backporting").

    I've been looking at various approaches to migrating my (putative) gnome-- app to X. There are almost certainly others porting gtk--/gnome-- to MacOS X, but I haven't come across their work yet. Probably too early to show up on gtk.org etc. I am intending therefore to duplicate enough of the gtk-- class library to allow my project to cross-build. I am not sure if this should be started from scratch, but bringing in the signalling mechanism, or should start with the existing gtk-- code with widget-specific stuff replaced with Carbon API calls. (It should use the Carbon interfaces, being written in C++.)

    For my purpose I favour rewriting the gnome-- classes from scratch, top-down, as needed. So far I am using Gnome::Main, Gnome::App, and a pile of utility classes. But for a Carbon/gnome-- to be widely useful it would need to be complete, and behave just like GTK/gnome--, which suggests a bottom-up port starting with current code, but I haven't done enough homework yet to be sure. (And I've only just started using gtk--/gnome--.)

    Pardon my aimless ruminations...

    1 Jul 2001 (updated 1 Jul 2001)  »

    Tabula is crawling along. I've been working on early design, and have started to get my hands dirty with some code, since some of the tools I'm working with are new to me (most of my GUI coding is C under MacOS) and I need to get the hang of them. I'm committed to using C++ and gnome--; so far, I have found them a simple and powerful combination of tools.

    Thankfully, the box I'm developing on is now running like a dream - after a losing a disk and consequent hassles with problematic SCSI chains and the like. It's a Power Computing PowerCenter upgraded to 250MHz G3, running LinuxPPC 2000 Q4. Highly recommended.

    Hoping to set up a G4 here at home with MacOS X soon; been smitten by its gorgeous interface - and UNIX studliness - after doing 3 installs on various machines at work. Here's hoping the GTK+ stuff easily migrates to Aqua :) I'm now convinced that MacOS X is an important target for this project.

    21 Mar 2001 (updated 21 Mar 2001)  »

    Raph,

    It's a while since I visited Don's site. Here's a nutshell comparison.

    The sine-curve approximation he describes involves a one-off analytical solution which (given the complexity of the math) is probably optimal for approximating sine curves with 2 segments per quadrant.

    My tack is much simpler (no analysis, only numerical approximations, a 10 minute hack) and generalisable to other curves with known first derivatives. Plus, you can use the step size to control the accuracy of approximation.

    Thanks for the comment!

    18 Mar 2001 (updated 19 Mar 2001)  »

    A poster to comp.lang.postscript asked for an "elegant" way to draw sine waves.

    I was inspired to hack up the attached Bézier approximation, which uses the first derivative and the "thirds" rule-of-thumb to position Bézier anchors. There are more elegant approximations available, in fact you should be able to approximate the first quadrant of a sine wave with just one Bézier with sufficient accuracy for many purposes, but this was much quicker to hack.

    You can even open it in Illustrator!

    On viewing the results in Illustrator I found that the approximation is indeed very accurate and would therefore describe this as an "elegant" solution. Note that making the step size an integral fraction of a radian (e.g. pi/8) will result in a path which can be joined end-to-end in Illustrator to make a sine wave of any length. You can change the step size and length of curve where indicated in the source.

    The code should also be adaptable to any similar function for which the first derivative is known (f'x).

    I hope it may be of use to the Ghostscript community. If you redistribute or use it, please acknowledge my authorship.

    (Note that Mathematica probably has some good general methods for graphing functions smoothly in PostScript.)

    %!
    % Sine wave drawing by Toby Thain
    (mailto:toby@telegraphics.com.au)
    % - straight line approximation
    % - (very) simplistic Bezier curve fitting
    % both governed by "step" parameter (radians)
    
    

    /pi 3.14159265 def /step pi 4 div def % spacing of each line/curve segment; radians /curvelength 7 def % curve length in radians

    % transformation of unit sine wave - x radians, y -1..1 50 300 translate 80 80 scale

    /r2d { 180 pi div mul } def % radians to degrees (approx) /fx { r2d sin } def /f'x { r2d cos } def % first derivative

    0 dup fx moveto step dup curvelength { % loop parameters for straight lines (radian units) dup fx lineto } for .01 setlinewidth stroke

    /third step 3 div def 0 dup fx moveto 0 step curvelength { % loop parameters for Bezier approximation /x exch def x third add x fx x f'x third mul add x step third sub add x step add dup fx exch f'x third mul sub x step add dup fx curveto } for 1 0 0 setrgbcolor stroke % Bezier version is drawn in red

    showpage

    (I can't seem to prevent <pre> from putting line breaks in the comments, so if you can't run the code, try the ungarbled version: sine.ps

    Others have certified this person as follows:

    [ Certification disabled because you're not logged in. ]

  • [ Home | Articles | Account | People | Projects ]