Program: BezSurf Author: Eric Davies Resources and Tech Assistance: LateNight Developments (LND) Corporation. Distribution ------------ BezSurf is public domain. Feel free to copy it, enhance it, or port it to other machines, etc. Compilation ----------- Compiled under Lattice C 4.0 at the LND offices. Will also compile under Aztec 3.4a and up. Software Disclaimer ------------------- This is your standard software disclaimer: Use this software at your risk. Any loss of sleep is your own concern. Document Disclaimer ------------------- This document gives a partial description of BezSurf and its use. Many of the menu-items and gadgets are not described here. I believe most people will discover their purpose without too much trouble. If I'm wrong, you can query me by email at: edavies@uvicctr or edavies@uvvm.bitnet Or by snail mail (if some part of Canada Post is not on strike) at: Eric Davies 1442 Harrop Rd. Victoria, B.C. Canada V8P 2S6 How soon you get a response depends on how behind my school work I am and how easily I can determine a return path to you :-). Description ----------- BezSurf (or Surf for short) is a program for producing bezier surfaces of revolution. It produces awesome pictures of wineglasses and doorknobs, and other objects one could turn on a lathe. BezSurf includes the capacity to map iff image files onto any surface that it can draw. History ------- I originally wrote BezSurf for my final project in an introductory course in computer graphics at the University of Victoria. The target machine was a colour Sun Work Station. Being a loyal amigoid, I ported it down to the Amiga when I had a bit more free time, the Late Night Developers supplying resources and technical assistence as needed. I proudly claim any errors or bugs as my own, following the lead of a certain wine glass manufacturer, "the minute flaws in the product are your guarantee of its handcrafted nature". Usage ----- I've run it successfully from Matt Dillon's Shell and the bare cli. It should run fine from workbench, provided somebody whips up an icon for it. Basic Usage ----------- Once run, you should see a 320x200 lores screen with the text "lines curves wire shade map panel" along the top edge. These are the basic control gadgets. 1) press "lines" (screen clears and crosshairs appear). press and hold down the left mouse button. move the mouse someplace else and release the button. a line should have been rubber banded and left on the screen. repeat as desired { press and drag the mouse to define new line connected to last one line. } 2) press "curves". the endpoints of the first line should be bracked by squares. repeat as desired { bring the left mouse button near one of squares. press left button, move to new location, and release left button. nearest square should have accompanied mouse, causing the line to curve in strange and wonderful ways. press right button to move the next line. } 3) press "panel" takes you to the control panel, so you can change the lighting, save files, etc. It is suggested that you try "tilt" with about 20 degrees ( adds a more 3d effect ). to get back to display, press [display] on the control panel. 4) press "wire" generates wireframe with hidden line removal. 5) press "shade" generates shaded image with hidden surface removal. 6) saving the images you created is done via the "files" menu in the control panel. save as... saves the ilbm to the specfied file name save first... tacks on a ".0" to the file name and saves save next... tacks on an ascending number and saves "save first" and "save next" are provided in case somebody wants to try producing animation sequences with Surf. 7) Anything else, excluding maps, should be self apparent with a little bit of experimentation. Error Messages -------------- Error messages are displayed in a requestor. If displayed, you must click in the requestor's close box to continue. The messages usually indicate that your file name is wrong, screwy file contents, you don't have enough memory, etc. Aborting a time consuming activity ---------------------------------- Under the "Image" menu, the "abort" item will terminate any drawing in progress. Mapping Iff images onto Surfaces (Grey Scale Result) -------------------------------- This is my answer to photon paints mapping of images onto spheres, cones, etc. Before you can perform the mapping, you need two things: (1) a loaded map image, and (2) a surface { not necessarily in that order though its probably better to load the image first if you are not sure you have enough memory }. Loading the map image: Go to the control panel window (see earlier discussion). Under the files menu, select the "Open Map" item. Enter the pathname of an ilbm image file (note:Ehb not supported). Wait until the hourglass goes away. Now, go and define a surface if you haven't already. Once you have both a surface defined and an image file loaded, click on the "Map" gadget on the display screen. Be prepared to wait an hour or two for your image to be produced, it is very slow. Using lots of bezier and revolution slices (ie, very small patches) results in images that look less scarred. The "MapRevV" and "MapRevH" sliders determine how many times the map image is replicated on the surface. Closing the map file frees up the memory used to store the map image file. Openning a new map file automatically closes the old one. Mapping Iff images onto Surfaces (Colour Result) -------------------------------- The idea here is to produce three different image files, one that contains the red component, one the green, and one the blue. After the files are produced, use the mergergb tool to combine them into a single file for use by the RAY2 program available from the QRT (public domain) package or DBW (shareware). procedure: set interlace and lores screen. set the grey model to "R only" load the iff image file set the screen color to "Red" (or grey). Generate the surface mapping. Save with a ".r" extension. set the grey model to "G only" load the iff image file again set the screen color to "Green" (or grey). Generate the surface mapping. Save with a ".g" extension. set the grey model to "B only". load the iff image file again. set the screen color to "Blue" (or grey). Generate the surface mapping. Save with a ".b" extension. now run the mergergb program with the filename without extensions as the sole argument. Ie, if you named the files smith.r, smith.g, and smith.b, then type: mergergb smith In this case, mergergb will produce smith.tmp, which can then be fed into RAY2. Without other arguments, RAY2 wil produce an interlaced ham image. Future ------ Be kind of neat if somebody adapted BezSurf to produce object descriptions for Sc*lpt3D or VideoSc*pe3D. Anyone feeling brave and bored?