Path: utzoo!utgpu!news-server.csri.toronto.edu!torsqnt!geac!alias!mherman From: mherman@alias.uucp (Michael Herman) Newsgroups: comp.graphics Subject: Problems ftp'ing the Gems's source code Message-ID: <1990Aug23.190832.11020@alias.uucp> Date: 23 Aug 90 19:08:32 GMT Organization: Alias Research, Inc. Toronto ON Canada Lines: 185 After I uudecode and uncompress any one of the Gems's source shar files, I have found the contents of the shar file to be somewhat garbled. I presume that because uncompress seems to work properly (i.e. it doesn't complain AND the shar file seems to be "complete" in that it ends with a shell "exit"), it must be a problem with the original source code that went into the shar file or the shar file itself before it was compressed. Plse drop me a note when you have some idea about what is causing this. Thanks in advance. Michael uunet!utcsri!alias!mherman p.s. I also haven't been successful extracting files from the .zoo archive; that is, I get a large number of CRC errors. I used an FTP mail server to retrieve the archives (I don't think they're the problem). Here is the name of the server I used: > alias ftp bitftp@pucc.bitnet Here is the "reply" msg I received from the server. It lists the FTP commands I used. > From utcsri!pucc.princeton.edu!BITFTP Tue Aug 21 17:30:42 1990 > Received: from alias by trent.alias.uucp (5.52/SGI-clover) > id AA07152; Tue, 21 Aug 90 17:30:42 EDT > Received: by alias.uucp (4.12/celerity) > id AA20254; Tue, 21 Aug 90 17:29:33 edt > Received: from rutgers.edu (-:RUTGERS.EDU:-) by yonge.csri.toronto.edu via TCP with SMTP id AA14721; Tue, 21 Aug 90 16:29:14 EDT > Received: from princeton.UUCP by rutgers.edu (5.59/SMI4.0/RU1.3/3.07) with UUCP > id AA29304; Tue, 21 Aug 90 16:18:56 EDT > Message-Id: <9008212018.AA29304@rutgers.edu> > Received: from PUCC.PRINCETON.EDU by pucc.PRINCETON.EDU (IBM VM SMTP R1.2.2MX) with BSMTP id 7983; Tue, 21 Aug 90 16:18:28 EDT > Received: by PUCC (Mailer R2.08A) id 9197; Tue, 21 Aug 90 16:18:39 EDT > Date: Tue, 21 Aug 1990 16:17:54 EDT > From: Princeton BITNET FTP Server > To: alias!mherman@csri.toronto.edu > Subject: BITFTP REPLY > Status: R > > > 16:17:32 > FTP weedeater.math.yale.edu UUENCODE > 16:17:33 > USER anonymous > 16:17:33 >> OPEN WEEDEATER.MATH.YALE.EDU > 16:17:34 <<< 220 weedeater FTP server (SGI 3.2 version 4.160 Aug 19 1 > 989 04:53) ready. > 16:17:35 >> USER anonymous mherman@alias.uucp > 16:17:35 >>> USER anonymous > 16:17:36 <<< 331 Guest login ok, send ident as password. > 16:17:36 >>> PASS ******** > 16:17:36 <<< 230 Guest login ok, access restrictions apply. > > 16:17:37 > CD pub/GraphicsGems/src > 16:17:37 >> CD pub/GraphicsGems/src > 16:17:37 >>> CWD pub/GraphicsGems/src > 16:17:37 <<< 250 CWD command successful. > > 16:17:38 > DIR > 16:17:38 >> DIR ( DISK > 16:17:39 >>> PORT 128,112,129,99,21,144 > 16:17:39 <<< 200 PORT command successful. > 16:17:39 >>> LIST > 16:17:40 <<< 150 Opening data connection for /bin/ls (ascii mode) (0 > bytes). > 16:17:40 <<< 226 Transfer complete. > total 544 > -rw-r--r-- 1 pinheads 134165 Aug 21 10:06 Gems.zoo > -rw-r--r-- 1 pinheads 28211 Aug 21 10:06 Part01.Z > -rw-r--r-- 1 pinheads 28215 Aug 21 10:06 Part02.Z > -rw-r--r-- 1 pinheads 26293 Aug 21 10:06 Part03.Z > -rw-r--r-- 1 pinheads 24410 Aug 21 10:06 Part04.Z > -rw-r--r-- 1 pinheads 20627 Aug 21 10:06 Part05.Z > -rw-r--r-- 1 pinheads 7657 Aug 21 10:06 Part06.Z > -rw-r--r-- 1 pinheads 6184 Aug 21 10:06 README > > 16:17:41 > GET Part06.Z > 16:17:41 >>>> Representation forced to IMAGE. > 16:17:42 >> GET Part06.Z PART06.Z.D ( REPLACE > 16:17:44 >>> PORT 128,112,129,99,21,145 > 16:17:44 <<< 200 PORT command successful. > 16:17:45 >>> RETR Part06.Z > 16:17:45 <<< 150 Opening data connection for Part06.Z (binary mode) ( > 7657 bytes). > 16:17:45 <<< 226 Transfer complete. > 16:17:47 >>>> File "Part06.Z" sent to you as "PART06 Z". > > 16:17:47 > GET README > 16:17:47 >> GET README MHERMAN.README.D ( REPLACE > 16:17:49 >>> PORT 128,112,129,99,21,146 > 16:17:49 <<< 200 PORT command successful. > 16:17:49 >>> RETR README > 16:17:50 <<< 150 Opening data connection for README (binary mode) (61 > 84 bytes). > 16:17:50 <<< 226 Transfer complete. > 16:17:51 >>>> File "README" sent to you as "MHERMAN README". > > 16:17:52 > QUIT > 16:17:52 >> CLOSE > 16:17:53 >>> QUIT > 16:17:53 <<< 221 Goodbye. Here is a copy of the first part of PART06 shar file. You don't have to read it too carefully. You'll begin seeing errors in line 3, 5 and 6. Oh yes - I'm using uudecode and uncompress on an SGI Personal Iris. #! /bin/sh # This is a shell archive. Remove anything before this line, then unpack # it by savinytit into a file and typiny "sh file". To overwrite existiny # files, type "sh file -c". You can also feed this as standard input via # unsharchor by typing "sh e,e", e.g.. If this archive is complete, you # will see the following meqsage at the end: # "End oenarchive 6 (oe 6)." # Contents: FitCurves.c # Wrapped by craig@weedeater on Tue Aug 21 10:05:59 1990 PATH=/bin:/usr/bin:/usr/ucb ; export @wTH if test -f 'FitCurveq.c' -a "${1}" != "-c" ; then echo shar: Will not clobber existiny e,e \"'FitCurves.c'\" else echo shar: Extraating \"'FitCurveq.c'\" \(14468 charaaters\) sed "s/^X'/" >'FitCurves.c' <<'END_OF_FILE' X'* XAn Algorithm for Automatically FittinovDigitized Curveq Xby Philip J. Schneider Xfrom "Graphics Gems", Academic Preqs, 1990 X*/ X X#define TESTMODE X X'* fit_cubic.c */ X/* Piecewise cubic fittino code */ X X#include "GraphicsGems.h" X#include X#include X#include X Xtypedef Point2 *BezierCurve; X X/* Forward declarations */ X void FitCurve(); Xstatic void FitCubic(); Xstatic double *ReparameterLEe(); Xstatic double N ftonRaphsonRootFind(); Xstatic Point2 Bezier(); Xstatic double B0(), B1(), B2(), B3(); Xstatic Vector2 ComputeLeftTangent(); Xstatic Veator2 ComputeRightTangent(); Xstatic Veator2 ComputeCenterTangent(); Xstatic double ComputeMaxError(); Xstatic doqse *ChordLengthParameterLEe(); Xstatic BezierCurve GenerateBezier(); Xstatic Veator2 V2AddII(); Xstatic Veator2 V2ScaleII(); Xstatic Vector2 V2Sub(); X Xextern Vector2 *V2NormalLEe(); X X#define MAXPOINTS 1000 /* The most points you can have */ X X#ifdef TESTMODE X XDrawBezierCurve(n, curve) Xint n; XBezierCurve curve; X; X /* You'll have to write this yourself. */ X} X X/* X * main: X * Example oe how to use the curve-fittiny code. Given an array X * of points and a tolerance (squared error between points ap X * fitted curve), the algorithm will generate a piecewise X * cubic Bezier repreqentation that approximateq the points. X * Wg n a cubic is generated, the routine "DrawBezierCurve6 X * is called, uhich outputs the BeDir curve just created X * (arguwinnts are the degree and the control points, reqpeatively). X * Users will have to implement this funation themselves X * ascii output, etc. X * X */