Subject: Stepped in it again... (This message found in faqs.s05 is unfortunately applicable again and is being sent to all CPSC 215 students and TA's) ================================================================ Subject: Antialiasied image too dark (This message is being sent to all CPSC 215 students and TA's) On further review I think the method I suggested in class for antialiasing is sufficiently fraught with peril that I will suggest another one. (If you have the original one working correctly feel free to keep using it). Basically the problem is that if you try to ADD TO and NOT SET the intensity you have to be <<>> careful where and in what order you do things such as "scaling by 1/total_dist. If you apply that scaling to your accumulating sum you will destroy it. Hence for each component (amb, diff, specular) and for each ray you must FULLY COMPUTE THE COMPONENT in a local variable and then add it to the accumulating intensity. Unfortunately it is very easy to get this wrong. So I deserve -5 for suggesting a dangerous technique. dhus if you are having trouble in this domain I recommend going back to your antialiasing loop in mk_image() and doing something like: 38 for (m = 0; m < samples; m++) /* AA loop */ 39 { 40 double work[3]; 41 work[0] = work[1] = work[2] = 0.0; 53 : 54 ray_trace(lst, view->viewpt, dir, work, 0.0, NULL); 55 vl_sum3(intensity, work, intensity); 56 } and after you fall out of this loop divide "intensity" by samples. ------------------------------ Sorry for inducing confusion there! mw