frac02.cpp converted to viewer.c