=S+H= @(#)README 1.5 Oki 93/05/25 MAY-93 pexdraw README. pexdraw is a drawing and exploring program for PEX & PEXlib. I have used it to explore application issues and at times as a test vehicle. It also serves as a base of examples for a book to be published by Prentice Hall. "Building Applications with PEXlib". It will run best on a 5.1 PEX server, but will also run on a 5.0 server with the Workstation resource. This distribution consists of: -rw-r-----1005/100 4957 May 25 01:53 1993 README -r--r-----1005/100 66040 May 24 14:55 1993 pexdraw.c -r--r-----1005/100 12694 May 24 14:55 1993 pexdraw.h -r--r-----1005/100 113725 May 24 14:55 1993 pexdraw.uil -rw-r-----1005/100 3809 May 25 12:53 1993 Imakefile -r--r-----1005/100 20761 May 24 14:55 1993 rdr.c -r--r-----1005/100 15095 May 24 14:55 1993 wks.c -r--r-----1005/100 27419 May 24 14:55 1993 fb.c -r--r-----1005/100 43663 May 24 14:55 1993 ui.c -r--r-----1005/100 11454 May 24 14:55 1993 ui_x.c -r--r-----1005/100 13341 May 11 13:43 1993 init.c -rw-r--r--1005/100 17902 May 4 10:48 1993 util/HP.PEXUt -r--r-----1005/100 4510 May 25 12:24 1993 rgbc.c -r--r-----1005/100 12619 May 25 12:45 1993 plcube.c -r--r-----1005/100 3911 May 25 12:25 1993 sofas.c -r--r-----1005/100 119825 May 25 12:24 1993 teapot.c -r--r-----1005/100 13664 May 25 13:53 1993 plogo.c drwxr-xr-x1005/1 0 Apr 25 23:50 1993 XMU/std cmap stuff. TO BUILD: ========= Hopefully you have xmkmf, else use imake. Since I have included the HP DB utilities, you need to make Makefiles, too. Step 1 make the makefiles: If you have Motif installed, do this: % imake -I/usr/lib/X11/config -DMOTIF -DUseInstalled Otherwise: % imake -I/usr/lib/X11/config -DNO_MOTIF -DUseInstalled In either case: % make Makefiles %make pexdraw ( or pxd, if no Motif ) TO USE: ======= pexdraw is compose of several tools and several forms. The tools allow for direct manipulation of the geometry and viewing paramters. Left Button Middle Button Right Button Pointer pickOne* translateSelected stretchSelected Line line line rotateView TriStrip add point finish TriStrip rotateView NURBCurve add point finish NURBCurve rotateView Text insert text .. rotateView Polygon add point finish Polygon rotateView Circle circle .. rotateView view rotateView .. rotateView zoom zoomWindow resetWindow rotateView modelClip add model clip nothing rotateView To walk through the features of pexdraw. - use button 1 to sketch in one line. It is selected - sketch in a second line, the first is deselected - Pick up the Pointer tool, select the first line - Use the button 2 to translate - Use the button 3 to stretch - Pull down the Edit Menu and delete it - Insert a TriStrip - use the SurfaceAttrs Form to make it solid (must Apply) - select the Set view item in the Options (Options) menu. set various view paramters and press apply. - use the view tool (two circles) - Start spinning slowly (this will spin the struct of the selected object, or if not is selected the structure being created) - Stop spinning slowly, by hitting the same menu button - Use the Execute menu under File to execute a structure generating client - plcube, plogo, sofas, rgbc. This will use the UNIX system() call. Select the red line and set the surface properties & spin slow. [ You can now have several objects spinning independently, keep selecting and using the menu, if an object is spinning the menu will turn it off ] - Use the execute menu again and insert something else. Select that red line and start spinning. Now use the Spin Option menu items to bring up the spin form. You can change a bunch of stuff about how it is spinning. - Delete All - Delete All - use the sphere item in the Options menu to insert a sphere. (sphere alternates between a triStrip Cuboctohedron & a ration NURB surf) - pick the blue line - select the surfaceAttrs menu, this brings up a form - set various attributes - use the NURBSCurve tool. - Use the Change Color option to bring up a RGB slider form. - Use the MC tool to insert a model clip plane. - You can execute a structure from another structure. - delete all, Execute sofas, select it, stat it spinning, bring up spin form. Change spin point to -1, -1, -1. - Execute rgbc, now, use the Execute Strux menu item and click on red line of rgbc. Now there are two rgbc . click on the rgbc line again and start it spinning. now change the spin point to -1,-1,-1 and the offset to 1.5, 1.5, 1.5. If you have a fast machine, turn on solid & Gouraud. Now Unpost Strux. the SOAFS is orbitting the end of the line and the RGBC is orbitting the center of the SOFAS. It's fun. If you are running on a PEX 5.1 server you can do a "draw through" select to change colors of objects. This uses the PickAll features. All of the lines, tristrips, NURBSCurve & Text obey the translate & stretch. Ideally, stretch would change the character height & expansion attributes of the test... pexdraw expects structures to be in a certan form - see InitStrux. You can build a version of pexdraw that does not use Motif, "make pxd". This will use the file ui_x.c instead of ui.c. ui_x.c is not totally up to date with ui.c, but it will give you something to play with. CrCmap.c is included due to bugfixes. If you have problems with pexdraw hanging when running against TrueColor or DirectColor visual, build an link CrCmap.c - If your libXmu is up to date with the patches you should not need to worry about them. If you are running against 24 bit servers and you hang, then you need to compile & link the files in XMU These were released in public patch # 20. export.lcs.mit.edu pub/R5/fixes. IT WOULD BE BETTER TO GET THIS FROM AN UP TO DATE SOURCE. util/ contains the HP.PEXUt utilities. These are still in flux and you should get the latest from export.lcs.mit.edu in /contrib/PEXlib. -Jan "YON" Hardenbergh jch@oki.com / jch@world.std.com (508)-624-7000 Oki Advanced Products Division, 100 Nickerson Road, Marlborough, MA 01752 "Whatever you can do, or dream you can do, begin it. Boldness has genius, power and magic in it." w h murray.