| [ QuizWit ] in KIDS 글 쓴 이(By): jccha (잊으면그만) 날 짜 (Date): 1999년 2월 8일 월요일 오전 01시 07분 21초 제 목(Title): Re: computational geometry. 흑흑 또 고쳐야 하겠군요 T.T dictionary order를 쓰면 at most 3 faces 에서만 만나니 좀 명확해질것 같습니다. x = 0; for i=1 to n for j=1 to n for k=1 to n begin if (c[i,j,k] = 1) s = c[i-1,j,k]+c[i,j-1,k]+c[i,j,k-1] if (s = 0) x = x+1 /* add one 0-handle */ else t = c[i,j-1,k-1]*c[i,j,k-1]*c[i,j-1,k] +c[i-1,j,k-1]*c[i-1,j,k]*c[i,j,k-1] +c[i-1,j-1,k]*c[i-1,j,k]*c[i,j-1,k] s = s-t if (t = 3) s = s+c[i-1,j-1,k-1] if (s = 0) x = x+1 /* add one 2-handle */ else if (s = 1) do nothing /* no change in homotopy type */ else if (s = 2) x = x-1 /* add one 1-handle */ else if (s = 3) x = x-2 /* add one 0-handle and add three 1-handles */ end 온라인으로 쓰려니 힘들군요 ^^; c[i,j,k]는 (i,j,k)에 있는 cell이 채워져 있으면 1, 아니면 0입니다. 그리고, i,j,k중 하나라도 0이면 c[i,j,k] = 0 으로 합니다. |