Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ newsdemos(6) — Parallax PNeWS 3.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

psh(1)

psterm(1)

psview(1)

say(1)

xdemos(6)

NEWSDEMOS(6)  —  GAMES AND DEMOS

NAME

demos −  demonstrations

SYNOPSIS

Demos menu item in the  root menu

OVERVIEW

The Demos pull-right menu provides access to several demonstration programs.  These programs are intended to demonstrate graphics and user interaction capabilities. 

Many of these programs are written in the extended version of the  understood by , using the psh(1) program.  psh simply opens a connection to the  server and sends  commands to it. 

Unless described otherwise, you must specify a window for the demo when you start it.  When a small box appears by the cursor, you should click (and let go of) the right mouse button to indicate where you want one corner of the window to be.  Then, as you move the mouse, a rubber-band box expands and contracts to show a window region.  Click the right mouse button again to indicate where you want the opposite corner to be.  You should not hold down the right button while defining the box. 
 

DESCRIPTION

The Demos menu is available as a pull-right item from the  root menu.  This menu contains the following entries:

Animation =>
Bounce
Spin
Wink
Icosahedron
Icosahedron screensaver
Color =>
Color Cube
Color Wheel
Color Names
Games =>
Go
Backgammon
Images =>
Display Scanned Image
Image Rotate
Image Scale
Image Stencil
Image Spin
Catalyst
Line Drawing =>
Escher’s fish
Lines
Rubber-band
Vectors
World
Miscellaneous =>
Flags
Item Demo
Pie Chart
Spiral
Previewer =>
Golfer
Rose
Shuttle
Nozzle
Overview
Text =>
Text
Text (scaled)
Language Demo
Icon Browse
X.10 Demos =>
Run a Demo =>
Analog Clock
Load Average
Kill X Server

 

Animation =>
The Animation pull-right item brings up a menu that contains several demonstrations of NeWS’ animation capabilities. 
 
Bounce bounces a moving puck around inside of a window.  You can use the menu inside the window to stop and start the puck, to change its size and color, and to change the speed at which the puck bounces.  You can drag the Bounce window while it is running; this demonstrates NeWS’ lightweight process mechanism. 
 
Spin displays a spinning globe.  It is best to select a small (1 inch x 1 inch) area for this demo. 
 
Wink displays a pair of eyes in the middle of the screen, one of which winks at you. 
 
Icosahedron displays a bouncing 20 sided regular solid with the hidden lines removed.  Due to the computation necessary to figure the hidden lines, this demo may run faster if the program is run on another machine. 
 
Icosahedron screensaver is like icosahedron, but runs on top of all visible window.  This program goes away with a click of a mouse button. 
 

Color =>
The Color pull-right item brings up a menu that contains programs that demonstrate some of NeWS’ color capabilities.  Other programs will display in color, what distinguished the programs in this menu is their focus on color. 
 
Color Wheel draws a wheel of colors inside a window.  If NeWS is running on a monochrome display, it uses gray values instead of colors.  You can use the menu to switch between gray and color, and to vary the number of shades, the saturation, and the intensity of the colors displayed. 
 
Color Cube is similar to the Color Wheel in that it displays colors and gray levels; however, it presents them in a different format.  Its menu lets you alter the presentation of the colors in a manner similar to Color Wheel. 
 
Color Names shows you the correspondence between color names in the color dictionary (as implemented by NeWS/colors.ps) and their colors on the screen.  This program uses scrollbars to access all the colors.  In addition, there is an interesting use of the lite menu package to display a horizontal menu bar and menus with rows and columns.  The menu is used to control text color, font, face and size. 
 

Games =>
The Games pull-right item brings up a menu with available games. 
 
Go is a simple program that puts up a Go board with which you can interact by placing and removing stones.  Thus, you could play a game of go with someone else while seated in front of the screen.  It is intended as a simple (but complete) application to show programmers how C, CPS, and NeWS interact.  The tutorial part of the NeWS Tutorial and Cookbook describes the internals of this program. 
 
Backgammon is a game that puts up a backgammon board and will actually play against you.  This program is a port of gammontool, so see its man page for further documentation. 
 

Images =>
The Images pull-right item brings up a menu that contains several demonstrations of NeWS’ imaging capabilities.  Each program (except for Image Scale) lets you select the image to display by means of a pop-up menu.  You bring up the menu by clicking the right mouse button inside the window (not in the window’s frame). 
 
Display Scanned Image creates a window and displays an image inside of it.  The image will be scaled to fit exactly within the window boundaries, regardless of its original aspect ratio. 
 
