A simulator for a visual inspection apparatus is provided. The apparatus
is equipped with a robot having an arm and a camera attached to a tip end
of the arm, the camera inspecting a point being inspected of a workpiece.
Using 3D profile data of a workpiece, information of lenses of cameras,
operational data of a robot, simulation for imaging is made for a
plurality of points being inspected of the workpiece. For allowing the
camera to image the points being inspected of the workpiece, a position
and an attitude of the tip end of the arm of the robot are obtained.
Based on the obtained position and attitude, it is determined whether or
not the imaging is possible. When the imaging is possible,
installation-allowed positions of the robot are decided and outputted as
candidates of positions for actually installing the robot.