[Insight-developers] Level set inconsistencies
Lydia Ng
lng@insightful.com
Mon, 14 Oct 2002 12:44:41 -0700
SGkgSmltIGFuZCBKb3NoLA0KIA0KTWlncmF0aW9uIHRvIG5ldyBQREUgZnJhbWV3b3JrDQo9PT09
PT09PT09PT09PT09PT09PT09PT0NClllcywgSSBkbyBwbGFuIHRvIG1lcmdlIHRoZSBTaGFwZURl
dGVjdGlvbiBzdHVmZiBpbnRvIHRoZSBuZXcgUERFIGZyYW1ld29yay4NCkl0J3Mgb24gdGhlIG15
IGxpc3Qgd2hlbiBJIHJldHVybiAoTm92NCkuDQogDQpUaGUgU2hhcGVEZXRlY3Rpb24gZmlsdGVy
IGZvbGxvd3MgY2xvc2VseSB0byB0aGUgTWFsbGFkaS9TZXRoYWluIHBhcGVyIHdoaWNoDQpzcGVj
aWZpZXMgYSBuYXJyb3diYW5kIGltcGxlbWVudGF0aW9uIC0gc28gcGFydCBvZiB0aGUgbWlncmF0
aW9uIGlzIHRoZSBpbXBsZW1lbnRhdGlvbg0Kb2YgYSBuYXJyb3diYW5kIHNvbHZlciAobGlrZSB0
aGUgd2F5IHRoaW5ncyBhcmUgZG9uZSBmb3IgdGhlIFNwYXJzZUZpZWxkIHNvbHZlcikuDQogDQpJ
bnB1dHMgYW5kIFRlcm1pbm9sb2d5DQo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT0NCkluIFNoYXBlRGV0ZWN0aW9uIHRoZSBwcm9wb2dhdGlvbiBzcGVlZCBpcyBkZXRl
cm1pbmVkIGJ5IGEgImVkZ2UgcG90ZW50aWFsIG1hcCIgLSB3aGljaA0KdGhlIHVzZXIgc3VwcGxp
ZXMgZGlyZWN0bHkNCiANCkluIExhcGxhY2lhblNlZ2VtZW50YXRpb24gdGhlIHNwZWVkIGlzIGFs
c28gZGV0ZXJtaW5lZCBieSBlZGdlIHBvdGVudGlhbCBidXQgdGhpcw0KaXMgaGlkZGVuIGZyb20g
dGhlIHVzZXIgLSB0aGU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