This page last updated
13 December 1997

Yhek's Page of Graphic Tcl/Tk Labels

If this spot is not green you may want to download the latest Tcl Plugin.

This page is an archive of useful formulae and the images that they create. Plus instructions on how to modify a formula if it is not quite what you want. At the end of the page is a link to a painter which generates the types of images generated on this page.

1. y==x except that in some cases this might not produce anything. Whenever you think of using "x==y" also consider using (abs(x-y))<.05 or some other small number. This is because rounding errors can often make numbers that are almost equal, but, not exactly equal. This alternative also allows you to vary the thickness of the line. (2).
Given any simple equation there are several useful variations you can try by replacing parts of the equation.
Replace the "==" with "<", ">", "<=" or ">="
3. y
4. y>=x
Swap the "x" for the "y" and vice versa. In this particular case the resulting pictyre isthesame. Swapping x and y turns the picture about its nw(northwest)-sw(southeast) axis. The line x==y IS this axis.
Substitute "1-x" for x and/or "1-y for y."1-x" turns the picture aboutits north-south axis. "1-y turns the picture about its east-west axis.
5. y==(1-x) Given any starting picture you should now be able to flip it into the attitude that you want.

6. y<=(1-x)

You can also combine formulae by building them into logical expressions.
7. (y<=(1-x))&(y<x)

Finally, you can lay one picture on top of another.
8. (Please view the source.)

The labels can then be assembled into bars, flags, ribbons, whatever. Note that labels cannot be nested inside one another. Here are some simple rulers made out of the y==x formula above and its transformations and aggregations.

You will notice that the larger label images take a long time to calculate. Downloading time may be reduced, but it still takes too long to look at the page. When using these images it is best to make small images that are calculated quickly, and reuse them effectively. An image is only calculated the once . It can then be reused without being recalculated.

The labels can also be put inside frames.

Here is a painter that will help you get started producing these effects.

And here some generated samples:-

The next page will introduce a new basic formula and a number of new transformations.

But for now it is back to the label page.

Or you can go back to the main Tcl page.


1997 nzci@outnet.co.nz

This page hosted by GeoCities Get your own Free Home Page