|
Re: New rimgmap - help needed. |
Sounds to me that since the first set is being calculated correctly that what may be happening is that not all data arrays are being zeroed out (or re-initialized) prior to the next round of calculations (in the loop). I've heard that another common error might be using trig. function argumnets that have not been de-modulo'd back into the proper 0 - 2 Pi range (or whatever) per trig. function. This leads to returns from the trig function that may not be as accurate as could be (also leading to errors). This is may also be true for very small angles as well where larger errors may occur. I've also heard that something else to try is to Not re-use arrays but to use distinct arrays for each set of rings (with some padding in the array size declarations). This might avoid corruption of data. Also, try turning off the compiler "optimizer" (which might be the default setting and which might have a bug in it). Also try the same program on another computer (since there may be RAM errors or disk surface errors corrupting the output). Isolating the first calculation where there is an error might also help locate the problem. I've also heard that the correct quadrant of an arctangent function call may not return the correct one if care is taken in handling the sign(s) of the arguments. Hope this helps.... Just my $.02 worth p.s. You could also post the algorithm (without code) to see if there is a program design error too.
Follow Ups: ● Re: New ringmap - help needed. - Roger Hunter 05:24:50 - 4/1/2002 (14439) (0) |
|