A graphic rendering method using ray-tracing algorithm to render 3D objects