.\" @(#)newsdemos.6 9.5 88/01/19 Copyright 1987 Sun Micro .TH NEWSDEMOS 6 "2 December 1987" .IX newsdemos(6) "" "\fInewsdemos\fP(6) \(em NeWS demonstrations" .SH NAME \*(Sd demos \- \*(Sd demonstrations .SH SYNOPSIS \fBDemos\fR menu item in the \*(Sd root menu .SH OVERVIEW The \fBDemos\fR pull-right menu provides access to several \*(Sd demonstration programs. These programs are intended to demonstrate \*(Sd graphics and user interaction capabilities. .LP Many of these programs are written in the extended version of the \*(Ps understood by \*(Sd, using the \fIpsh\fP(1) program. \fIpsh\fP simply opens a connection to the \*(Sd server and sends \*(Sd commands to it. .LP 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 \fIclick\fP (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 \fIrubber-band\fR 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. .SH "DESCRIPTION" The \fBDemos\fP menu is available as a pull-right item from the \*(Sd root menu. This menu contains the following entries: .IX demos "newsdemos(6) - NeWS Demos menu" "" "\fInewsdemos\fP(6) \(em demos menu" .nf 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 .fi .TP \fBAnimation =>\fP The \fBAnimation\fP pull-right item brings up a menu that contains several demonstrations of NeWS' animation capabilities. \fIBounce\fP 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 \fIBounce\fP window while it is running; this demonstrates NeWS' lightweight process mechanism. \fISpin\fP displays a spinning globe. It is best to select a small (1 inch x 1 inch) area for this demo. \fIWink\fP displays a pair of eyes in the middle of the screen, one of which winks at you. \fIIcosahedron\fP 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. \fIIcosahedron screensaver\fP is like \fIicosahedron\fP, but runs on top of all visible window. This program goes away with a click of a mouse button. .TP \fBColor =>\fP The \fBColor\fP 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. \fIColor Wheel\fP 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. \fIColor Cube\fP is similar to the \fIColor Wheel\fP 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 \fIColor Wheel\fP. \fIColor Names\fP shows you the correspondence between color names in the color dictionary (as implemented by \fINeWS/colors.ps\fP) 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. .TP \fBGames =>\fP The \fBGames\fP pull-right item brings up a menu with available games. .\" The \fBGames\fR pull-right item brings up a menu with the following items: .\" \fISnake, Maze, \fRand \fIGo Demo\fR. .\" .\" \fISnake\fR is a challenging game .\" where one must steer a moving snake so that it ``eats'' its targets. .\" Each time a target it eaten, the snake grows longer. You must not .\" cause the snake to run into itself or into a wall. Use the right .\" mouse button to turn the snake to the right, and use the left mouse .\" button to turn left. .\" .\" \fIMaze\fR is a non-interactive maze generator and solver. The .\" program will generate and draw a maze in the window. It will then .\" solve the maze using a backtracking algorithm, showing all of its .\" attempts along the way. \fIGo\fP is a simple program that puts up a \fIGo\fP board with which you can interact by placing and removing stones. Thus, you could play a game of \fIgo\fP with someone else while seated in front of the screen. It is intended as a simple (but complete) application to show programmers how C, \s-2CPS\s0, and NeWS interact. The tutorial part of the \fINeWS Tutorial and Cookbook\fP describes the internals of this program. \fIBackgammon\fP is a game that puts up a \fIbackgammon\fP board and will actually play against you. This program is a port of \fIgammontool\fP, so see its man page for further documentation. .TP \fBImages =>\fP The \fBImages\fP pull-right item brings up a menu that contains several demonstrations of NeWS' imaging capabilities. Each program (except for \fIImage Scale\fP) 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). \fIDisplay Scanned Image\fP 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. \fIImage Rotate\fP displays ten rotations of an image in a pinwheel arrangement. \fIImage Scale\fP takes the bitmap image of a turkey (from the \fIPostScript Reference Manual\fP, page 171) and scales it as many times as will fit inside the window. \fIImage Stencil\fP demonstrates NeWS' capability of pushing an image through an arbitrary path, or \fIstencil\fP. 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. \fIImage Spin\fP 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, \fISpin\fP, which lets you specify a different rotation for the image. \fICatalyst\fP shows images digitized from Sun's \fICatalyst\fP Third Party Software catalog. .TP \fBLine Drawing =>\fP This pull-right item brings up a menu with demonstrations of line drawing. \fIEscher's fish\fP draws the famous \fISquare Limit\fP 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. \fILines\fP 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. \fIRubber-band\fP 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. \fIVectors\fP is a demonstration of NeWS' vector-drawing capabilities. The demo draws four spaceships inside its window, composed of over 7,000 vectors. \fIWorld\fP displays a geographic projection of the Western Hemisphere. .TP \fBMiscellaneous =>\fP This pull-right item brings up a menu with miscellaneous demonstrations. \fIFlags\fP 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. \fIItem Demo\fP 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. \fIPie Chart\fP draws a business pie chart with slices of the pie filled with varying colors. \fISpiral\fP draws a simple spiral pattern. .TP \fBPreviewer =>\fP This pull-right item brings up a menu with demonstrations of NeWS' \*(Ps previewing capabilities. The program \fIpsview\fP is used to display \*(Ps files output from other programs, e.g., \fIFrame's\fP \fIFrame Maker\fP, \fIAutoCAD\fP, and \fIAdobe's\fP \fIIllustrator\fP. \fIGolfer\fP and \fIRose\fP were produced using \fIAdobe's\fP \fIIllustrator\fP program. \fINozzle\fP and \fIShuttle\fP were produced using \fIAutoCAD\fP. \fIOverview\fP was produced using \fIFrame's\fP \fIFrame Maker\fP program. This is a multi-page document that provides an overview of NeWS' capabilities. .TP \fBText =>\fP This pull-right item brings up a menu with demonstrations of NeWS' text capabilities. \fIText\fP 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 \fIFont\fP 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. \fIText (scaled)\fP 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. \fILanguage Demo\fP 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. \fIIconBrowse\fP 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. .TP \fBX.10 Demos =>\fP This pull-right item brings up a menu with a demonstration of a partial X.10 emmulation package. See \fIxdemos.6\fP for further information. .SH FILES .TP 25 .I $NEWSHOME/lib/NeWS/demomenu.ps NeWS code for the demo menu and some of the demo programs. .TP 25n .I $NEWSHOME/demo/* demo programs not built into the demo menu. .SH "SEE ALSO" psh(1), psterm(1), psview(1), say(1), xdemos(6) .LP .I "NeWS Manual" .LP .I "PostScript Language Reference Manual" , Adobe Systems Inc., Addison-Wesley .SH TRADEMARK \*(Px is a registered trademark of Adobe Systems Inc.