// Add computation of precise visibility and accelerated precise visibility void showVisibleRays(RAY myRay) { // shows visible portions of rays in sampled directions from viewer clearDisks(); // to reset seen and touched to false vec T=myRay.T; for (float a=-PI; a<=PI; a+=PI/180) { float t=1000000; vec U=U(R(T,a)); int i = showVisibleRayPortion(ray(myRay.Q,U)); if(i!=-1) visible[i]=true; } } int showVisibleRayPortion(RAY myRay) { // shows portion of myRay not obstructed by any disk and returns index of obstructing disk or -1 float t=1000000; int j=-1; for (int i=0; i