Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - What is a light pen?
What is a light pen?
Light pen is an input device of computer, which is simple in structure, low in price, fast in response and simple in operation. It is often used in interactive computer graphics systems.

Guāng b light pen is an input device of computer, which is used in combination with display. Sensitive to light, shaped like a pen, multi-purpose cable connected to the host. You can draw pictures and do other operations on the screen. Light pen barcode reader

A photosensitive sensor inputs the information of characters or cursor position on the display screen into the computer through the light pen program in the computer. Light pen is an input device of computer, which is simple in structure, low in price, fast in response and simple in operation. It is often used in interactive computer graphics systems. In the graphic system, the light pen organically combines human intervention, display and computer to form a man-machine communication system. Using the light pen, you can directly select or modify the displayed graphics on the display screen. The external image of the light pen is a ballpoint pen, which consists of the pen body, lens group, optical fiber, switch and wire (Figure 1). When working, the light pen receives the light on the display screen, converts it into an electrical signal, generates a pulse signal after amplification and shaping, inputs it into the computer, and sends an interrupt request to the computer. The graphic file stored in the display buffer memory represents a graphic entity. This file is read out by the display controller in time sequence and translated into characters, vectors, etc. And then displayed on the screen by a character generator, a vector generator and the like. At this time, if the light pen stays at a certain position in the graph, the light pen sends an interrupt request because it detects light, and the light pen program immediately freezes the display. The "frozen" data state of the display provides the computer with information such as the address of the buffer memory, the coordinate position of the main deflection counter and the mode word of the controller. This information is the basis for computers to process graphics according to people's wishes (Figure 2). The light pen works in two ways: point selection and tracking. ① Point selection: also called calibration, it is the process of selecting an element in the display object as a reference point with a light pen and processing the display object. ② Tracking: also known as positioning, it is the process of displaying a cursor on the display screen (there can be no graphics on the screen) and dragging the cursor with a light pen to implement positioning. The cursor can be generated by a hardware method or a software method. Usually, the light pen can be used for three purposes: ① It can complete many complex functions such as drawing, changing drawing, rotating drawing, moving and enlarging, and it is very useful in engineering design; ② Select "Menu" to form a human-computer interaction interface; (3) The auxiliary editing program realizes the editing function. Light pen is an important input device in computer-aided publishing system. light pen