Image Rotate displays ten rotations of an image in a pinwheel arrangement. 
 
Image Scale takes the bitmap image of a turkey (from the PostScript Reference Manual, page 171) and scales it as many times as will fit inside the window. 
 
Image Stencil demonstrates NeWS’ capability of pushing an image through an arbitrary path, or stencil.  The right button menu brings up a menu giving a choice of several stencils in addition to the selection of the image to be displayed. 
 
Image Spin demonstrates NeWS’ image rotation capability.  After you bring up the window, the server waits for you to define another rubber-band square with the mouse.  Press the right mouse button where you want the lower left corner of the image to go and then release the button where you want the lower right corner of the image.  The image is rotated and scaled to fit between the two points.  The right button menu has an additional menu item, Spin, which lets you specify a different rotation for the image. 
 
Catalyst shows images digitized from Sun’s Catalyst Third Party Software catalog. 
 

Line Drawing =>
This pull-right item brings up a menu with demonstrations of line drawing.
 
Escher’s fish draws the famous Square Limit created by M.  C.  Escher.  The demo is a 260-line recursive NeWS program that draws a large number of vectors.  You can use the menu to vary the complexity of this drawing. 
 
Lines creates a window with a line pattern inside of it.  You can can alter the number of lines drawn from the pop-up menu inside the window.  On color screens, the line pattern is displayed in a rainbow of colors. 
 
Rubber-band demonstrates how responsive NeWS can be when interacting with you.  When you bring up the window, NeWS draws a rubber-band line from a corner of the window to the current mouse location.  This line will track the mouse as you move it around on the screen.  When you click a mouse button, NeWS tracks the mouse with a rubber-band curve instead of a line.  One more click kills the window. 
 
Vectors is a demonstration of NeWS’ vector-drawing capabilities.  The demo draws four spaceships inside its window, composed of over 7,000 vectors. 
 
World displays a geographic projection of the Western Hemisphere. 
 

Miscellaneous =>
This pull-right item brings up a menu with miscellaneous demonstrations.
 
Flags displays flags of many nations, in color if possible.  You can use the menu to display just a single flag or all the flags at once. 
 
Item Demo is a demonstration of user interface items.  The set of items includes buttons, sliders, cycles, and text areas.  All of the items can be dragged around with the mouse. 
 
Pie Chart draws a business pie chart with slices of the pie filled with varying colors. 
 
Spiral draws a simple spiral pattern. 
 

Previewer =>
This pull-right item brings up a menu with demonstrations of NeWS’  previewing capabilities. The program psview is used to display  files output from other programs, e.g., Frame’s Frame Maker, AutoCAD, and Adobe’s Illustrator. 
 
Golfer and Rose were produced using Adobe’s Illustrator program. 
 
Nozzle and Shuttle were produced using AutoCAD. 
 
Overview was produced using Frame’s Frame Maker program.  This is a multi-page document that provides an overview of NeWS’ capabilities. 
 

Text =>
This pull-right item brings up a menu with demonstrations of NeWS’ text capabilities.
 
Text writes text inside a window in several styles.  The right button brings up a pop-up menu from which you can select the font (under the Font pull-right), the point size, the colors, and the text to be shown.  The text shown can be either some sample text or a list of all characters in the chosen font. 
 
Text (scaled) demonstrates NeWS’ ability to simulate the arbitrary scaling of text using only bitmap fonts.  The line spacing and intercharacter spacing are varied so that a continuous range of sizes can be simulated with a fixed number of bitmap fonts. 
 
Language Demo shows that NeWS can support several different languages.  You can select one of a variety of languages from the pop-up menu, causing both the menu and the text to be displayed in the chosen language. 
 
IconBrowse brings up a large window that displays icons from the Icon font.  You use the menu to control the range of characters displayed and to change the font from which they are displayed. 
 

X.10 Demos =>
This pull-right item brings up a menu with a demonstration of a partial X.10 emmulation package.  See xdemos.6 for further information. 
 

FILES

$NEWSHOME/lib/NeWS/demomenu.ps
NeWS code for the demo menu and some of the demo programs.

$NEWSHOME/demo/∗ demo programs not built into the demo menu. 
 

SEE ALSO

psh(1), psterm(1), psview(1), say(1), xdemos(6)

NeWS Manual

PostScript Language Reference Manual , Adobe Systems Inc., Addison-Wesley

TRADEMARK

is a registered trademark of Adobe Systems Inc. 

Sun Release 4.1  —  Last change: 2 December 1987

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026