|
|||||||
АвтоАвтоматизацияАрхитектураАстрономияАудитБиологияБухгалтерияВоенное делоГенетикаГеографияГеологияГосударствоДомДругоеЖурналистика и СМИИзобретательствоИностранные языкиИнформатикаИскусствоИсторияКомпьютерыКулинарияКультураЛексикологияЛитератураЛогикаМаркетингМатематикаМашиностроениеМедицинаМенеджментМеталлы и СваркаМеханикаМузыкаНаселениеОбразованиеОхрана безопасности жизниОхрана ТрудаПедагогикаПолитикаПравоПриборостроениеПрограммированиеПроизводствоПромышленностьПсихологияРадиоРегилияСвязьСоциологияСпортСтандартизацияСтроительствоТехнологииТорговляТуризмФизикаФизиологияФилософияФинансыХимияХозяйствоЦеннообразованиеЧерчениеЭкологияЭконометрикаЭкономикаЭлектроникаЮриспунденкция |
Back-Face Detection
A fast and simple object-space method for identifying the back faces of a polyhedron [6] is based on the "inside-outside" tests discussed in Chapter 2. A point (x, y, z) is "inside" a polygon surface with plane parameters A, B, C, and D if (6.1) When an inside point is along the line of sight to the surface, the polygon must be a back face (we are inside that face and cannot see the front of it from our viewing position). We can simplify this test by considering the normal vector N to a polygon surface, which has Cartesian components (A, B, C). In general, if V is a vector in the viewing direction from the eye (or "camera") position, then this polygon is a back face if (6.2) Furthermore, if object descriptions have been converted to projection coordinates and our viewing direction is parallel to the viewing zv axis, then V = (0, 0, Vz) and (6.3) so that we only need to consider the sign of C, the z component of the normal vector N. In a right-handed viewing system with viewing direction along the negative zv the polygon is a back face if C < 0. Also, we cannot see any face whose normal has z component C = 0, since our viewing direction is grazing that polygon. Thus, in general, we can label any polygon as a back face if its normal vector has a z-component value: (6.4) Similar methods can be used in packages that employ a left-handed viewing system. In these packages, plane parameters A, B, C, and D can be calculated from polygon vertex coordinates specified in a clockwise direction (instead of the counterclockwise direction used in a right-handed system). Inequality 6.1 then remains a valid test for inside points. Also, back faces have normal vectors that point away from the viewing position and are identified by C ≥ 0 when the viewing direction is along the positive zv axis. By examining parameter C for the different planes defining an object, we can immediately identify all the back faces. For a single convex polyhedron this test identifies all the hidden surfaces on the object, since each surface is either completely visible or completely hidden. Also, if a scene contains only non-overlapping convex polyhedra, then again all hidden surfaces are identified with the back-face method. For other objects more tests need to be carried out to determine whether there are additional faces that are totally or partly obscured by other faces. And a general scene can be expected to contain overlapping objects along the line of sight. We then need to determine where the obscured objects are partially or completely hidden by other objects. In partially hidden by other general, back-face removal can be expected to eliminate about half of the polygon surfaces in a scene from further visibility tests. Поиск по сайту: |
Все материалы представленные на сайте исключительно с целью ознакомления читателями и не преследуют коммерческих целей или нарушение авторских прав. Студалл.Орг (0.004 сек.) |