Interactive computer graphics for undergraduate science teaching