Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!usc!brutus.cs.uiuc.edu!jarthur!uunet!mcsun!sunic!nuug!ulrik!oivindt From: oivindt@ulrik.uio.no (Oivind Toien) Newsgroups: comp.lang.pascal Subject: Bug in TurboHALO Graphics Kernel? Message-ID: Date: 17 Feb 90 22:40:34 GMT Sender: oivindt@ulrik.uio.no (Oivind Toien) Distribution: comp Organization: University of Oslo, Norway Lines: 49 I have a problem that may interest TurboHALO users as well as those only using Turbo Pascal: I have written a plotting routine that is plotting lines or points at very short intervals using world-coordinates. It is used in a data acquisition routine to display the input on the A/D converter variable plotted against time. After some samples, however, the x-coordinate is at certain intervals not plotted correctly, but is plotted with a x-value 1-3 pixels lower than it is supposed to. When input to the routine is obtained from a sine-wave equation, it results in a jagged appearance. The effect is especially present when the distance between data-points is very short on the X-axis. However, the numbers passed to TurboHALO are correct! It is the address of the variables that is passed from Turbo Pascal to the TurboHALO routines. The error occurs when using the procedures: LnAbs, MoveAbs+PtAbs and PolyLnAbs. The problems are present with all versions of Turbo Pascal >= 3.0. Finally I detected a way to make the error appear and disappear: X : real; { x-coordinate} XInterval : real; { interval between points on x-axis} n : Integer; {counter variable} 1)It is present in the test routine if the X-value is calculated the following way: X:=X+Xinterval; 2)It is not present if the X-value is calculated this way: n:=n+1; X:=n*Xinterval; But I have still not been able to eliminate it in the routine used in the program, in spite of avoiding the no.1) approach. Something is still screwing up the system. (The source is to long to post). Has anyone out there had similar problems? I can E-mail source of test-routine if interest, I am especially interested if the problems exists with **HALO 88** which is an updated version of the same graphics kernel. I will be very pleased for any response. If you E-mail I will summarize. -- Oivind Toien Div. of General Physiology, Dept. of Biology, Univ. of Oslo P.O. Box 1051, N-0316 Oslo 3, NORWAY Phone+47-2-454732 Fax+47-2-454726