Simple method of optical ring cavity design and its applications