Close
About
FAQ
Home
Collections
Login
USC Login
Register
0
Selected
Invert selection
Deselect all
Deselect all
Click here to refresh results
Click here to refresh results
USC
/
Digital Library
/
University of Southern California Dissertations and Theses
/
Edge indexing in a grid for highly dynamic virtual environments
(USC Thesis Other)
Edge indexing in a grid for highly dynamic virtual environments
PDF
Download
Share
Open document
Flip pages
Contact Us
Contact Us
Copy asset link
Request this asset
Transcript (if available)
Content
EDGE INDEXING IN A GRID FOR HIGHLY DYNAMIC VIRTUAL ENVIRONMENTS by Beomjoo Seo A Dissertation Presented to the FACULTY OF THE GRADUATE SCHOOL UNIVERSITY OF SOUTHERN CALIFORNIA In Partial Fulfillment of the Requirements for the Degree DOCTOR OF PHILOSOPHY (COMPUTER SCIENCE) May 2008 Copyright 2008 Beomjoo Seo Dedication To my parents Soondeok Lee and Seunggeun Seo. to my wife Youngjin Choi. and to my lovely daughter Jiwoo. Without their love and support, this would not have been achieved. ii Table of Contents Dedication ii List of Tables v List of Figures vi Abstact ix Chapter 1 : Introduction 1 1.1 Motivation and Our Approaches . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.2 Contributions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 1.3 Organization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 Chapter 2 : Related Work 7 2.1 System Architecture of Remote Rendering Applications . . . . . . . . . . . . . . 8 2.2 Spatial Indexing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 Chapter 3 : Visibility Determination 14 3.1 Positioning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 3.2 Visibility Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 3.2.1 Terminologies and Symbolic Notations . . . . . . . . . . . . . . . . . . 20 3.2.2 Simple Visibility Model . . . . . . . . . . . . . . . . . . . . . . . . . . 21 3.2.3 Two View Orientation Paradigms . . . . . . . . . . . . . . . . . . . . . 25 3.2.3.1 User Paradigm . . . . . . . . . . . . . . . . . . . . . . . . . . 25 3.2.3.2 Object Paradigm . . . . . . . . . . . . . . . . . . . . . . . . . 26 3.2.4 Visibility Algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 3.2.4.1 User Model . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 3.2.4.2 Object Model . . . . . . . . . . . . . . . . . . . . . . . . . . 29 3.2.4.3 Hybrid Model . . . . . . . . . . . . . . . . . . . . . . . . . . 30 3.3 Evaluation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 3.4 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 Chapter 4 : Quantitative Analysis of Visibility Determination Models 39 4.1 Assumptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 4.2 A Stationary User in a Stationary Environment . . . . . . . . . . . . . . . . . . 46 4.2.1 Analysis of User Model . . . . . . . . . . . . . . . . . . . . . . . . . . 46 iii 4.2.2 Analysis of Object Model . . . . . . . . . . . . . . . . . . . . . . . . . 51 4.2.3 Analysis of Hybrid Model . . . . . . . . . . . . . . . . . . . . . . . . . 54 4.3 A Moving User in a Stationary Environment . . . . . . . . . . . . . . . . . . . . 56 4.3.1 Evaluation Metrics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 4.3.2 Analysis of User Model . . . . . . . . . . . . . . . . . . . . . . . . . . 58 4.3.2.1 Single lookahead and caching . . . . . . . . . . . . . . . . . . 59 4.3.2.2 Multiple lookahead and caching . . . . . . . . . . . . . . . . . 67 4.3.3 Analysis of Object Model . . . . . . . . . . . . . . . . . . . . . . . . . 73 4.4 Evaluation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77 4.4.1 A Stationary User in a Stationary Environment . . . . . . . . . . . . . . 77 4.4.2 A Moving User in a Stationary Environment . . . . . . . . . . . . . . . 79 4.5 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81 Chapter 5 : Real–time Support for Visibility Determination 83 5.1 Target Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84 5.2 Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85 5.2.1 Abstraction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86 5.2.2 Visibility Computation . . . . . . . . . . . . . . . . . . . . . . . . . . . 91 5.2.3 Edge Construction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93 5.2.4 Round–based Monitoring . . . . . . . . . . . . . . . . . . . . . . . . . 96 5.2.5 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99 5.3 Optimization Issues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100 5.3.1 Incremental Update . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101 5.3.2 Two–table Edge Indexing . . . . . . . . . . . . . . . . . . . . . . . . . 102 5.4 Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105 5.4.1 Memory Requirement . . . . . . . . . . . . . . . . . . . . . . . . . . . 107 5.4.2 Processing Cost . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107 5.4.2.1 Cell Evaluation Complexity . . . . . . . . . . . . . . . . . . . 113 5.4.2.2 Putting it Together: Periodic Monitoring Cost . . . . . . . . . 114 5.5 Evaluation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115 5.5.1 Simulation Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116 5.5.2 Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116 5.6 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119 Chapter 6 : Conclusions and Future Work 123 6.1 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123 6.2 Directions for Future Research . . . . . . . . . . . . . . . . . . . . . . . . . . . 125 References 126 iv List of Tables 3.1 Summary of symbolic notations for virtual entities and their spatial attributes. . . 21 3.2 Precision and Recall metrics of four query schemes. . . . . . . . . . . . . . . . . 33 5.1 Summary of symbolic notations. . . . . . . . . . . . . . . . . . . . . . . . . . . 121 5.2 Memory requirements of three indexing methods. . . . . . . . . . . . . . . . . . 121 5.3 Update time cost for a update event. . . . . . . . . . . . . . . . . . . . . . . . . 122 5.4 Summary of the expected elapsed time of all cell evaluations. . . . . . . . . . . . 122 5.5 Measured elapsed time (seconds) of 100K moving objects and 10K moving queries in a slowly moving environment (v =1). . . . . . . . . . . . . . . . . . . . . . . 122 5.6 Measured elapsed time (seconds) of 100K moving objects and 10K moving queries in a highly dynamic environment (v =15). . . . . . . . . . . . . . . . . . . . . 122 v List of Figures 1.1 In Second Life, a huge virtual building appears abruptly as an avatar moves for- ward after¢ seconds. (Courtesy of Linden Research, Inc.) . . . . . . . . . . . . 3 2.1 Illustration of data structures used in Query Indexing. . . . . . . . . . . . . . . . 12 3.1 A three–layered taxonomy of visible sets. The top, the intermediate, and the bottom layer represent an original dataset, visible sets after one or more filtering steps, and the finally rendered dataset, respectively. Ball–numbered edges denote different visibility algorithms. . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 3.2 Illustration of visual acuity model. Visible condition between a user and a target object is determined from three parameters : the width of the target w, the dis- tance between the twoD, and the angle subtended at the user’s eye by the target µ. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 3.3 Distributions of precision and recall metrics of RQ–OP. . . . . . . . . . . . . . . 33 3.4 Comparison of precision-recall curves of two hybrid schemes. . . . . . . . . . . 34 3.5 Precision-to-E–measure curves of RQ–OP, RQ–OR, and ACQ–OR (¯ =1). . . . 35 3.6 The E–measure metric as a function of the side length of user’s visible region. . . 36 3.7 Box–and–whisker plots of the E–measure metric of ACQ–OR are drawn as a function of grid partition model (¯ =2). . . . . . . . . . . . . . . . . . . . . . 37 4.1 An example 2D space where one thousand sample objects are randomly dispersed around a user at center. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 4.2 Performance metrics of a user model are drawn as a function of threshold ratio (z 0 ) under uniform distributions ofX andY . . . . . . . . . . . . . . . . . . . . . 50 4.3 The performance curves of an object model are drawn as a function of visual ratio (r) under uniform distributions ofX andY . . . . . . . . . . . . . . . . . . . . . 53 vi 4.4 The performance metrics of a hybrid model are drawn as a function of user’s threshold ratioz 0 under uniform distributions ofX andY . . . . . . . . . . . . . 56 4.5 Under uniform distributions ofX and Y , the E–measure values are plotted as a function of a threshold ratio (z 0 ) and a visual ratio (r). . . . . . . . . . . . . . . . 57 4.6 A simple user’s moving scenario. A user moves from left P 0 (¡v;0) to right P 2 (v;0) viaP 1 (0;0). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 4.7 An intersection example of two non-concentric circles. . . . . . . . . . . . . . . 60 4.8 A circleC 1 of radiusz is centered atP 2 . P 1 may be either (a) inside or (b) outside C 1 . Any arbitrary circleC 0 centered atP 1 may intersect, cover, be covered by, or do not meetC 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 4.9 A user’s moving scenario for multiple caching and prefetching policy. Every time intervalt i+1 ¡t i , a user moves fromP i toP i+1 , while storing the data collected during the previousm time intervals and prefetching for nextm time intervals. . 67 4.10 When a user moves fromP i toP j , newly discovered objects lie either on (1) or on (2) area. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70 4.11 For a givenx;y, the probabilityPr(Y 1 ·x) is visualized as the dotted arc length over the circumference of the circle of radiusy whose center isP 0 . . . . . . . . . 76 4.12 Analytical and simulation results of the E-measure values of the user model. The curves are plotted as a function of threshold ratio in (a) a uniform and (b) a nor- mal distribution of X. For the simulations, one million objects are uniformly distributed in a unit space. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77 4.13 Analytical and simulation results of the E-measure values of the object/hybrid model where visual ratio is one. . . . . . . . . . . . . . . . . . . . . . . . . . . 78 4.14 Analytical and simulation results of the E-measure values of the user model with single lookahead and caching policy. They are plotted as a function of threshold ratio in (a) a uniform and (2) a normal distribution ofX. For the simulations, one million objects are populated uniformly. The user moves 1 % of the unit space per time interval. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79 4.15 Analytical and simulation results of the E–measure values of the user model with multiple lookahead and caching policy, wherem=3. They are plotted as a func- tion of threshold ratio in uniform distributions ofX andY . For the simulations, one million objects are populated. The user moves 0.33 % of the unit space per time interval. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80 vii 4.16 The ratio of analysis results to simulation results of newly retrieved items by the object model in moving environments. . . . . . . . . . . . . . . . . . . . . . . . 81 5.1 A target system in a4£4 grid partition. . . . . . . . . . . . . . . . . . . . . . 84 5.2 Example of edge indexing of two point entitiesfP 1 ;P 2 g and two polygonal enti- tiesfR 1 ;R 2 g between two row–wise adjacent cells 3 and 4. . . . . . . . . . . . 90 5.3 Edge constructions for different types of object geometry . . . . . . . . . . . . . 94 5.4 Finalized row–wise edge structures and their corresponding symbolic notations. . 96 5.5 Illustration of different data structures for node indexing and edge indexing for the sample space in Figure 5.1. There are three object entities,fE1;E 2 ;Ag, and two user entities,fS;Ag in the world. . . . . . . . . . . . . . . . . . . . . . . . 100 5.6 Three different cases of newly updated cell intervals for appearance edges. Dashed lines are cell intervals of new visible region while dotted lines are those of old one. 101 5.7 Conceptual model of two–table edge indexing. . . . . . . . . . . . . . . . . . . . 104 5.8 Illustration of next possible cell locations, < i;j >, which moves i cells and j cells from a current location at < 0;0 >. The possible locations are classified into three groups: A,B, and within the same cell. . . . . . . . . . . . . . . . . . 108 5.9 Simulation results of the update complexity of different indexing methods. The update complexity is computed as the expected number of token removals and insertions per any object update and plotted as a function of maximum reachable distance (v). The average side length of the visible region is assumed to occupy 10% of the side length of 2D grid map. . . . . . . . . . . . . . . . . . . . . . . . 113 5.10 Size distribution of row edges. It uses100£100 grid model. . . . . . . . . . . . 116 5.11 Total elapsed time of different visibility determination schemes. . . . . . . . . . 118 viii Abstact Newly emerging game–based application systems provide three-dimensional virtual environ- ments where multiple users interact with each other in real–time. They are filled with au- tonomous, mutable virtual content which is continuously augmented by the users. To make the systems highly scalable and dynamically extensible, they are usually built on a client–server based grid subspace division where the virtual worlds are partitioned into manageable sub–worlds. In each sub–world, the user continuously receives relevant geometry updates of moving objects from remotely connected servers and renders them according to her viewpoint, rather than retrieving them from a local storage medium. In such systems, the determination of the set of objects that are visible from a user’s view- point is one of the primary factors that affect server throughput and scalability. Specifically, performing real–time visibility tests in extremely dynamic virtual environments is a very chal- lenging task as millions of objects and sub-millions of active users are moving and interacting. We recognize that the described challenges are closely related to a spatial database problem, and hence we map the moving geometry objects in the virtual space to a set of multi-dimensional objects in a spatial database while modeling each avatar both as a spatial object and a moving query. Unfortunately, existing spatial indexing methods are unsuitable for this kind of new envi- ronments. ix The main goal of this study is to present an efficient spatial index structure that minimizes unexpected object popping and supports highly scalable real–time visibility determination. We then uncover many useful properties of this structure and compare the index structure with various spatial indexing methods in terms of query quality, system throughput, and resource utilization. We expect our approach to lay the groundwork for next–generation virtual frameworks that may merge into existing web–based services in the near future. x Chapter 1 Introduction Newly emerging Massively Multi–player Online Games (MMOGs) have attracted many researchers because of their potential as a framework for next–generation virtual environments. In their three– dimensional (3D) virtual worlds, users can freely interact with other users in a similar way as they do in real world. Many MMOG applications, however, still limit themselves to a traditional design approach where their 3D scene complexity is carefully controlled in advance to meet real–time rendering constraints at the client console. To make the next–generation virtual landscape seamless, endless, and limitless, Marshall et al. defined four requirements 1 : dynamic extensibility, scalability, interactibility, and inter– operability [MDMW04]. The dynamic extensibility is the feature that a system can add or change virtual contents at run time. The scalability describes the requirement that the system should con- tinue to function effectively although the number of concurrent users increases. The interactibility means that the system provides a user with the mean to perceive and interact with the environ- ment around them in real–time. The inter–operability states the requirement that heterogeneous virtual environments can inter–operate each other. Since the interactibility is more relevant in the 1 Originally, these requirements were specified for their dedicated platform. But we acknowledge that these are also valid for the next–generation virtual environments. 1 field of Human–Computer Interaction (HCI) and the inter–operability is rather a system policy, we focus on the first two issues. The dynamic extensibility allows users to deploy their own created contents. While it is a very fascinating feature, the user created contents tend to make the existing scene complexity imbalanced, causing system–wide service disruption. Full support for the dynamic extensibility has been and will be one of the biggest challenges to a platform designer. Another important requirement is the scalability. Although many MMOG system vendors proclaim that their sys- tems can support hundreds of thousands of concurrent users, it usually does not mean that all users can interact with others simultaneously. Such massive numbers of concurrent users are achieved via careful space partitioning or world duplication. Typically, the maximum number of concurrent users in a stationary world managed by a dedicated system is limited to several thousands [CHHL05, KCC + 05]. Second Life [RO03] is one of the first successfully deployed MMOG systems that meet both requirements. Compared with the traditional game worlds, it provides an unlimited virtual landscape and allows users to upload newly created contents freely. To mitigate the dynamics of the game world where a large number of autonomous objects are continuously moving, Second Life employed client/server based 3D object streaming [TL01] and grid partitioning methodolo- gies, where a dedicated server who is in charge of one sub–world continuously transmits geometry data and update events to the connected users. Many scientists envisioned the future of online virtual worlds as a new way of innovative interaction model [Bai07]. We also believe that Second Life–like platform will play a key role in the development of next–generation networked virtual environments. A somewhat realistic interaction model for 3D virtual space may alter existing web–based browsing paradigm. 2 Avatar Object Popping (a) At time t (b) At time t+Δ Figure 1.1: In Second Life, a huge virtual building appears abruptly as an avatar moves forward after¢ seconds. (Courtesy of Linden Research, Inc.) 1.1 Motivation and Our Approaches The highly dynamic virtual environments that are based on 3D object streaming and grid sub– spacing technologies may face two problems: visual artifact and scalability. In streaming envi- ronments, a visibility determination algorithm at a server computes whether an object is visible to a user. If so, it will transmit the visible object to the user. If it fails to correctly identify visibly relevant objects, the user may experience a visual artifact, called an “object popping effect”. As illustrated in Figure 1.1, traditional visibility algorithms are exposed to such artifact. At timet, a building outside user’s visual scope would not be drawn (Figure 1.1a). When the user moved forward by the time(t+¢), the building would suddenly appear in front of user’s screen (Fig- ure 1.1b). If ¢ is small, or the building is big, such sudden appearance may disrupt the user’s navigation. To render 3D images in real–time, visibility algorithms should be not only very accurate, but also very fast. Moreover, they should handle a large number of concurrent users and moving 3 objects. This scalability issue was addressed by the observation that the maximum number of concurrent users in Second Life is still an order of magnitude smaller than in stationary worlds. To tackle these problems effectively, we isolate them in two research domains: visibility determination and spatial indexing. The visibility determination is the research area that elimi- nates visibly irrelevant objects from a huge object database. While it has been extensively studied in 3D computer graphics (local rendering), its client–server based object streaming model (remote rendering) has been little acknowledged. In this thesis, our visibility determination model targets the elimination of the object popping effect in the remote rendering. One challenging issue of the visibility algorithms, however, is the real–time support for a massive number of concurrent users and moving objects. To the best of our knowledge, there has been little success in 3D computer graphics, because most of the work focused on the local rendering applications. Interestingly, this graphics problem has a very close similarity to a spatial database problem, where a query can be viewed as a visibility determination process. The spatial indexing is a popular research topic in database community. It aims to support a massive number of objects and queries. Much of the work, however, is limited to Location– Based Services (LBS) that perform spatial searches on point databases. In this thesis, we explore the real–time capability of a new spatial indexing structure that is designed to support a large number of moving objects and moving queries. 1.2 Contributions The main contribution of this research is a real–time visibility determination solution for highly dynamic networked virtual environments. The list of itemized contributions is as follows: 4 1. Identifying why local rendering techniques are not directly applicable in remote rendering applications. 2. Confining the computationally tractable definition of visibility. Using the visual acuity model, we also derive the ideal visible distance between a user and an object. 3. Proposing a new view orientation methodology, called an object paradigm. To highlight the difference, the traditional view orientation approach is termed a user paradigm. Various visibility algorithms fall into one of the determination models that use either one paradigm or both. 4. Proposing a new evaluation methodology to quantify the degree of the search quality of visibility algorithms. 5. Designing visibility algorithms based on the object paradigm. We observed that our visibil- ity algorithms could retrieve more visibly relevant objects than existing ones, thus reducing object popping effect. 6. Presenting the lower bound and upper bound of the search quality of various visibility algorithms through probabilistic analysis model. We verified that our analytical model predicts the simulation results very accurately. 7. Designing a novel spatial indexing method, called an edge indexing. We verified that its performance is quite comparable to that for LBS applications, while retrieving more visibly relevant objects in real–time. We also confirmed that our indexing method can achieve two orders of magnitude improvements over naive visibility computation methods. 5 Our contributions, however, are not limited to a visibility determination domain. As en- visioned by Benford et al. [BF93], our work can immediately be applicable to various spatial interaction models. While some spatial quantities (i.e., user’s interest or object’s popularity) are difficult to be objectively measurable as a spatial unit, the visibility can easily be quantifiable and the ideal visible distance is obtainable. Thus, the visibility problem is specially chosen to effectively deliver our contributions. 1.3 Organization The remainder of this thesis is organized as follows. Chapter 2 surveys previous and related work in the field of networked virtual environments and spatial databases. In Chapter 3, we discuss the properties of the visibility. We also propose the use of visual acuity model that computes the ideal visible distance of a user and an object. In the same chapter, we introduce two view orientation paradigms, classify visibility algorithms using these paradigms, and evaluate their search quality. Chapter 4 locates the undiscovered properties of the visibility algorithms through analytical modelling. In Chapter 5, we present a new spatial indexing method based on edge structures and cover its optimization issues. We then evaluate the performance of our indexing method and compare with that of existing spatial indexing methods. Finally, Chapter 6 concludes this dissertation and presents directions on future research of this work. 6 Chapter 2 Related Work In 3D computer graphics, visibility determination has been and will be the fundamental problem. Since the very beginning of the computer graphics, visibility algorithms have been extensively studied. Many algorithms are, however, limited for local rendering applications, where all can- didate objects are stored locally. View-frustum culling, back–face culling, and occlusion culling are some of the well-known visibility algorithms [HS98]. If target objects are stored on a remote server, clients may receive the objects from the server databases. Such streaming approach is termed a remote rendering. Teller et al. proposed a geometry data scheduling algorithm that maximizes the quality of the frame rate over time in remote walkthroughs of complex 3D scenes from a user’s navigational path [TL01]. Funkhouser et al. showed that multi–resolutional representation, such as Levels Of Detail (LOD), can be used to improve rendering frame rates and memory utilization during interactive visualization [FS93]. However, these online optimization algorithms fail to address performance issue at the server in highly crowded environments. 7 In the graphics area, there has been little work on supporting real–time visibility computa- tions for a massive number of moving objects and users. Here we recognize that such graphics related issues have a very close similarity to spatial database problems. In this chapter, we separate related work in two parts. The first part describes various architectural approaches for the remote rendering applications. In the next part, we present recent trends in spatial databases that are specially designed to support a massive number of concurrent users in highly dynamic environments. 2.1 System Architecture of Remote Rendering Applications System architectures for networked virtual environments are classified into three groups: dedi- cated infrastructure, infrastructure-level game hosting, and Peer–to–Peer (P2P) architecture. The dedicated infrastructure hosts a single virtual world. In distributed environments, a dedicated server may host a duplicated single virtual space or host a sub–world. The dedicated architecture has been proven successful in many platforms for 3D gaming environments such as World Of Warcraft [wow] and Second Life [RO03]. The infrastructure–level game hosting refers to grid–based Content Distribution/Delivery Network (CDN) solutions. The CDN solution shares the infrastructure and supports hetero- geneous on–line game titles. The main benefit of this architecture is that it removes over– provisioning, thus reducing high risk and initial expense [KR04]. The web–caching may also be useful to host objects over the web, where geometry objects are cached by their popularity or latest version number. 8 Recent research has focused on adapting the P2P architecture, an elegant model that natu- rally supports a distributed server architecture. Every peer manages its dedicated zone. If any peer visits a sub–world hosted by another, it will receive further update events from the zone manager (another peer) through application–level multicast [IHK04, KLXH04]. The most serious problem of this architecture is that join and leave operations are so slow that it takes too long until the peer gets latest update events from the zone manager. Another is the security concern. Many studies seriously doubt the security resilience of the P2P architecture. Although a cheat-proof protocol has been proposed, it is too expensive [BL01]. Second Life provides an unlimited virtual space where users can freely navigate and up- load their virtual contents [RO03]. It is built on top of a distributed server grid model, where fixed square regions are hosted by one machine (simulator) in the server pool. The simulator simulates the physics, manages all geometry objects (including avatars) in its space, runs behavior scripts, and manages the terrain. It can also migrate the representation of moving objects to neighbor simulators and predict the next location of the object through a high-order dead–reckoning algo- rithm. The simulator continuously streams the objects inside user’s view frustum. This approach has been moderately successful in the newly emerging gaming market, but the object popping problem still exists. CyberWalk is one of distributed walkthrough systems [CGL + 98]. The authors proposed the use of visual scopes oriented from a user and an object. If the visual scopes of two entities collide, the entities are entitled visible to each other. Their visibility algorithm, however, uses a rather naive visibility test method, thus suffering from heavy computational overhead. Park et al. [PLLY01], unlike other studies that mainly focused on the relevance based on the distance proximity between users and objects [BF93, CGL + 98], emphasized the importance 9 of user–oriented factors such as reputation of target objects or user’s own interest. However, they didn’t consider how to identify such objects in networked environments. 2.2 Spatial Indexing Recently, a number of publications have addressed the scalability issue on how to support massive numbers of objects and queries in highly dynamic environments. To support frequent updates, two partitioning policies have been studied in depth: (1) R-tree based spatial indexing, and (2) grid–based spatial indexing. The R-tree is a well-known spatial index structure that allows over- lapping between the regions in different branches which are represented by Minimum Bounding Rectangles (MBR) [Gut84]. The grid–based partitioning model is a special case of fixed partition- ing. Recently, it has been re–discovered since it can be efficient in highly dynamic environments. Many studies have reported that the R–tree and its variants (R + -tree, R ¤ -tree) suffer from unacceptable performance degradation in a highly dynamic environment, primarily due to the computational complexity of the split algorithm [MK03, LHJ + 03, MXA04, KPH04, HXL05]. A bottom–up update strategy proposed for the R-trees [LHJ + 03] optimizes update operations while maintaining a top down query processing mechanism. Instead of traversing a tree from the root node for frequent update requests (top–down approach), it directly accesses the leaf node of the object to be updated via an object hash table. Myllymaki et al. [MK03] studied the performance of three main–memory spatial indexing methods (R–tree, array/hashtable, and a ZB tree) for spatial–temporal applications. They assumed that the update cost could be proportional to the population size and every populated object need be updated periodically. They used the bottom-up update policy for the R–tree implementation. 10 The authors claimed that the existing methods had a trade-off between location updates and query evaluations, and query cost is typically one to three orders of magnitude higher than update cost. Q-Index [KPHA02, KPH04] is one of the earlier work that re–discovers the usefulness of grid–based space partitioning for moving object environments. In contrast to traditional spa- tial indexing methods that construct an index on the moving objects, it builds an index on the continuous range queries, assuming that the queries move infrequently while the objects move freely. Figure 2.1 shows its three main–memory index structures (grid directory, query table, and Z–sorted object table) and their associations. The grid directory, a two–dimensional equal–sized space partitioning, consists of square-shaped disjoint cells. Each cell contains two singly–linked lists – Full and Part. An item in the list points to a query whose range intersects the cell region. If the query range covers the cell region fully, the query is augmented at the Full list; otherwise, it would be indexed at the Part list. Whenever a new query arrives or an existing query departs, its corresponding cell structure is updated accordingly. Point objects are stored at a dy- namic array and are sorted by space filling curves such as Z–order. Object updates are done only at the object table, thus allowing more freedom of object movements by separating the operation from query evaluation process. After the object updates, system–wise query evaluation follows. Every object in the table during the evaluation is scanned one by one by its sorting order and is indexed on the result set of its inclusion queries. Experiments reported that in dynamically changing environments where queries are rather stationary, the grid–based partitioning outper- formed the well–known spatial indexing schemes (i.e., the R–tree or its variants) by an order of magnitude difference. However, it still suffers from unacceptable system throughput in moving query environments. 11 Q 1 Q 2 Query Table Q 1 Q 2 part full Grid Directory Grid Cell C Z-Sorted Point Objects lookup Figure 2.1: Illustration of data structures used in Query Indexing. The basic idea of the Q+Rtree [XP03] is to separate indexing structures for quasi–stationary objects and moving objects: fast–moving objects are indexed in a Quadtree and quasi–stationary objects are stored in an R ¤ -tree. SINA [MXA04] was proposed to provide efficient query evaluations for any combination of stationary/moving objects and stationary/moving queries. Specifically, this approach only de- tects newly discovered (positive) or no longer relevant (negative) object updates efficiently. Every query (client) maintains in–memory table that is continuously updated whenever a new object is added (positive update) or an existing object is removed from the table (negative update). To support a large number of moving objects and queries, it uses a three–phase incremental update algorithm. The first step, hashing phase, searches join relations (or positive updates) among newly arrived object updates and query updates. The next step, invalidation phase, removes unneces- sary positive updates and puts the newly modified results back to the storage. The final phase refreshes the relations among moving objects and queries to make the system consistent and frees 12 all main–memory structures. These steps iterates periodically whenever new update events ar- rive. The authors presented that disk I/O and computational cost were significantly improved compared with typical multi–dimensional access methods. Unlike other spatial indexing methods that focus on the reduction of query evaluation cost, Hu et al. [HXL05] proposed a general framework that minimizes the communication cost for location updates by maintaining a rectangular area called a “safe region” around moving objects. As long as any object resides in this region, all query results are guaranteed to be valid in the system. If objects move out of their region, location update requests should be delivered to the database server and the affected queries are re–evaluated on the fly. Functionally, the safe region, although it was originally designed to mitigate unnecessary communication overhead in mobile environments, is very similar to our visible region in that every query should be aware of the existence of the region. The database server maintains two spatial index structures: an object index and a query index. The object index stores the current safe region of individual objects. The query index stores the properties of registered queries, current query results, and the quarantine area of the query. The quarantine area is guaranteed for all the objects in the query result set to be placed inside and re–computed whenever its query is evaluated. Similar to the Q–Index, every registered query is indexed not on the query window range but on its resulting quarantine area. Simulation results showed that location update cost could be significantly reduced, thus resulting in additional improvement on query re–evaluation. Our indexing method is very similar to this approach. The major difference is that we are more concentrating on real–time visibility determination while this approach assumes loose timing constraints. 13 Chapter 3 Visibility Determination Visibility determination is a filtering process that extracts visibly relevant objects from a given database. From the very beginning of computer graphics, it has been a fundamental problem. Since then, many visibility algorithms have been theorized, tested, and well adapted to many graphics applications; sometimes, they were excavated to the extreme [COCSD03]. In this chapter, we propose a new view orientation paradigm and present several visibility algorithms based on the new paradigm. Then we compare existing algorithms with our solutions. Our algorithms also embrace requirements for a new 3D framework – a highly dynamic virtual world. We believe that such framework will play a crucial role as a base platform for next– generation virtual reality systems and may replace existing web–based platforms. Our primary interest, however, is not solely suggest yet another cost–effective working solution on an existing 3D framework. It is rather demonstrate the insufficiency of existing visibility paradigm and ambitiously encourage many researchers to turn their attention to our new paradigm. Although similar ideas were already developed in earlier virtual reality sys- tems [BF93] [CLLS03], their essential properties and potentials have been rarely scrutinized and less acknowledged. 14 The organization of this chapter begins with the review of the existing algorithms in Sec- tion 3.1. To effectively deliver our challenges, we first introduce a three–layered taxonomy that classifies the existing methods by three different degrees of filtering granularity and then locate our target in the layers. In Section 3.2, we examine the formal definition of visibility and develop a simplified definition. We then continue to describe two fundamentally different view orientation paradigms and associate them with object popping problem. Later, we further classify visibility determination algorithms by three categories. In Section 3.3, we test various visibility determi- nation scenarios and report their performance results. Finally, we summarize the conclusion in Section 3.4. 3.1 Positioning There exists a seemingly small, but significant gap between well–established rendering accelera- tion algorithms in computer graphics (local renderings) and real practices prevalent in networked virtual environments (remote renderings), although they share the same problem (efficient visi- bility determination) and the same base platform (3D virtual space). In the local rendering, every geometry object is stored in a local storage medium. Once retrieved from the medium, the object is considered to be a candidate for the final image. To reduce rendering complexity, many visibility algorithms have been proposed to quickly eliminate visibly irrelevant objects. On the other hand, the remote rendering is developed on a client–server paradigm, where a server stores a large number of geometry objects and transmits the objects to their visibly relevant clients continuously. Remote rendering applications have been targeting to reduce network traffic while maintaining acceptable visual quality. 15 Several decades after the first appearance of 3D graphics acceleration algorithms, the local rendering algorithms have become mature enough to be widely deployed in many areas, while the remote rendering practices are still waiting for public attention. Such discrepancy is primarily due to their different assumptions on the knowledge of a visible set. That is, the local render- ing assumes a priori knowledge on the visible set while the remote rendering does not. Such differences were originated from different expectations on the network that was characterized as unreliable and expensive. Contrary to its high expectation, the remote rendering suffered from relatively slower progress of computer networks. In the meanwhile, the local rendering has been benefited by the unprecedented advances of computation power. Recent successful deployment of network facilities, that had never kept pace with the ad- vances of hardware–based graphics acceleration technology, finally, enabled us to glimpse the future of virtual world that the remote rendering had promised decades ago. Existing remote rendering systems, however, unveiled a disturbing visual artifact – object popping problem – that is hardly seen in the local rendering systems. Our visibility argument targets the minimization of such aberration in the remote rendering applications, attempting to fill the gap between the two rendering approaches. To answer why the local rendering techniques are not directly applicable to the remote rendering applications, we introduce a three–layered taxonomy to classify visible sets. It divides the visible sets into three groups, which are illustrated as rectangle boxes in Figure 3.1. The first– tier dataset is the original dataset representing a virtual world. The second–tier is an intermediate dataset that is loosely filtered from the first–tier dataset. The third–tier dataset is the visible set of the objects that contribute to the final display image. Ball numbered arrows in the figure stand for 16 Universe Image Potentially Exactly Approximately Original Intermediate Final Figure 3.1: A three–layered taxonomy of visible sets. The top, the intermediate, and the bottom layer represent an original dataset, visible sets after one or more filtering steps, and the finally rendered dataset, respectively. Ball–numbered edges denote different visibility algorithms. different granularity levels of visibility filtering processes. Visibility algorithms are associated with one of the arrows. The second–tier is further sub–divided into three sub–datasets – potentially, exactly, and approximately. Potentially is the abbreviation of Potentially Visible Set, also widely known as PVS. It consists of all visibly relevant objects and some visibly irrelevant objects. All visibly relevant objects that are fully or partially attributable to the final image are termed Exactly, an abridged version of Exactly Visible Set. Approximately Visible Set is another sub–dataset and represents a collection of objects that may be visibly relevant to a user. There exists another comprehensive visibility taxonomy proposed by Cohen–Or et al. [COCSD03], which is inappropriate for illustrating our question. It covers diverse visibility techniques, from fundamental issues in visibility to 3-D real–time rendering in walk–through systems. It classifies existing methods into four groups: point–based object precision method, point–based image pre- cision method, from–region method for architectural environments, and from–region method for generic scenes. The first and the second methods collect all polygonal or image–based objects 17 visible from a user’s current viewpoint. The third and the forth retrieve all potentially visible objects from a given region where a user resides. Within the region, PVS is obtained in advance if a scene architecture is known a priori (architectural). In a generic scene, computing its PVS is less useful, since every object in the scene may move from time to time. We can further subdivide the three tier architecture into following five different granularity levels of visibility filtering. We also present the relationship between our granularity levels and the groups in the comprehensive taxonomy. ² The first edge class computes PVS from a huge universe. To cover all visibly relevant objects, it tends to overestimate the visible relevance of an object. It includes architectural from–region methods. Conservative visibility algorithm is an interchangeable term that represents this class. ² The second class identifies EVS from a universe. It represents the ideal method that re- trieves visibly relevant objects with no overestimation nor underestimation. Point–based method belongs to this category. Such exact visibility algorithms can be considered as a special case of the conservative algorithms. ² The third class represents a method that , although not guaranteed to retrieve all visibly rel- evant objects, extracts objects that are very likely to be visibly relevant. Grid–partitioning and Area–Of–Interest (AOI) model belong to this category. It corresponds to from–region method for generic scenes. It is interchangeably referred to as approximate visibility algo- rithm. ² The fourth is a fine–grained visibility determination algorithm that searches EVS from a given PVS. Various visibility culling algorithms fall into this category. 18 ² The last one abstracts all the methodologies that construct the final image from a given input set (PVS, EVS, or A VS). It includes graphics card supported rendering mechanisms such as Hierarchical Z buffering or Levels of Detail (LODs) rendering. In computer graphics, all the filtering classes except the third are extensively investigated and applied to many local rendering systems. In such systems however, the cardinality of the universe tends to be much smaller than in remote rendering systems. Interestingly, to the best of our knowledge, there has been little work that explores the mea- surable property of visual relevance in the local rendering literature. Even it does exist, it would be limited to the quantification of the levels of detail in terms of visual perception [CT97] [OYT96]. Such disregard stems from the nature of the local rendering systems, which deal with PVS pre- dominantly. It implies that every object is considered visible no matter how much it is visibly relevant to a user. As the visibly irrelevant objects pass through sophisticated filtering steps, they were routinely excluded. Even they reached the final rendering stage, their existence would not interfere user’s visible experience, only increasing rendering complexity. In the remote rendering, the universe is no longer a small, stationary world. By using streaming technology, the universe can even be expanded endlessly. This freedom allows users to create their own world as they imagine, but it also increases search space. To reduce the search scope, the visibility algorithms for the remote rendering applications were forced to use approximation. For example, AOI model extracts the objects by their geographical closeness, not by visible relevance. The awareness of visual relevance turns out to be the most crucial factor that distinguishes the local rendering from the remote rendering. 19 3.2 Visibility Model In this section, we present a precising definition of visual relevance, expose its underlying prop- erties, and understand its limitations. To begin with, we define useful terminologies and symbolic notations used throughout the rest of this chapter. 3.2.1 Terminologies and Symbolic Notations Virtual entities in virtual space can be categorized into three groups by their role : autonomous entities, spectator entities, and avatars. The term autonomous entity refers to an ordinary moving or stationary geometric object that can be visible to other entities. Spectator entity corresponds to a player’s viewpoint. It is invisible to other entities, thus having no shape. It is represented only by a point location. It is designed to allow a game participant to see from a third–person viewpoint. It functions similar to camera control in 3D graphics. Moreover, it has higher degree of mobility than autonomous entity. Avatar represents a normal game user who can freely navigate in space and interact with other entities. It possesses both features of autonomous entity and spectator entity. For the remainder we use the term object entity (or shortly object) to refer to an autonomous entity or an avatar, while we use user entity (or shortly user) to denote an avatar or a spectator entity. For the purpose of formalism, we use following conventions. The symbol U denotes a universe, a set of whole entities in a given virtual space. The set of object entities is a subset ofU and denoted byO, while the set of user entities is symbolized asQ. Spatial property of an entity is expressed as a member variable. For example, a spatial extentS of an entitye is abstracted as e:S. Spatial extent has the form of either a rectangular shape (R) or a point (P ). 20 Table 3.1: Summary of symbolic notations for virtual entities and their spatial attributes. Symbol Meaning U set of entities that represents a virtual world O set of object entities,OµU Q set of user entities,QµU e:S Spatial attribute of an entitye wheree2U. S is either a rectangular shapeR or a pointP V maximum visible distance of an object entity Y euclidean distance between two entities A visual acuity of a user entity In addition to these basic notations, we add three more spatial variablesX;Y and Z that describe spatial relations between an object entityo and a user entityu. o:X represents the visible distance of a given objecto. Y(o;u) is the euclidean distance between two entitieso andu. u:Z is the visual strength of a given useru. Ifo andu were unambiguously identifiable in a context, they would be omitted. That is,o:X ´X;Y(o;u)´Y , andu:Z ´Z. Table 3.1 summarizes all the symbolic notations and their meanings. 3.2.2 Simple Visibility Model Visibility, in a dictionary, is defined as the greatest distance through the atmosphere toward the horizon at which prominent objects can be identified with the naked eye. From the definition, we can find following properties. Spatiality Visibility can be represented as a distance unit (the greatest distance). It means that it can be measurable and transformable to a spatial quantity. Relativity Visibility is a relative terminology defined between a normal observer (the naked eye) and a target object (prominent objects). 21 Duality If one visible condition between an observer and an observed object holds true from the observed object’s perspective, it should be equally true from the observer’s perspective. Totality Visibility is affected by many factors. It is a collective consequence of all affecting variables. Meteorological variables (i.e., atmosphere) are one of these variables. Among other properties, this property makes the visibility computation extremely complicated. Quantifying the degree of visibility of an object is a very broad research topic. For cen- turies, it has been studied in many different research areas. In physics, it is viewed as a collective consequence of the travelling paths of emitting lights over transmission media. In physiology, the visual cues perceived by a human eye may vary person to person, making a single value representation difficult. According to meteorological definition of visibility [Org06], visual range of an objectV is given by the following formula V = 1 ± ln jCj ² ; where ± is the extinction coefficient,C is the measured contrast of a given object against visual surroundings, and² is an observer’s momentary threshold contrast. Specifically,C is expressed as L 0 L s ¡1, where L 0 is the luminance of an object while L s is that of the visual surroundings. ±, representing transmission property of a medium through which a light is travelling, is the sum of an absorption coefficient and a scattering coefficient that can be obtained from Beer–Lambert–Bouguer law. The threshold contrast, ², is the minimum contrast at which a user can distinguish an object from a background. It is dependent on the size of an object, its distance to a user, and L s . Brightness and contrast of an object with its visual background are dominating factors that decide visual range. While the luminance of an object 22 is originated from its intrinsic property, the contrast is the combined effect of the luminance of its background objects. Hence, the visual range is not stationary, but dynamically changing. Computation of the visual range of an object, thus, requires a full knowledge on its background. So far, we have shown that the totality leads to enormous amount of computation to obtain one’s visual range, which changes over time. In this study, we do not attempt to develop an omnipotent visibility model that covers all the physical phenomena discovered by a human. Since computing the visual effect caused by the totality is too burdensome, we intentionally ignore the effect. Our further discussion is based on the three properties of visibility except the totality. It means that visibility condition is only defined between an observer and a target. One good candidate among existing visibility models, while preserving the three proper- ties, is Visual Acuity model. It has been widely acknowledged in virtual reality systems. It is a comparative measure of the ability to identify a given spatial pattern at a given distance. Typ- ically, a normal visual acuity is assumed to distinguish the pattern separated by a visual angle of one minute of arc (1MOA), or one sixtieth of a degree. Let the threshold visual angle of the normal eye be denoted byµ normal . The visual acuity of a user,A, is defined as A= V V norm ; (3.1) where V is the standard viewing distance while V norm is the measured distance at which the minimum test object subtends an angle of 1MOA [BBH + 65]. If a given user is said to have 20/40 snellen vision, it means that the target whose subtended threshold of 1 minute is at a distance of 40 feet is recognized at only from 20 feet away by the 23 w D θ target user Figure 3.2: Illustration of visual acuity model. Visible condition between a user and a target object is determined from three parameters : the width of the targetw, the distance between the twoD, and the angle subtended at the user’s eye by the targetµ. user. From now on, we assume that A uses a decimal representation; that is, 20/40 = 0.5. The higher visual acuity means that a user can identify a farther object. If a user’s visual acuity is known, the ideal visual distance will then beV =A¢V norm : As in Figure 3.2,V norm is computed from the size of a target and its 1MOA threshold angle. For a given target sizeW and its threshold angleµ norm , it is expressed as V norm = W 2tan µnorm 2 : Finally, the ideal visual distance is derived as a function of a given target size W and a given user’s visual acuity numberA. It is shown in Equation 3.2. V =C¢A¢W whereC = 1 2 cot µ normal 2 (3.2) Our simple visual acuity model, however, uses three assumptions. First, we assume that the threshold visual angle,µ norm , is applicable to every object. If user’s subtended angle to a target is greater than the threshold angle, the target should be perceived by the user. Second, user’s 24 visual sensitivity is assumed to be constant regardless of target size. 1 It means that a user can equally identify target objects as long as they are within the range ofµ norm . Lastly, to highlight the influence of W an A, our model intentionally neglects scaling correction such as the video resolution of a display device [Pfa00]. 3.2.3 Two View Orientation Paradigms There exist two aspects of view orientation between a target object and a user: a user paradigm and an object paradigm. The user paradigm assigns one’s visible range at a user’s current location, while the object paradigm sets up visible range at an object’s current location. In this section, we discuss their advantages and disadvantages. 3.2.3.1 User Paradigm It assigns visible range oriented at a user’s current location. In this paradigm, a user (u) can see objects (o) who are in its visible range. And the set of visible objects is formally defined as fo2Ojo:P 2u:Rg. The user paradigm is a traditional approach that has been widely used in literature. For example, LBS applications use this paradigm. Its prevailing use is owning to its simple design and easy implementation. In many applications, the number of objects is typically greater than that of users, so that it appears the user paradigm is a reasonable choice when lowering system load. On the other hand, a user maintains spatial geometry that represents its visible region. As it moves, it continues to request a range query to retrieve all objects within the region. 1 In fact, the visual sensitivity of target size is not always constant. It degrades after a specific distance [Pfa00]. Thus, far–away objects tend to be less accurately perceived by a normal human. 25 The user paradigm, however, has a serious problem when a user navigates in the virtual space: object popping problem. During the navigation, objects may appear on a user’s display in an unexpected manner. Say, a huge building at timet is located outside user’s visible region, thus not being rendered. At timet+¢, a user may move forward the building, which alternates user’s visible condition for the building. In response, the building appears att+¢. If the building is so immense while the¢ value is small, the user may collide with the building. In this paradigm, there is no other way but to increase user’s visible region to make such experience unlikely. Moreover, as exemplified above, the visible region may be proportional to the size of the biggest target among all target objects. If this policy were applied to every user who has the same visual strength, it would lead to system–wide performance degradation. 3.2.3.2 Object Paradigm To overcome such object popping problem, we propose a new view orientation paradigm: an object paradigm. In the object paradigm, every object possesses its own visible region, while users are represented by a point location. A system based on this paradigm allows the visible region dynamically changeable. If a user experience any popping effect on a specific object, the system may simply extend the visible region of the popped object. Therefore, when the user confronts the objects again, it no longer experiences any popping effect. Increasing the visible region reduces the occurrences of object popping not only for the user but also for other users who have the same visual strength. Moreover, it is a localized operation that only affects the object. Due to such localization, this paradigm does not incur any system–wide disasters. 26 Main strengths of this paradigm are that (1) it has no object popping problem as long as systems configure the visible range of every object correctly and that (2) the systems can provide enriched expressiveness of various spatial and temporal effects: a huge object may have a farther visible distance than a small one; an object has a longer visible distance during a day–time than at night; even during the night the visible range of a light source may have a much larger visible area than a non–illuminating object; if an object is located inside a building, its visible range will be limited within the building. One of potential arguments against the object paradigm is that the indexing complexity of an object is too high to be practical, compared with the user paradigm. We agree that existing spatial indexing methods are inefficient in supporting our new paradigm. To refute this argument, we propose a novel spatial indexing solution detailed in Chapter 5. Our spatial indexing solution offers a very promising performance even with a large number of mobile entities and visibility calculations in real–time. For the rest of the thesis our design scope is limited to 2D space, although our application targets 3D environments. Note that the object paradigm is not intended to rival a sophisticated visibility algorithms, but to efficiently filter out unnecessary entities that do not contribute to the final image. 3.2.4 Visibility Algorithms In this section, we classify visibility algorithms by which view orientation paradigms they use. They may use the user paradigm, the object paradigm, or both. Following taxonomy summarizes three visibility determination models and their specific database query schemes. ² User model 27 – RQ–OP: Region Query over Object Points ² Object model – PQ-OR: Point Query over Object Regions ² Hybrid model – RQ-OR: Region Query over Object Regions – ACQ-OR: Approximate Cell Query over Object Regions To quantify the retrieval quality of individual models, we use two well-known performance metrics, Precision (P) and Recall (R). They, respectively, estimate the degree of accuracy and comprehensiveness of a given result set [VR79]. Equation 3.3 summarizes the definitions ofP andR. P = Relevant and Retrieved Retrieved ;R = Relevant and Retrieved Relevant (3.3) P is the ratio of visibly relevant among retrieved items. A lowerP implies that the search results contain a large number of visibly irrelevant objects. A higherP means that more visibly retrieved items are retrieved than a lower P . R is the ratio of retrieved items among visibly relevant items. A lowerR indicates that more visibly relevant objects are falsely neglected and it leads to more frequent object popping. 3.2.4.1 User Model It uses the user orientation paradigm. Its database query scheme is RQ–OP, where the query type is range query. RQ–OP is the prototypal query scheme that retrieves all the objects whose 28 location is inside user’s visible range. AOI andk-Nearest Neighbor Query (k-NNQ) 2 belong to this model. From a given user u, a set of retrieved objects filtered by RQ–OP is computed as the set of the objects that satisfy following condition: fo2Ojo:P 2u:Rg. A set of visibly relevant objects, however, is not directly obtainable from RQ–OP. To compare the two sets, we assume that there exists an ideal method that computes the visibly relevant objects correctly. 3 Let the set of visibly relevant items to a given user u satisfy following condition,fo2Oju:P 2o:Rg. A set of retrieved and visibly relevant items is the join operation of the two sets – that is, fo2Oju:P 2o:R^o:P 2u:Rg. As a result, P and R measures of the user model observed by the useru are stated as follows: P RQ¡OP (u) = jfo2Ojo:P 2u:R^u:P 2o:Rgj jfo2Ojo:P 2u:Rgj R RQ¡OP (u) = jfo2Ojo:P 2u:R^u:P 2o:Rgj jfo2Oju:P 2o:Rgj Above equations imply that RQ–OP always under-estimates the ideal results, because the numerators are subsets of the denominators. 3.2.4.2 Object Model It uses the object view orientation paradigm. Its visibility determination, PQ–OR, identifies the objects whose visible range intersects with a user location and is expressed asfo 2 Oju:P 2 o:Rg. If the visible distance of an object is set to the ideal visible distance, this scheme can 2 In fact,k-NNQ is not linearly transformable to RQ–OP, since it does not assume any spatial attribute originated from a user. However, many k-NNQ solutions adopted the AOI scheme to narrow down the search space. Thus, it may well be viewed as a variant of RQ–OP. 3 In fact, it is obtained from our object model by setting the visible distance of an object as its ideal visible distance. 29 recognize every visibly relevant object. Therefore,P andR metrics of the object model observed by the useru are P PQ¡OR (u) = jfo2Oju:P 2o:Rgj jfo2Oju:P 2o:Rgj =1 R PQ¡OR (u) = jfo2Oju:P 2o:Rgj jfo2Oju:P 2o:Rgj =1 3.2.4.3 Hybrid Model It uses both orientation paradigms, where both users and target objects have their own visible ranges. The visibility between a user and an object is defined as the overlapping of their visible ranges. For example, Aura–nimbus model proposed by Benford et al. [BF93] belongs to this model. In their model, every virtual element has two degrees of awareness (coarse–grained and fine–grained awareness) and its interaction with other elements is transformed as a collision event of the subspaces of the two objects at the same degree. Aura is a coarse-grained awareness that describes the subspace that makes an object eligible interact with other objects. A fine-grained awareness is aura’s inner subspace that makes an object actually interact with others. Here we propose two query schemes for the hybrid model: RQ–OR and ACQ–OR. RQ– OR is the combination of RQ–OP and PQ–OR. Every object and user have visible ranges. If two visible ranges intersect, associated user and object will be said visible to each other. For a given user u, an object in a set of retrieved items that satisfiesfo 2 Ojo:R\u:R 6= ;g. If visible distance of an object is set as the ideal visible distance, the set of visibly relevant items will be expressed asfo 2 Oju:P 2 o:Rg. A set of relevant and retrieved items, the join set of the two 30 sets, is simplified as u:P 2 o:R, since u:P is the element of u:R. Thus, P and R measures of RQ–OR observed by the useru are P RQ¡OR (u) = jfo2Oju:P 2o:Rgj jfo2Oju:R\o:R6=;gj R RQ¡OR (u) = jfo2Oju:R\o:R6=;gj jfo2Oju:P 2o:Rgj = jfo2Oju:P 2o:Rgj jfo2Oju:P 2o:Rgj =1: The P measure indicates that RQ–OR always under-estimates the ideal search quality, since u:P is a subset of u:R. Whereas, the R measure matches the optimal solution as long as the visible range of an object is set to the optimal distance. This scheme, thus, does not cause any object popping. TheP measure of RQ–OR resembles that of RQ–OP, while theR measure of RQ–OR resembles that of PQ–OR. ACQ–OR is a special case of RQ-OR. While RQ–OR is computationally efficient, ACQ– OR is expected to collect visibly relevant items very efficiently, because it mixes the qualitative dominance of the object model and the operational efficiency of the user model. It assumes that a given 2D virtual space is partitioned into equal–sized grid cells. It does not use the visible range of a user. Instead, it uses the region of the cell, where a user resides. If a cell region intersects with the visible region of an object, the object will be said visible to every user in the cell. That is, ACQ–OR identifies the objecto satisfying a spatial conditionc:R\o:R6=;, where the user u is inside the cellc (u:P 2 c:R). A set of retrieved items for a given useru is computed from fo 2 Ojc:R\ o:R 6= ;; u:P 2 c:Rg. A set of visibly relevant items is the same as that of 31 PQ–OR. A set of retrieved and relevant items,fo2Ojc:R\o:R6=;; u:P 2c:R; u:P 2o:Rg, is the same as the set of relevant items, sinceu:P is the element ofc:R. P ACQ¡OR (u) = jfo2Oju:P 2o:Rgj jfo2Ojc:R\o:R6=;;u:P 2c:Rgj R ACQ¡OR (u) = jfo2Oju:P 2o:Rgj jfo2Oju:P 2o:Rgj =1 The recall metric of ACQ–OR inherits the property of RQ–OR, retrieving all relevant items correctly. The precision metric of ACQ–OR depends on a user’s relative position in a cell and the side length of the cell region. 3.3 Evaluation To collect the performance data of four query schemes (RQ–OP, PQ–OR, RQ–OR, and ACQ– OR), we set up the simulation environments as follows. Our simulation program populated 100K object entities and 10K user entities in 2D unit space, [0;1)£ [0;1). The populated entities are uniformly distributed in the unit space. For fast computation, we use square–shaped visible regions. The side length of the visible range is also uniformly assigned in the range of[0:05;0:14], meaning 5% to 14% of the side length of the unit space. The program performs exhaustive intersection tests between all user entities and all object entities and computes theP ,R, and their E–measure metrics for every user entity. The expected evaluation result sets of individual query schemes are summarized in Table 3.2. 32 Table 3.2: Precision and Recall metrics of four query schemes. Query Scheme Precision (P) Recall (R) User model RQ–OP jfojo:P2u:R;u:P2o:R)gj jfojo:P2u:Rgj jfojo:P2u:R;u:P2o:R)gj jfoju:P2o:Rgj Object model PQ–OR jfoju:P2o:Rgj jfoju:P2o:Rgj =1 jfoju:P2o:Rgj jfoju:P2o:Rgj =1 RQ–OR jfoju:P2o:Rgj jfoju:R\o:R6=;gj jfoju:P2o:Rgj jfoju:P2o:Rgj =1 Hybrid model ACQ–OR jfoju:P2o:Rgj jfojc:R\o:R6=;;u:P2c:Rgj jfoju:P2o:Rgj jfoju:P2o:Rgj =1 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Recall (R) Precision (P) 5% Range Query 6% Range Query 7% Range Query 8% Range Query 9% Range Query 10% Range Query 11% Range Query 12% Range Query 13% Range Query 14% Range Query Optimality Figure 3.3: Distributions of precision and recall metrics of RQ–OP. Distribution of Precision and Recall Figure 3.3 shows the distributions of precision and recall metrics of RQ—OP. We observed that the precision and recall curves were roughly inversely proportional to each other when we varied user’s visible ranges. A smaller side length leads to higher accuracy but lower comprehensive- ness. For example, 5% of the side length of the visible range of a user (5% Range Query in the figure) retrieved the objects of at least5% side length. RQ–OP, however, failed to detect the objects outside the visible range of the user, thus suffering from too many missing objects that 33 0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1 Recall (R) Precision (P) 5% region query 6% region query 7% region query 8% region query 9% region query 10% region query 11% region query 12% region query 13% region query 14% region query 0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1 Recall (R) Precision (P) 1000x1000 grid model 100x100 grid model 10x10 grid model (a) RQ–OR (b) ACQ–OR Figure 3.4: Comparison of precision-recall curves of two hybrid schemes. ought to be rendered. The larger the user’s visible range is configured, the more likely unneces- sary objects are detected. To remove any object popping problem, the side length of any visible range should be greater than or equal to the maximum visible distance of any object. Figure 3.4 showed the precision and recall measures of the hybrid schemes observed at every sample user. We observed that all the recall measures are one, while the precision mea- sures vary depending on different side length of visible region of a user (see Figure 3.4a) or on different grid partitioning methods (see Figure 3.4b). Especially, Figure 3.4b draws the effect of the performance metrics by three grid partition models: 10£10;100£100; and 1000£1000. ACQ–OR with a coarse-grained partition model such as10£10 reported worse retrieval accuracy than RQ–OR. Distribution of E-measure As seen in Figure 3.4, the precision–recall diagram didn’t visualize any meaningful trend of the hybrid model effectively. To illustrate any hidden properties of the hybrid model, we propose the 34 0 0.2 0.4 0.6 0.8 1 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Precision (P) E−measure RQ−OP RQ−OR ACQ−OR (100x100 grid model) Figure 3.5: Precision-to-E–measure curves of RQ–OP, RQ–OR, and ACQ–OR (¯ =1). use of E–measure–to–precision diagram. The E–measure is a standardized single–valued query evaluation metric that combines the precision and recall [VR79]. It is defined as E =1¡ (¯ 2 +1)PR ¯ 2 P +R ; where¯ is the relative importance of precision and recall. If¯ is equal to 1,P andR are equally important. If¯ is less than 1,R becomes more important. Otherwise,P will affect the E–measure significantly. A lower E–measure value implies that a tested query scheme has a higher quality. The optimal E–measure value is zero, when precision and recall measures are both one. Note that we do not present the distributions of the E–measure values of the object model, because it always returns zero. In Figure 3.5, we observed two trends. First, the precision of RQ–OP lied in between ACQ–OR and RQ–OR. Second, the tendency curve of the precision–to–E–measure plot of RQ– OR showed resemblance to that of ACQ–OR. It looked as if the two curves lied on the same 35 5 6 7 8 9 10 11 12 13 14 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Side length of Query Region (%) E−measure RQ−OP RQ−OR ACQ−OR (100x100 grid model) 5 6 7 8 9 10 11 12 13 14 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Side length of Query Region (%) E−measure RQ−OP RQ−OR ACQ−OR (100x100 grid model) (a)¯ =1 (b)¯ =2 Figure 3.6: The E–measure metric as a function of the side length of user’s visible region. imaginary curve. It conveys that ACQ–OR inherits the properties of RQ–OR. Intentionally,c:R was configured to be comparatively smaller thanu:R. Figure 3.6 illustrates whether the E–measure values obtained from the simulations depend on the side length of user’s visible region. As expected, the E-measures of RQ–OP and RQ– OR clearly showed such dependency, while that of ACQ–OR showed irrelevance with the side length of user’s visible region. When the precision and recall metrics are equally important (¯ =1), the E–measures of RQ–OP tend to be improved gradually with a larger side length until it reaches a minimum. After passing the minimum, overall search quality starts to deteriorate. In the meanwhile, RQ–OR shows the monotonic performance degradation as user’s query length increases. It is because accuracy factor dominates the performance while preserving the fixed recall value. If the recall measure is more important than the precision measure(¯ = 2), a larger side length will stabilize the E-measure of RQ–OP. 36 10x10 20x20 50x50 100x100 200x200 500x500 1Kx1K RQ−OP 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 E−Measure Visibility Determination Scenario Median of RQ−OP Figure 3.7: Box–and–whisker plots of the E–measure metric of ACQ–OR are drawn as a function of grid partition model (¯ =2). Effect of Different Grid Size Figure 3.7 shows the statistical difference of E–measure values of ACQ–OPR and RQ–OP. Es- pecially, seven different grid models were simulated for ACQ–OR scheme. We used a box–and– whisker plot to show both median values and the variances of the distributions of the E-measure metric. For the purpose of comparison, we also showed the median of the E–measure metric of RQ–OP. While we observed some outliers when evaluating ACQ–OR, its E-measures were heavily concentrated around the median. It implies that ACQ–OR is less sensitive to the side length of the visible region of an object. As expected, a finer–grained partition model showed a smaller E-measure value. RQ–OP showed a wider variance of its E–measures, which is largely attributable to different user side length. If the recall is more important than the precision, then the performance of ACQ–OR will be improved more evidently than that of RQ–OP. From Fig- ure 3.7, the20£20 grid model depicted a better E-measure in a prioritized environment than in 37 an equal-prioritized environment. Therefore, we conclude that at least the 20£20 grid model based ACQ–OR retrieves a higher quality of visible sets than RQ–OP. 3.4 Summary In this chapter, we introduced a new view orientation paradigm, an object paradigm, and com- pared it with existing view paradigm called a user paradigm. To quantitatively compare various visibility algorithms, we first classified existing visibility algorithms by the way how they use view orientation paradigms. Among them, RQ–OP, a traditional visibility query scheme, was shown as an example for the user model, where each user has its own visible distance. In the object and hybrid model, we presented three visibility query schemes – PQ–OR, RQ-OR, and ACQ–OR. Especially, ACQ–OR was designed to meet both ends : performance and quality. To justify our new approach, we validated the usefulness of the object model, by presenting the performance metrics of the simulation results of every visibility query scheme. Finally, we conclude that the object model can achieve the optimality on search quality and even some hybrid query schemes such as a fine–grained grid–based ACQ–OR can outperform the user model. 38 Chapter 4 Quantitative Analysis of Visibility Determination Models Preliminary experiments presented in previous chapter successfully demonstrated that the ob- ject model could achieve a better performance than the user model in terms of search quality. However, it was only validated in a controlled simulation environment. Since the distribution pattern of object size is unknown, we are not fully convinced whether the object model always outperforms the user model. Main objective of this chapter is to derive a very accurate prediction model of three vis- ibility models. By predicting the performance outcomes of the visibility algorithms for various distribution patterns of object size, we will have a better understanding of the characteristics of the visibility algorithms. The organization of this chapter is as follows. Section 4.1 introduces probabilistic nota- tions, conventions, and assumptions. In Section 4.2, we present an analytical model that predicts the performance outcomes of the three visibility models (user, object, and hybrid) in a stationary environment, where every virtual entity is immovable. In the following chapter, we extend the 39 −0.5 −0.4 −0.3 −0.2 −0.1 0 0.1 0.2 0.3 0.4 0.5 −0.5 −0.4 −0.3 −0.2 −0.1 0 0.1 0.2 0.3 0.4 0.5 x 2D x 2D Z Y X D Figure 4.1: An example 2D space where one thousand sample objects are randomly dispersed around a user at center. analytical model in a semi–moving environment, where only users are allowed to move. Sec- tion 4.4 describes the evaluation results of the analytical model and discuss their implications. Finally, Section 4.5 summarizes the conclusion of this chapter. 4.1 Assumptions Imagine a sample space, a two–dimensional disk of radius D. It is illustrated in Figure 4.1. In the space, a user of interest (a black square) is located at the center and objects (dashed circles) are evenly dispersed. A specially chosen object among the objects is shown as a bigger dashed circle. In the figure, its visible range is depicted as a dotted circle (right). It is assumed to be derived from object sizeW . The visible range of the user is also drawn as the same dotted circle (left), which is derived from user’s visual acuity numberA. Then we introduce three random variables,X;Y; andZ.X is a distance unit that represents the visible range of an object. In Figure 4.1, it is the radius of the right dotted circle. Y denotes 40 the euclidean distance between a user and an object. Z, a distance unit, symbolizes the visible range of a user. In the same figure, it means the radius of the left dotted circle. Probability density functions ofX;Y; andZ are denoted asf X (x);f Y (y); andf Z (z), respectively. For the convenience of analysis, we assume that every random variable has its maximum value, whose symbolic notations areD X ;D Y , andD Z . We also assume that there exist two mapping functions that transform A and W into Z and X, respectively. Such functions, defined in Equation 4.1 and 4.2, are denoted as Á A and Á W . Intuitively, these are regarded as a non-decreasing function. For example, a user who has a higher visual acuity number can identify a farther object. Similarly, a bigger object can easily be perceived by a user at a farther location. Á A : A!Z (4.1) Á W : W !X (4.2) The differences of the three visibility models, in fact, stem from different mapping con- ventions. For instance, application services that are based on the user model share the following common convention, shown in Equation 4.4. It means that a visible attribute of an object with different length is ignored during the visibility determination. The mapping convention forÁ A , however, relies heavily on user’s or system’s decision. For the time being, the user in the space is assumed to have chosen a fixed constantz. It is termed a user’s threshold, or shortly a threshold. Accordingly, the ratio of a user’s threshold value to the maximum value, z 0 = z D Z , is called a threshold ratio. For the user model, Equation 4.1 is, thus, mapped to Equation 4.3. 41 Á A : A!z (4.3) Á W : W !0 (4.4) In the user model, an object is said to be visible to a user if the object is inside user’s thresh- old range. Such visible condition is formally defined as the spatial condition that the euclidean distance of the object location from the user location is less than or equal to user’s threshold. It is equally expressed as visible ifY ·z: (4.5) The object model uses different mapping conventions (see Equation 4.6 and 4.7). Please note that Equation 4.6 does not mean that every user has no visual strength. Instead, it indicates that every user possesses the same sight vision. Without loss of generality, the visual acuity number is set to one, meaning that the user has a normal vision. As expected, Equation 4.7 is the special case of Equation 3.2, whereA=1. Á A : A!0 (4.6) Á W : W !C¢W (4.7) 42 An object is determined to be visible to a user if the user is inside the visible range of the object. The visible condition of the object model is also expressed as visible ifY ·C¢W =V norm ; (4.8) whereV norm =C¢A norm ¢W =C¢W . The hybrid model uses arbitrary mapping conventions. To the best of our knowledge, existing literature such as CyberWalk [CLLS03] has no specific mapping functions for the visible regions for objects and users. To analyze this model, we propose linear mapping conventions shown in Equation 4.9 and 4.10. These also correspond to our intuition. Á A : A!C A ¢A (4.9) Á W : W !C W ¢W; (4.10) where C A and C W are constant factors of A and W , respectively. Since we will evaluate the performance metrics of the given user whose visual distance is also given by the same threshold z, Equation 4.9 will be replaced by the same mapping convention of the user model. In Equa- tion 4.10, a proper choice ofC W will be the crucial factor that affects the search quality. An object is computed to be visible to a user if two visible ranges intersect with each other. The formal expression of such visible condition is as follows: visible ifY ·X +Z =z+C W ¢W: (4.11) 43 From a user’s standpoint, D and D Y are functionally identical, since the distance of the farthest object from the user (D Y ) does not exceed user’s search domain (D). The object beyond the domain does not contribute to any improvements on search quality, while increasing search scope unnecessarily. To include all the visibly relevant objects, D Y should be large enough to cover any combinations of X and Z. At the same time, the domain scope should be carefully chosen as compact as possible, not to search more than required. Therefore,D Y that meets both constraints satisfies following expression. D =D Y =minfmaxfZ;XZ;X +Zgg A!1 = minfmaxfz;C¢W;z+C W ¢Wgg Althoughz is chosen arbitrarily, it will not exceed the search scope. Otherwise, it may lead to over–estimation, resulting in significant quality degradation. Discussions on the side–effect of such over–estimation will be fully covered later. Similarly, C W will be smaller than C. As a result, above expression is finally induced to a simple form,D Y =D X +z. Now, we introduce a useful notation that represents a spatial condition,I S (Y). It is defined on a set of euclidean distance (Y ) between two entities,I S :Y !f0;1g, whereS is any distance unit. For any given actual distancey2Y , it is defined as I S (y)= 8 > > < > > : 1 : y·S 0 : otherwise: (4.12) If the given distance is smaller than S, the indicator function will return one; otherwise, it will return zero. 44 The main objective of this analysis is to derive a powerful prediction model that esti- mates the performance results of individual visibility determination models accurately. Since our prediction model includes probability distribution functions as input arguments, we can easily evaluate the expected behaviors of the visibility models on newly discovered distribution patterns and make a quick decision. To make such derivation systematically solvable, we narrow down the problem scope by constraining the density pattern on Y , assuming that two objects that are equidistant from an observer have the same density probability. Uniform distribution is one example of such distribu- tion patterns. This assumption, although not reflecting all the real–world phenomena, is powerful enough to express different degrees of crowdedness. Lemma 1 provides a uniform density func- tion ofY . Lemma 1 A uniform density function ofY is f Y (Y =y)= 2¼y R D Y 0 2¼ydy = 2y D Y 2 (4.13) Proof: It is trivial. In 2D sample space, the area occupied by the objects whose distance to the user is y is the circumference of a circle of radiusy. Thus, the probability density is computed from the circumference of a circle of radius y whole area = 2¼y ¼D Y 2 . While f Y (y) is limited to a uniform distribution, f X (x) still remains undetermined. In the following section, prediction models for the three visibility determination approaches are presented as a function off X (x) andf Y (y). 45 4.2 A Stationary User in a Stationary Environment There exist n objects and a user in the sample space, where every entity is immovable. To predict the performance of individual visibility models, we will use Recision and Recall metrics. They are computed from three atomic result sets: the expected number of retrieved objects; the expected number of visibly relevant objects; and the expected number of retrieved and visibly relevant objects. 4.2.1 Analysis of User Model Let X i be the visible distance of an object i and Y i be its euclidean distance from a user. The optimal visible distance of the objecti from the user, V opt i , is derived from visual acuity model – that is, V opt i = C¢A¢W i , where W i is the size of i. To recognize visibly relevant objects, we intentionally assume thatX i is assigned asV opt i . In addition, the user is assigned to a unique thresholdz. The expected number of retrieved items recognized by the user model, Ret u , is the car- dinality of the set of objects whose euclidean distance to the user is less than or equal to user’s threshold. To express such spatial condition, we use a binomial function, I z (Y i ), that indicates whether the objecti is inside user’s threshold range. Using the indicator function,Ret u is equiv- alently expressed as the sum of indicator functions. Ret u = n X i=1 I z (Y i ) 46 Above equation will then be converted to the following probabilistic model. By definition, the probabilityPr(Y ·z) is written as the integral off Y (y) within the threshold. n X i=1 I z (Y i )=n ¢E[I z (Y)]=n ¢Pr(Y ·z)=n Z z 0 f Y (y)dy Finally,Ret u is derived as the Cumulative Distribution Function (CDF) ofY . Ret u =n ¢F Y (z) (4.14) The expected number of visibly relevant items,Rel u , is formulated as the number of items whose euclidean distance to the user is less than or equal to an optimal visible distance. For a given objecti, it is expressed asY i · V opt i = X i . Using the binomial indicator for two random variablesI X (Y), it is similarly defined as the summation ofI X i (Y i ). Rel u = n X i=1 I X i (Y i )=n ¢E[I X (Y))]=n ¢Pr(Y ·X) To reduce Pr(Y · X) to the distribution functions ofX and Y , we use the law of total probability. For a given distancex2X , the conditional probability whose euclidean distanceY is less than or equal toX isPr(Y ·x). Thus,Pr(Y ·X) is the summation off X (x)¢Pr(Y · x) for every possiblex. Pr(Y ·X) = Z X f X (x)Pr(Y ·XjX =x)dx = Z X f X (x)Pr(Y ·x)dx 47 = Z X f X (x)F Y (x)dx Therefore,Rel u is expressed as Rel u =n Z D X 0 f X (x)F Y (x)dx: (4.15) The expected number of relevant items among retrieved items,Ret\Rel u , is the sum of the probability that the object is not only inside user’s threshold range but also its distance to a user is within the optimal visible distance. It is simplified as: Ret\Rel u =n ¢Pr(Y ·z;Y ·X): Using the total probability theorem, the probabilityPr(Y · z;Y · X) is then expanded to the sum of two cases : the case whenX ·z and the other case whenX >z. Z z 0 f X (x)Pr(Y ·z;Y ·x)dx+ Z D X z f X (x)Pr(Y ·z;Y ·x)dx The left term is further simplified as R z 0 f X (x)Pr(Y · x)dx, since a given value x be- longing to the first case is always less thanz. Likely, the right term is reduced to R D X z f X (x)Pr(Y · z)dx. Consequently, the final form ofRet\Rel u is then Ret\Rel u =n¢ µZ z 0 f X (x)F Y (x)dx+ Z D X z f X (x)F Y (z)dx ¶ : (4.16) 48 If we apply uniform distribution patterns ofX andY such asf X (x) = 1 D X andF Y (y) = y 2 D 2 Y , Equation 4.14, 4.15, and 4.16 are, respectively, reduced to Ret u = n 3D 2 Y ¢3z 2 Rel u = n 3D 2 Y ¢D 2 X Ret\Rel u = n 3D 2 Y ¢fz 2 (3¡2 z D X )g where0·z·D X : We can further simplify above equations as threshold ratio,z 0 . Originally, it was defined as z D Z . But since we only cover the given space,D X is substituted forD Z . That is,z 0 = z D X . The ratio means that how much the user model can cover the sample space. The ratio one implies that the user model discovers all the objects within the space, while zero means that the user cannot observe any objects, thus no items being retrieved. Ret u = nD 2 X 3D 2 Y ¢3z 02 (4.17) Rel u = nD 2 X 3D 2 Y (4.18) Ret\Rel u = nD 2 X 3D 2 Y ¢fz 02 (3¡2z 0 )g where0·z 0 ·1 (4.19) From Equation 4.17 and 4.18, we can induce an equilibrium condition whenz 0 = 1 p 3 ¼ 0:58. The equilibrium condition is the critical point, where the numbers of retrieved items and relevant items are equal. We can relate this point with network traffic. Before reaching to the point, the user model is guaranteed to retrieve smaller items than the object model, even though 49 0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1 Threshold Ratio (z’) Ratio Recall (R) Precision (P) E−measure ( beta = 1) Critical Point Figure 4.2: Performance metrics of a user model are drawn as a function of threshold ratio (z 0 ) under uniform distributions ofX andY . many of the retrieved items may not be visibly relevant 1 . As a result, it may consume less network bandwidth when transmitting the results to a real user. After the point, the use of the user model has no advantage, since the object model will not retrieve more items than necessary. Finally, the performance metrics of the user model are derived as a function ofz 0 : P u = Ret\Rel u Ret u = 1 3 (3¡2z 0 ) R u = Ret\Rel u Rel u =z 02 (3¡2z 0 ) E ¯=1 u = 4z 03 ¡3z 02 +1 3z 02 +1 Figure 4.2 illustrates the performance tendency of the user model. Precision and recall reveal their typical trade–off relation. As the threshold ratio increases, the recall increases rapidly at the beginning and slows down later, while the precision decreases linearly. The E–measure curve depicts the combined effect of precision and recall. As the threshold ratio moves right, 1 At the critical point, a number of retrieved items (39 percent) are visibly irrelevant. 50 the E–measure moves downwards, a negative slope. When the critical point is approached, the slope of the E–measure curve, still decreasing, is slowed down and finally a minimum (0.36) is found when the ratio is around 0.68. Thus, the best operation scenario of the user model is when a user’s threshold is set to 68 % ofD X . Nevertheless, the user model cannot obtain any optimal E–measure. 4.2.2 Analysis of Object Model The key element of object model lies on the quality of the mapping function forX. As exempli- fied in Equation 4.7, we use the visual acuity distance forX. This approach, however, raises one crucial argument. Our visual acuity model does not compute the actual ideal visible distance. It only calculates the approximation of the ideal. Due to the totality of visible distance, the ideal distance may vary over time, so that it is extremely difficult to obtain its latest value. We admit that our visual acuity model is just one of realistic approximations and there may exist a better approximation than our model. If we imagine an ideal method that computes the exact optimal visible distance, it will be interesting how badly an approximation solution affects the performance. To do this, we introduce separate notations for the two aspects of visible distance of an object instancei: one by approximationX i and the other by the ideal methodX opt i . In addition, we also propose the use of visual ratio,r. It is defined as the ratio of the optimal distance to the approximated distance. r = X opt X 51 A visual ratio greater than one means that an approximation solution underestimated an ideal distance. Otherwise, the approximation would overestimate the ideal. The expected number of retrieved items by object model,Ret o , is computed as the sum of indicator functions that distinguish whether a user is inside object’s visible boundary. Ret o = n X i=1 I X i (Y i )=n Z X f X (x)F Y (x)dx (4.20) The expected number of relevant items,Rel o , is the number of objects whose ideal visible distance is greater than or equal to the euclidean distance to a user. It is expressed as a function off X (x),F Y (y), andr. Rel o = n X i=1 I X opt i (Y i )= n X i=1 I r¢X i (Y i )=n Z X f X (x)F Y (r¢x)dx (4.21) The expected number of retrieved and relevant items,Ret\Rel o , is the cardinality of the intersection set ofRet o andRel o . If the visible distance is overestimated, then it would beRet o . Otherwise, it would beRel o . Ret\Rel o =min(Ret o ;Rel o ) (4.22) For uniform distributions ofX andY , Equation 4.20, 4.21, and 4.22 are Ret o = nD 2 X 3D 2 Y Rel o = nD 2 X 3D 2 Y ¢r 2 Ret\Rel o = nD 2 X 3D 2 Y ¢min(1;r 2 ): 52 0 0.5 1 1.5 2 0 0.5 1 1.5 Visual Ratio Ratio Precision (P) Recall (R) E−measure Overestimation Underestimation Optimal Point Figure 4.3: The performance curves of an object model are drawn as a function of visual ratio (r) under uniform distributions ofX andY . Finally, the performance metrics of the object model under uniform distributions are ob- tained as follows: P o = min(1;r 2 ) R o = min(1; 1 r 2 ) E ¯=1 o = jr 2 ¡1j r 2 +1 : Figure 4.3 depicted the expected performance trend of an object model. If a visual ratio is chosen carefully (r = 1), the object model will be in an optimal condition, where all retrieved objects are all visibly relevant to a user. If the ratio were underestimated (r >1), every retrieved object would be all visibly relevant but not all visibly relevant objects would be retrieved. In such situation, the object model may suffer from object popping. If overestimated, the object model would identify all the visibly relevant objects, while retrieving visibly irrelevant objects unnecessarily. Compared with the user model, it may achieve the optimality. 53 One may argue that the object model cannot support the heterogeneity of user’s visual desire, sine a single visible distance value per object will serve for all different users. For some users, it would return the optimal results, while for others it would return underestimated or overestimated results. This argument makes sense in real world, since every real user has different visual strengths. However, in simulated virtual environments, every user tends to possess the same sight vision. It is questinable whether allowing different visual strength per user is practically meaningful in such environments. 4.2.3 Analysis of Hybrid Model An object instancei has its own visible distance (X i ) and its euclidean distance to a user (Y i ). Its ideal visible distance to the user is denoted as X opt i , or X i ¢r. The user is assumed to have its visible thresholdz. The expected number of retrieved items by a hybrid model,Ret h , is the number of sum of indicator functions,I X+z (Y). Ret h = n X i=1 I X i +z (Y i )=nPr(Y ·X +z) = n Z X f X (x)F Y (x+z)dx (4.23) The expected number of relevant items by the hybrid model,Rel h , is the same as that by the object model. Rel h =Rel o =n Z X f X (x)F Y (r¢x)dx (4.24) The expected number of relevant and retrieved items,Ret\Rel h , is simplified as 54 Ret\Rel h =nPr(Y ·X +z;Y ·r¢X) (4.25) Equation 4.25 is subdivided into two cases whenr > 1 andr · 1. For the former, there exists an intersection pointx p of two linesr¢x andx+z, i.e.,x p = z r¡1 . If the pointx p is smaller thanD X , the Equation 4.25 will be expressed asn¢ ³ R z r¡1 0 f X (x)F Y (r¢x)dx+ R D X z r¡1 f X (x)F Y (x+z)dx ´ . Otherwise, it will beRel h , becausex+z is always greater than or equal torz. 2 For the latter, it isRel h , becausex+z¸rx for anyx2X. As a result, the final form ofRet\Rel h is expressed as: Ret\Rel h = 8 > > < > > : n¢ ³ R z r¡1 0 f X (x)F Y (r¢x)dx+ R D X z r¡1 f X (x)F Y (x+z)dx ´ : r>1; z·(r¡1)D X n R X f X (x)F Y (r¢x)dx=Rel h : otherwise (4.26) If we use uniform distributions ofX andY and substituteD X ¢z 0 forz, above equations are then Ret h = nD 2 X 3D 2 Y ¢(3z 02 +3z 0 +1) (4.27) Rel h = nD 2 X 3D 2 Y ¢r 2 (4.28) Ret\Rel h = nD 2 X 3D 2 Y ¢ 8 > > < > > : n (1+z 0 ) 3 ¡( r r¡1 ) 2 z 03 o : r >1;z 0 ·(r¡1) r 2 : otherwise : (4.29) Figure 4.4 shows three performance patterns of the hybrid model for one overestimation case (r = 0:5) and two underestimation cases (r = 1:5 andr = 2:0). When the visual ratio was 2 x+z¡rx¸(r¡1)(DX¡x)¸0. Thus,x+z¸rx. 55 0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1 Threshold Ratio (z’) Ratio Recall (R) Precision (P) E−measure 0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1 Threshold Ratio (z’) Ratio Recall (R) Precision (P) E−measure 0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1 Threshold Ratio (z’) Ratio Precision (P) Recall (R) E−measure (a)r =0:5 (b)r =1:5 (c)r =2:0 Figure 4.4: The performance metrics of a hybrid model are drawn as a function of user’s threshold ratioz 0 under uniform distributions ofX andY . overestimated, an increase of the threshold ratio lowered the precision measure, thus deteriorating overall performance. If the visual ratio were underestimated, the figure revealed that there was an overall tendency that the precision and recall metrics still showed a trade-off relation and the local minimum of the E–measure metric was found shortly after passing the critical point. Such tendency resembles that of the user model shown in Figure 4.2. If the threshold ratio is zero (z 0 = 0), the performance metrics will exactly match those in the object model. In Figure 4.5, the E–measure metric was plotted as a function of two ratios. The figure demonstrated that the hybrid model had both features of the user model and the object model. 4.3 A Moving User in a Stationary Environment So far, our analysis has been limited to a case for a stationary user in a stationary environment. In such environment, the user model cannot utilize its feature fully. Thus, the analysis presented in Section 4.2 covered the lower bound of the performance metrics of the visibility models. If a user is allowed to move in the space, the user model may take advantage of using two aggressive strategies – caching and prefetching. Caching method allows a user to reuse the retrieved objects that were collected and delivered during a previous round. Prefetching pre–computes the objects 56 Figure 4.5: Under uniform distributions of X and Y , the E–measure values are plotted as a function of a threshold ratio (z 0 ) and a visual ratio (r). that will be retrieved during next round and retrieves them in advance. Therefore, prefetched items can be used as soon as the data is available to a user. If objects are also allowed to move, such aggressive strategies may worsen the perfor- mance, because cached and prefetched items are no longer guaranteed to be useful during a cur- rent round. Thus, the best operation scenario for the user model is only when a user moves while objects are still stationary. It means that the analysis of a moving user in a stationary environment presents the upper bound of the performance for the user model. It is evident that the performance of a moving user in a moving environment lies between the upper and the lower bound. In this section, the analysis is primarily focused on the predictable behaviors of a moving user in a stationary environment. In addition, we will narrow down our analysis on the comparison of the user model and the object model. To simplify the analysis, we also assume that there is no computational overhead on testing whether cached items are reusable. 57 4.3.1 Evaluation Metrics In a moving environment, the original precision and recall metrics do not reflect the performance of the visibility models accurately. For example, we may take a snapshot and compute the perfor- mance metrics of the snapshot to use the original metrics. This method, however, cannot account for the effect of caching and prefetching, since a user does not need to retrieve cached items. Likely, prefetched items should be treated as retrieved items. To include such effect, definitions of precision and recall metrics are modified as follows: P = relevant items among newly retrieved items newly retrieved items R = relevant items among all retrieved items relevant items : A modified precision metric is designed to quantify the accuracy of newly discovered items. A moving user who stores previous search results will perform a new search whenever it moves. To save the network bandwidth, it may download only newly discovered items. Thus, we only deal with the quality of newly delivered items, whether how many items are visibly rel- evant. On the other hand, a modified recall metric evaluates the comprehensiveness of all search results, since any stored item can be visibly relevant at current time. 4.3.2 Analysis of User Model In this section, we start from a simple analytical model for a single caching and prefetching scenario and then extend the model for a more general scenario – that is, multiple caching and prefetching scenario. A single caching and prefetching means that the user only stores the search 58 t 0 t 1 t 2 θ θ z v v z current past future P 0 P 1 P 2 Figure 4.6: A simple user’s moving scenario. A user moves from leftP 0 (¡v;0) to rightP 2 (v;0) viaP 1 (0;0). results that were retrieved at previous location and that will be retrieved at next location. Current search results, of course, were prefetched at the previous location. Multiple caching and prefetch- ing extends the idea of single caching and prefetching policy. Instead of storing only one step earlier and later search results, it stores multiple search results. 4.3.2.1 Single lookahead and caching Imagine a following scenario. At timet 0 , a user was located somewhere in 2D space. Then it has moved to a current position at timet 1 and shall move to a new location at timet 2 . Without loss of generality, the user locations at timet 0 ;t 1 ;t 2 are assumed to beP 0 (¡v;0);P 1 (0;0);P 2 (v;0), respectively. This moving scenario is visualized in Figure 4.6. LetRet i denote the number of retrieved objects at timet i . For example,Ret 1 means that the set of items retrieved at time t 1 . Similar conventions at the time t 1 are also applied to the number of relevant items (Rel 1 ) and the number of retrieved and relevant items (Ret\Rel 1 ). 59 C 0 C 1 θ P 0 (0,0) P 1 (x,0) I 1 R 0 R 1 Figure 4.7: An intersection example of two non-concentric circles. Assuming that a user has a threshold z, a single lookahead and caching policy at timet 1 keeps all the retrieved items that was identified at t 0 (a single caching) and searches items that will be identified at timet 2 (a single lookahead). At the timet 1 , the user has the previous search results (Ret 0 [Ret 1 ) that were obtained att 0 and obtains new search resultRet 2 . If it moves to P 2 att 2 ,Ret 0 will be released, while newRet 3 will be prefetched. Therefore, the total retrieved items att 1 areRet 0 [Ret 1 [Ret 2 , while visibly relevant items att 1 are stillRel 1 . As a result, modified precision and recall measures for the single lookahead and caching policy are expressed as: P = (Ret 2 ¡(Ret 1 [Ret 0 ))\Rel 1 Ret 2 ¡(Ret 1 [Ret 0 ) R = Rel 1 \(Ret 0 [Ret 1 [Ret 2 ) Rel 1 : Before analyzing the performance metrics, we present a useful lemma. As in Figure 4.7, the length of the dotted arc of two arbitrary overlapping circlesC 0 ;C 1 is derived from Lemma 2, which is extensively used in the remainder of this chapter. 60 Lemma 2 Arc length of two non–concentric overlapping circlesC 0 ;C 1 whose radii and centers areR 0 ;P 0 (0;0) andR 1 ;P 1 (x;0), respectively, is2R 0 ¢arccos ³ x 2 +R 2 0 ¡R 2 1 2xR 0 ´ . Proof: One of the intersections ofC 0 andC 1 is represented byI 1 (R 0 cosµ;R 0 sinµ), whereµ is a radian angle\I 1 P 0 P 1 . Since the point also lies onC 1 , it satisfies(R 0 cosµ¡x) 2 +(R 0 sinµ) 2 = R 2 1 . This equation is solved ascosµ = x 2 +R 2 0 ¡R 2 1 2xR 0 and thenµ is induced toarccos ³ x 2 +R 2 0 ¡R 2 1 2xR 0 ´ . Since the given arc length is2¢µ¢R 0 , the lemma is correct. In this analysis, we use a notational conventionY i that denotes the euclidean distance of an object location from a user location at timet i . Note that it is notY to the poweri. Newly Retrieved Items Newly retrieved items are the objects that will be identified att 2 among the unidentified objects at timet 0 andt 1 . Its probabilistic form is thenn¢Pr(Y 2 ·z;Y 1 >z;Y 0 >z): From Figure 4.6, it is evident that any object that satisfies Y 2 · z;Y 1 > z;Y 0 > z may well be simplified asY 2 · z;Y 1 > z, since the user moves from left to right horizontally. Finally, we obtain its integral form, using the law of total probability. Ret 2 ¡(Ret 1 [Ret 0 ) ´ n¢Pr(Y 2 ·z;Y 1 >z) = n Z D Y z Pr(Y 1 =y;Y 2 ·z)dy Using Bayes’ Theorem, the intersection of two events,Y 2 · z andY 1 = y, is expanded as f Y (Y 2 · z;Y 1 = y) = f Y (Y 1 = y)¢f Y (Y 2 · zjY 1 = y). As will be seen in Lemma 3, newly retrieved items are only in the range ofz andz+v. 61 P 2 (v,0) z P 1 (0,0) P 2 (v,0) z P 1 (0,0) (a) Case 1: v <z (b) Case 2: v¸z Figure 4.8: A circleC 1 of radiusz is centered atP 2 . P 1 may be either (a) inside or (b) outside C 1 . Any arbitrary circle C 0 centered at P 1 may intersect, cover, be covered by, or do not meet C 1 . Z D Y z Pr(Y 1 =y;Y 2 ·z)dy = Z v+z z f Y (Y 1 =y)¢f Y (Y 2 ·zjY 1 =y)dy The conditional density functionf Y (Y 2 ·zjY 1 =y) is obtained from Lemma 3. Lemma 3 Let the euclidean distance of an object from a user at time t 1 be y 2 Y 1 . If Y 1 is uniformly distributed, the probability that the euclidean distance of the object from the user at timet 2 is less than or equal toz is given by f Y (Y 2 ·zjY 1 =y)= g(y) ¼ where g(y)= 8 > > > > > > < > > > > > > : ¼ : y·z¡v 0 : y·v¡z y¸v+z arccos ³ y 2 +v 2 ¡z 2 2yv ´ : otherwise : (4.30) 62 Proof: Let a circle C 1 of radius y be centered at P 1 (0;0) and another circle C 2 of radius z be centered atP 2 (v;0). Any object whose distance to a user isy will lie onC 1 . If any point on the C 1 also lies on an arc of two intersection points betweenC 1 andC 2 , it will satisfyY 2 ·z, since it is insideC 2 . Therefore,f Y (Y 2 ·zjY 1 =y) is arc length of C 1 in C 2 2¼y : From Lemma 2, we can derive the arc length. As in Figure 4.8, overlapping conditions betweenC 1 andC 2 can be classified in two cases: v <z orv¸z. Case (1): v <z ² Ify < z¡v,C 1 is insideC 2 . Thus, everyy on the circumference ofC 1 satisfiesY 2 · z. That is,f Y 2(Y 2 ·zjY 1 =y)=1. ² Ifz¡v· y· z+v, two circles intersect. From Lemma 2, the arc length ofC 1 inC 2 is obtained. ² Ify >z+v, there exists no intersection point between two circles. Case (2): v¸z ² Ify <v¡z, two circles are disjoint. ² Ifv¡z·y·v+z, two circles intersect. From Lemma 2, the arc length is used. ² Ify >v+z, two circles do not intersect. Thus, the Lemma is correct. If we use a uniform distribution ofY and apply Lemma 1 and 3, newly retrieved items are derived as : Ret 2 ¡(Ret 0 [Ret 1 )= 2n ¼D Y 2 Z v+z z g(y)ydy: (4.31) 63 Relevant Items The expected number of relevant items at t 1 , Rel 1 , is the same as that of the user model in Equation 4.15. For the same outcome, the integral ofRel 1 can also be expressed by the random variableY 1 . Although this derivation is unnecessary, understanding the derivation may be very useful, since similar derivations are heavily used in the remainder of this chapter. The probability Pr(X ¸ Y 1 ) is expanded by the law of total probability. For every euclidean distance y 2 Y 1 , the probability that the visible distance of the object is greater than or equal toy will bePr(X ¸y), which by definition is reduced to1¡F X (y) or simplyF X (y). Since X and Y are independent, their joint density function will then be the product of two individual density functions. Rel 1 = n¢Pr(X ¸Y 1 ) = n Z D Y 0 f Y (y) µZ D X y f X (x)dx ¶ dy = n Z D Y 0 f Y (y)F X (y)dy SinceF X (y) is zero wherex¸D X , above equation is written as: Rel 1 =n Z D X 0 f Y (y)F X (y)dy: (4.32) If we use uniformity distributionsX andY , Equation 4.32 will be Rel 1 =n Z D X 0 2y D Y 2 (1¡ y D X )dy = n 3D Y 2 ¢D X 2 : 64 Relevant Items among Newly Retrieved Items The number of relevant items among newly retrieved objects is the cardinality of(Ret 2 ¡(Ret 0 [ Ret 1 ))\Rel 1 . Its probabilistic form is written as a form ofY 1 . (Ret 2 ¡(Ret 1 [Ret 0 ))\Rel 1 =n Z D Y z Pr(Y 2 ·z;Y 1 =y;X ¸y)dy Since events X ¸ y and Y 2 · z;Y 1 = y are mutually exclusive, the joint probability functionPr(Y 2 ·z;Y 1 =y;X ¸y) is expressed as the product of two probability functions. Pr(Y 2 ·z;Y 1 =y)¢Pr(X ¸y) Using Equation 4.30 in Lemma 3, we can obtain the final form. (Ret 2 ¡(Ret 1 [Ret 0 ))\Rel 1 = 2n ¼D Y 2 Z D X z g(y)yF X (y)dy (4.33) Relevant Items among All Retrieved Items Total retrieved items,Ret 0 [Ret 1 [Ret 2 , are divided into three non–overlapping sets:Ret 1 ;Ret 0 ¡ Ret 1 ;Ret 2 ¡Ret 1 . Due to symmetrical nature of object locations in a uniform distribution of Y ,Ret 0 ¡Ret 1 andRet 2 ¡Ret 1 are probabilistically identical. Thus, the total retrieved items are the summation ofRet 1 and2¢(Ret 2 ¡Ret 1 ). Therefore, relevant items among all retrieved items are rewritten as union of two disjoint sets. Rel 1 \(Ret 0 [Ret 1 [Ret 2 )=(Rel 1 \Ret 1 )+2(Rel 1 \(Ret 2 ¡Ret 1 )) 65 The first term,Rel 1 \Ret 1 , is the same as that of a stationary user. Ret 1 \Rel 1 = n¢Pr(X ¸Y 1 ;Y 1 ·z) = n Z z 0 Pr(Y 1 =z)¢Pr(X ¸z)dy = n Z z 0 f Y (y)F X (y)dy If we use Lemma 1, we can get the following expression for the first term. Ret 1 \Rel 1 = 2n D 2 Y Z z 0 yF X (y)dy (4.34) The second term,2¢(Rel 1 \(Ret 2 ¡Ret 1 )), is two times of the number of relevant items among newly retrieved items. Its integral form is easily induced by Equation 4.33. 2¢(Rel 1 \(Ret 2 ¡Ret 1 ))= 4n ¼D Y 2 Z D X z g(y)yF X (y)dy (4.35) Finally, the expected number of relevant items among all retrieved items is the summation of Equation 4.34 and 4.35. Rel 1 \ (Ret 0 [Ret 1 [Ret 2 ) = 2n ¼D 2 Y µZ z 0 ¼yF X (y)dy+2 Z D X z g(y)yF X (y)dy ¶ (4.36) 66 t 0 t m t 2m θ v v z current past future P m (0,0) P 2m (mv,0) P 0 (-mv,0) P m-1 P m+1 Figure 4.9: A user’s moving scenario for multiple caching and prefetching policy. Every time interval t i+1 ¡ t i , a user moves from P i to P i+1 , while storing the data collected during the previousm time intervals and prefetching for nextm time intervals. Summary For a given thresholdz, the modified precision measure of the user model with single lookahead and caching is obtained from Equation 4.31and 4.33. P = R D X z g(y)yF X (y)dy R v+z z g(y)ydy (4.37) The modified recall measure is similarly obtained from Equation 4.32 and 4.36. R= 1 ¼ ³ R z 0 ¼yF X (y)dy+2 R D X z g(y)yF X (y)dy ´ R D X 0 yF X (y)dy (4.38) 4.3.2.2 Multiple lookahead and caching Here presents the analysis of a more aggressive caching and prefetching scenario, where a user can prefetch up tom times farther than a single look–head strategy and reuse up tom retrieved caches. To illustrate this scheme, (2m + 1) non-concentric congruent circles of radius z are arranged along the x–axis and their centers are equally spaced by v. The centers imply the 67 locations of a user at different time, implying that the user has moved and will move along the x-axis with the speed ofv. This scenario is designed to quantify the effect of the most aggressive prefetching and caching schemes by the user model. A user at current time t m is positioned at (0;0) and its possible location at timet 2m is at (m¢v;0). Such moving scenario is depicted in Figure 4.9. To begin with, we present Lemma 4. It computes the probability that an object is inside user’s visible range at timet j while outside the range at timet i – that is,Pr(Y j ·z;Y i >z). Lemma 4 Let two distinct pointsp i ;p j on an euclidean coordinate system and a positive scalar valuez be given. Assuming that objects are uniformly distributed around the origin, the proba- bility of any object whose euclidean distance from p i is greater than z, but that from p j is less than or equal toz, orPr(Y i >z;Y j ·z) is given by 2 D 2 Y ¼ ( Z p j +z p z 2 +p i p j arccos y 2 +p 2 j ¡z 2 2yp j ydy¡ Z p i +z p z 2 +p i p j arccos y 2 +p 2 i ¡z 2 2yp i ydy ) : Proof: For a given point, the euclidean distances from the origin,p i , andp j are denoted byY;Y i ; andY j . Without loss of generality, two non–concentric, but intersecting congruent circlesC i ;C j of radiiz are centered atp i ;p j on the x–coordinate line where0 < p i < p j , while an imaginary circleC 0 of radiusy2Y is centered at the coordinate origin. The probabilityPr(Y i > z;Y j · z) is the ratio of the area ofY i > z;Y j · z to whole area. From the law of total probability, it is written as a function ofY . Pr(Y i >z;Y j ·z)= Z Y Pr(Y i >z;Y j ·z;Y =y)dy 68 Let I i (i x ;i y ) be the intersection point of C i and C j in quadrant I 3 . Since it satisfies both conditions(i x ¡p i ) 2 +i 2 y =z 2 ;(i x ¡p j ) 2 +i 2 y =z 2 ,(i x ;i y ) will be derived as µ p i +p j 2 ; q z 2 ¡( p i ¡p j 2 ) 2 ¶ . In addition, the distance betweenI i and the origin is calculated as q i 2 x +i 2 y = p z 2 +p i p j . The probability ofY i >z;Y j ·z is equally expressed as Pr(Y j ·z;Y =y)¡Pr(Y i ·z;Y j ·z;Y =y): The valid range ofy for the first probability,Pr(Y j ·z;Y =y), isp j ¡z top j +z and that for the second,Pr(Y i ·z;Y j ·z;Y =y), isp j ¡z to p z 2 +p i p j . We can further eliminate the range ofy value that satisfies both probability functions – that is,p j ¡z to p z 2 +p i p j . After the valid integration, the probabilityPr(Y i >z;Y j ·z) is written as Z p j +z p z 2 +p i p j © Pr(Y j ·z;Y =y)¡Pr(Y i ·z;Y j ·z;Y =y) ª dy: Using Lemma 4.30, above equation is finally reduced to 2 D 2 Y ¼ ( Z p j +z p z 2 +p i p j g j (y)ydy¡ Z p i +z p z 2 +p i p j g i (y)ydy ) ; whereg i (y) is an arccos function ofC 0 inC i , andg j (y) is that ofC 0 inC j . Thus, the lemma is correct. Figure 4.10 shows the visual interpretation of Lemma 4. An object location whose distance to the origin isy 2 Y is viewed as a point on an imaginaryC 0 of radiusy. If it is insideC j , it will satisfyY j ·z;Y =y. If it is also insideC i , it will meetY i ·z;Y j ·z;Y =y. Thus, the 3 Another intersection point will be in quadrant IV . 69 z P i P j z o Y Y i Y j C i C j I i j i P P z + 2 Figure 4.10: When a user moves fromP i toP j , newly discovered objects lie either on (1) or on (2) area. spatial condition of an object who is insideC j while outsideC i can be expressed as two forms, depending ony ranges. The first case is wheny is in the range of of p z 2 +p i p j andp i +z. In this case, some y values in C j may still be inside C i . If so, these values should be eliminated. The second case is when y is in the range of p i +z and p j +z. In this range, every y in C j is guaranteed to be only inC j . Therefore, the equation in Lemma 4 can be equivalently written as 2 D 2 Y ¼ ( Z p j +z p i +z g j (y)ydy+ Z p i +z p z 2 +p i p j f(g j (y)¡g i (y)gydy ) : When we apply more than two consecutive circles, above expression is more appropriate than in Lemma 4, since the cascaded terms are easily eliminated. Here is a sample expression for three consecutively spaced circlesC i ;C j ;C l , wherep i <p j <p l . 2 D 2 Y ¼ ( Z p z 2 +p j p l p z 2 +p i p j g j (y)ydy+ Z p j +z p z 2 +p j p l g j (y)ydy¡ Z p i +z p z 2 +p i p j g i (y)ydy ) ; (4.39) 70 Newly Retrieved Items Newly retrieved items at timet m are expressed asRet 2m u ¡ S 2m¡1 i=0 Ret i u . Since any object in the setRet 2m u ¡ S 2m¡2 i=0 Ret i u is already excluded by the setRet 2m u ¡Ret 2m¡1 u , they are simplified asRet 2m u ¡Ret 2m¡1 u . And this form is derived from Lemma 4 for two consecutive overlapping circlesC 2m andC 2m¡1 . 2n D 2 Y ¼ ¢ ( Z mv+z p z 2 +m(m¡1)v 2 g 2m (y)ydy¡ Z (m¡1)v+z p z 2 +m(m¡1)v 2 g 2m¡1 (y)ydy ) Relevant Items The expected number of relevant items is not affected by different prefetching and caching poli- cies. Thus, it should be the same as Equation 4.32. Relevant Items among Newly Retrieved Items Their set expression is(Ret 2m ¡Ret 2m¡1 ))\Rel m and its probabilistic description is n¢Pr(Y 2m ·z;Y 2m¡1 >z;X >Y): Because X and Y are independent, the probability Pr(Y 2m · z;Y 2m¡1 > z;X > Y) will be the product of the term forf Y (y)¢Pr(Y 2m · z;Y 2m¡1 > zjY = y) and the term for Pr(X >y). Thus, the expected number of relevant items among newly retrieved items is 2n D 2 Y ¼ ¢ ( Z mv+z p z 2 +m(m¡1)v 2 g 2m (y)yF X (y)dy¡ Z (m¡1)v+z p z 2 +m(m¡1)v 2 g 2m¡1 (y)yF X (y)dy ) : 71 Relevant Items among All Retrieved Items All retrieved items are expressed as S 2m i=0 Ret i u and can be rewritten as the union of (2m+1) disjoint sets, Ret m u + m¡1 [ i=0 (Ret i u ¡Ret i+1 u )+ 2m [ i=m+1 (Ret i u ¡Ret i¡1 u ) . Due to the symmetry of S m¡1 i=0 (Ret i u ¡Ret i+1 u ) and S 2m i=m+1 (Ret i u ¡Ret i¡1 u ), it is simplified asRet m u +2 S 2m i=m+1 (Ret i u ¡Ret i¡1 u ). Relevant items among all retrieved items are the relevant items amongm previously cached items andm prefetched items at current timet m . It is expressed asRel m \fRet m u +2 P 2m i=m+1 (Ret i u ¡ Ret i¡1 u )g. Rel m \f P 2m i=m+1 (Ret i u ¡Ret i¡1 u )g is then expanded by Equation 4.39, 2n D 2 Y ¼ ¢ 2m X i=m+1 0 B B B B B B @ R I i I i¡1 g i (y)yF X (y)dy + R (i¡m)v+z I i g i (y)yF X (y)dy ¡ R (i¡1¡m)v+z I i¡1 g i¡1 (y)yF X (y)dy 1 C C C C C C A ; whereI i¡1 = p z 2 +(i¡m)(i¡1¡m)v 2 andI i = p z 2 +(i¡m)(i+1¡m)v 2 . After eliminating the cascaded terms, the expected number of relevant items among all retrieved items is obtained by 2n D 2 Y ¼ ¢f Z z 0 ¼yF X (y)dy + Z mv+z p z 2 +m(m¡1)v 2 2g 2m (y)yF X (y)dy + 2m¡1 X i=m+1 [ Z I i I i¡1 2g i (y)yF X (y)dy]g: 72 If m is large enough or v is small enough, the whole area can be approximated as 2D cylindrical form. The approximate number of relevant items among all retrieved items is Rel m \( 2m ] i=0 Ret i )¼ 2n D 2 Y ¼ ¢ f Z z 0 ¼yF X (y)dy+ Z mv+z p m 2 v 2 +z 2 2g 2m (y)yF X (y)dy + Z p m 2 v 2 +z 2 z 2 arccos µr 1¡( z y ) 2 ¶ yF X (y)dyg: Summary From above metrics, we can compute the modified precision and recall measures. P = R mv+z q z 2 +m(m¡1)v 2 g 2m (y)yF X (y)dy¡ R (m¡1)v+z q z 2 +m(m¡1)v 2 g 2m¡1 (y)yF X (y)dy R mv+z q z 2 +m(m¡1)v 2 g 2m (y)ydy¡ R (m¡1)v+z q z 2 +m(m¡1)v 2 g 2m¡1 (y)ydy R ¼ 1 ¼ R z 0 ¼yF X (y)dy+ R mv+z q m 2 v 2 +z 2 2g 2m (y)yF X (y)dy+ R q m 2 v 2 +z 2 z 2 arccos q 1¡( z y ) 2 yF X (y)dy R D X 0 yF X (y)dy 4.3.3 Analysis of Object Model We have shown that the object model for a stationary user in a stationary environment achieved the optimality, as long as every user has the same sight vision and the visible distance of an object is set to the ideal one. For a moving user in a stationary environment, this conclusion still holds, because newly retrieved items are all visibly relevant and all visibly relevant items can be retrievable. The object model, however, has one critical problem. That is, there will be a huge number of visibly relevant objects. For example, if objects and their visible distances are uniformly 73 distributed, the expected number of retrieved items at any given time is given byRet o = nD 2 X 3D 2 Y . If we assume thatD X andD Y are equal, one third of the populated items in a given space will be visibly relevant and retrieved by the object model. In a moving environment where only a user is allowed to move, the object model may take advantage of using cached items. It means that it doesn’t have to retrieve all the visibly relevant items, since some of the items were retrieved earlier. Therefore, the primary performance metric of the object model is the expected number of newly retrieved items that, of course, are all visibly relevant. In this analysis, we are only interested in predicting the number of newly retrieved items by the object model. For the ease of analysis, we assume that every visible distance of an object is configured optimally. Therefore, the object model still maintains the optimal condition, where modified precision and recall measures are both one. Newly Retrieved Items LetY be the euclidean distance of an object from the origin at timet 0 andY 1 be that at timet 1 . Lemma 5 presents the mathematical proof of the relation betweenY andY 1 . This lemma is fundamentally identical with Lemma 2, but there is a subtle, but significant difference between the two Lemmas. While Lemma 2 derives the arc length of two circles, Lemma 5 presents the omnipotent relationship between a given distanceY and its subjective distanceY 1 . Lemma 5 Let a user at time t 0 be located at the origin P 0 (0;0) and move to a next position P 1 (v;0) by the time t 1 . Then, the distance of a sample location P(dcosµ;dsinµ) from P 1 is p v 2 +d 2 ¡2vdcosµ, whereµ is the\PP 0 P 1 . 74 Proof: Letd 0 be the distance betweenP andP 1 andµ 0 be the angle\PP 1 P 0 . Ifdcosµ lies on between0 andv, a triangleP 0 P 1 P will be either acute or right. From the following conditions, we can solved 0 ; that is,d 0 = p v 2 +d 2 ¡2vdcosµ. d 0 sinµ 0 = dsinµ d 0 cosµ 0 = v¡dcosµ If dcosµ is either smaller than 0 or greater than v, the conditions still hold. Its proof is trivial. Thus, the lemma is correct. Without loss of generality, we assumeD Y =D X +v. The set representation of newly retrieved items by the object model isRet 1 o ¡Ret 0 o . Ret 1 o ¡Ret 0 o =n¢Pr(X ¸Y 1 ;X <Y) Using the law of total probability theorem and Bayes’ theorem,Pr(X ¸ Y 1 ;X < Y) is expanded as: Z X Pr(X =x)¢Pr(Y 1 ·X;Y >XjX =x)dx = Z X f X (x) Z D Y x f Y (y)¢Pr(Y 1 ·xjY =y)dydx For a givenx2X andy2fY >xg, a distancey 1 2Y 1 can be written as a function of a subtended angle to the origin, p v 2 +y 2 ¡2vycosµ. If there exists a radianµ x 2R that satisfies arccos( v 2 +y 2 ¡x 2 2vy ), any point that is located between¡µ x andµ x and whose distance toP 1 isy 1 75 θ x P 0 (0,0) P 1 (v,0) y P x Figure 4.11: For a givenx;y, the probabilityPr(Y 1 · x) is visualized as the dotted arc length over the circumference of the circle of radiusy whose center isP 0 . will be less than or equal tox. Therefore, the probabilityPr(Y 1 · xjY = y) is the ratio of the arc area of this radian range to the circumference of the circle of radiusy that is centered atP 0 . In Figure 4.11, three pointsP;P 0 ;P 1 and their geographical properties are illustrated. As shown in the figure, if the givenx is smaller thanv¡y, then there will be no pointP that satisfiesY 1 ·x. The existence ofµ x varies, depending on two cases : (1)v < 2x and (2)v ¸ 2x. For the first case,µ x exists only wheny is in the range ofx andv+x. For the second case, it would exist only when y is in the range of v¡x and v +x. Therefore, in a uniform distribution of Y , the expected number of newly relevant items is derived as: Ret 1 o ¡Ret 0 o = 2n ¼D 2 Y Z D X 0 f X (x) Z b a arccos( v 2 +y 2 ¡x 2 2vy )ydydx; (4.40) where 8 > > < > > : a=x;b=v+x : v <2x a=v¡x;b=v+x : otherwise : 76 0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1 Threshold Ratio (z’) E−measure Analytical simulation 0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1 Threshold Ratio (z’) E−measure Analytical Simulation (a) Uniform distribution (b) Normal distributionN(0:015;0:025 2 ) Figure 4.12: Analytical and simulation results of the E-measure values of the user model. The curves are plotted as a function of threshold ratio in (a) a uniform and (b) a normal distribution ofX. For the simulations, one million objects are uniformly distributed in a unit space. 4.4 Evaluation To examine whether our analysis model predicts the performance of the visibility models accu- rately, we compare the prediction results with simulation results. During the simulations, we varied the number of populated objects that are uniformly distributed, ranging from ten thousand to one million and collected the performance results of individual visibility models. We also present the analytical results and the simulation results for different distributions ofX (a uniform and a normal distribution). For the evaluations, we chose a normal distribution of X with the mean value 0.015 and the standard deviation 0.025. It means that the average visible distance of an object occupies the 1.5 % of the side length of the unit space. All the figures in this section demonstrated that our analytical model predicts the simulation results very accurately. 4.4.1 A Stationary User in a Stationary Environment Figure 4.12 showed the E–measure distributions of the user model. This figure revealed two trends. First, there exists a local minima at non–zero visual strength of a user. The local minima 77 0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1 Threshold Ratio (z’) E−measure Analytical Simulation 0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1 Threshold Ratio (z’) E−measure Analytical Simulation (a) Uniform distribution (b) Normal distributionN(0:015;0:025 2 ) Figure 4.13: Analytical and simulation results of the E-measure values of the object/hybrid model where visual ratio is one. appears soon after the average visual strength. It implies that the critical point where precision and recall curves cross is placed after the average visual strength. Second, the normal distribution showed a better performance than the uniform distribution. Even the minimum of the normal distribution approached the optimal point very closely. If the distribution is highly skewed at a small visual strength, the user model may even outperform a fine-grained ACQ–OR scheme. From these observations, we conclude that the user model, while not achieving the optimal per- formance, has some application areas that are practically meaningful. Figure 4.13 showed the E–measure values of the object/hybrid model where visual ratio r is one. The visual ratio one means that the visible range of an object is set to its ideal visible distance. Under this assumption, we observed that the optimality is achieved only when a user’s threshold value is not used. The use of threshold value caused the system overestimated. Another interesting behavior of the object/hybrid model is that as a user’s threshold value increases, the normal distribution ofX degrades the search quality more rapidly than the uniform distribution. It is becauseX values in the normal distribution are more heavily distributed around the average value which is also situated at earlier point than that of the uniform distribution. From these 78 0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1 Threshold Ratio (z’) E−measure Analytical Simulation 0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1 Threshold Ratio (z’) E−measure Analytical Simulation (a) Uniform distribution (b) Normal distributionN(0:015;0:025 2 ) Figure 4.14: Analytical and simulation results of the E-measure values of the user model with single lookahead and caching policy. They are plotted as a function of threshold ratio in (a) a uniform and (2) a normal distribution ofX. For the simulations, one million objects are populated uniformly. The user moves 1% of the unit space per time interval. observations, we conclude that the object model achieves the optimality only when user’s visual strength is homogeneous, the visible region of an object is heterogeneous, and the ideal visible distance is derivable. Under the optimized situation, the system designer should be very careful not to make the system overestimated. 4.4.2 A Moving User in a Stationary Environment Figure 4.14 shows the E–measure distributions of the user model in moving environments, where a user moves 1 % of the given unit space every time interval. The user model uses a single lookahead and caching mechanism. The E–measure curves are very similar to those in stationary environments. When we varied the population size and the moving velocity, overall E–measure distributions depicted the similar pattern. One interesting observation is that the minimum of E–measure values in the moving environments is higher than in the stationary environments. It is mainly due to the side–effect of our modified definition of the evaluation metrics. It also implies that newly retrieved items in moving environments are unlikely to be visibly relevant, thus hurting 79 0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1 Threshold Ratio (z’) E−measure m=3 Simulaion Analytical Approximation Figure 4.15: Analytical and simulation results of the E–measure values of the user model with multiple lookahead and caching policy, wherem=3. They are plotted as a function of threshold ratio in uniform distributions ofX andY . For the simulations, one million objects are populated. The user moves 0.33 % of the unit space per time interval. the precision measure significantly. Figure 4.15 shows the results of two prediction models and simulation results of the user model with multiple lookahead and caching policy. It also depicted the similar tendency in single lookahead and caching policy. Therefore, we conclude that the user model with aggressive schemes does not improve the search quality. Rather, it worsens the performance. In Figure 4.16, the ratio of newly retrieved items identified by the object model to those measured by simulations is presented. As seen in the figure, our analysis model reflects the real world results very accurately, proving that our analysis is correct. When we obtained the number of newly retrieved items by the object model, we realized that the object model in moving environment could retrieve only a small portion of the world. For example, the newly retrieved items only occupies 3% of visibly relevant items in a normal distribution X, while 5:5% in a uniform distribution ofX. In the uniform distribution ofX, visibly relevant items occupied one third of total population. Thus, the newly retrieved items by the object model in the moving 80 10000 100000 200000 300000 400000 500000 0 0.2 0.4 0.6 0.8 1 # of populated objects Ratio of analysis to simulation Uniform Normal N(0.15, 0.025 2 ) Figure 4.16: The ratio of analysis results to simulation results of newly retrieved items by the object model in moving environments. environments would require 1.8 % of the total population. Thus, in the moving environment, the object model is becoming more attractive. The ratio of newly retrieved items by the object model (z 0 = 0:4) to those by the user model in a moving environment varies underlying distribution patterns of X. For the uniform distribution, the object model requires 25% more data than the user model. However, for the normal distribution, it requires30% less data than the user model. For a smaller threshold value such as z 0 = 0:2 in the normal distribution, the object model required 60% more data than the user model. 4.5 Summary In this chapter, we transformed three visibility determination models as probabilistic forms and define their visible conditions formally. Using the probability model, we could derive the ana- lytical model of their performance metrics for a stationary user in a stationary environment and for a moving user in a stationary environment. The former indicates the lower bound of the per- formance and the latter means the upper bound of the performance. Since existing performance 81 metrics are not suitable for describing the behaviors of the latter, we redefined the evaluation metrics, by modifying the definition of precision and recall. We verified that our analysis model predicted the simulation results very accurately. From the analysis results, we conclude that, in terms of overall search quality, the object model outperforms the user model. In addition, we observed that the object model in a mov- ing user environment has relatively smaller newly retrieved objects. In some cases, it identifies smaller objects than the user model. To achieve the optimality, the object model mandates that user’s visual strength is homogeneous, the visible region of an object is heterogeneous, and the ideal visible distance is derivable. As long as the visible distance of an object is set by its ideal visible distance, the object model always retrieves visibly relevant objects. However, if the vis- ible range of the object were underestimated or overestimated, the object model would suffer from dramatic deterioration of its search performance. The performance curve of the user model revealed that there exists a local minima when the visual strength of a user is non–zero. The local minima, however, is quite distant from the optimal performance. If the visible range of an object were normally distributed, the user model would reach the local minima quickly and the local minima would approach the optimality very closely. Thus, we conclude that in some cases the user model may achieve comparable performance to the object model. 82 Chapter 5 Real–time Support for Visibility Determination In Chapter 3 and 4, we have showed that the object paradigm, in terms of visual relevance, is more suitable for the retrieval of visibly relevant geometry objects from a huge geometry database than the user paradigm. In spite of its superb quality, there has been little work done in a highly dynamic spatial domain. Recent literature employing a grid partitioning as its space sub-division method reported success on point databases, but not on spatial databases [PXK + 02, MXA04, HXL05]. It is largely due to the fact that the number of objects are typically larger than that of users in many LBS applications and that the updating complexity of spatial geometry is much more expensive than that of point geometry. For example, Krumm et al., although they also recognized the potential of the use of spatial attribute of an object, also worried about the same concern [KS05]. In this chapter, we present a new spatial indexing method, called an edge indexing and investigate whether its query model (i.e., ACQ–OR) can achieve both scalability and real–time capability. The organization of this chapter is as follows. In Section 5.1 we sketch the assump- tions on target application. Section 5.2 presents the design issues of the edge indexing and its corresponding algorithms (i.e., edge construction, edge update, and visibility computation). And 83 E2 E1 A S Client S Client A Sub-world Server Figure 5.1: A target system in a4£4 grid partition. then several optimization techniques are introduced in Section 5.3. In Section 5.4, we analyze space complexity and time complexity of every algorithm in Section 5.2 and 5.3. Simulation results of various spatial indexing methods are depicted in Section 5.5. Finally, Section 5.6 sum- marize the conclusions. 5.1 Target Application Our target application assumes two technologies: sub–world hosting and 3D object streaming. The sub–world hosting is one of virtual world hosting methods. It partitions a virtual space into sub–worlds and every sub–world is managed by a dedicated machine. Each machine indexes all virtual entities in its sub–world; it resolves any inconsistencies among the entities; and it delivers any events (i.e., a new user entered into the sub–world or an autonomous object moved in from other sub–world) to its clients. Among them, the last operation that transmits 3D geometry data is called the 3D object streaming. 84 Figure 5.1 illustrates a typical system architecture based on the two technologies. In the figure, a sub–world that is surrounded by bold–dashed lines is managed by a sub–world hosting machine. It has four virtual entities: two autonomous entities (E1;E2), one spectator entity S, and one avatar entityA. Every entity exceptS is assigned with a spatial attribute that represents its visible range. For practical purpose, the visible range is simplified as a square region. Unlike the bounding box that is commonly used in spatial databases, it tends to be much bigger and wider. For efficient management of moving entities, the server further divides the sub–world into smaller partitions, called grid cells. They are enclosed by normal dashed lines in the figure. For the rest of the chapter, we shall use following symbolic notations, which are summa- rized in Table 5.1. For example, a spatial condition that a point attribute ofS, sayS:P , is inside a spatial extent ofE2, or simplyE2:R, is symbolized asS:P 2E2:R. 5.2 Design Grid partitioning is a popular space subdivision method that has recently regained its popular- ity for indexing moving entities in highly dynamic virtual worlds [PXK + 02, MK03, MXA04, HXL05]. A node indexing, one of the point access methods 1 , is based on the grid partitioning. It maintains a node structure per cell and stores an index of the entities whose spatial extent is a point location. For a given range query, it searches from the node structures of the cells whose region intersects with the spatial extent of the range query. Due to the use of simple point ge- ometry for the entities, it allows lightweight index updates. Much of the existing work based on the grid partitioning falls into this category. For example, single movement of an entity whose 1 Gaede and GÄ unther [GG98] classified multi–dimensional access methods into two classes: Point Access Method (PAM) and Spatial Access Method (SAM). PAM is designed to perform spatial searches on point databases while SAM on extended polygon databases. 85 spatial extent overlaps 100 grid cells requires 100 index deletions and 100 index insertions in the worst case. One of the popular node indexing methods, Q-Index, reported such performance degradation during the update of rectangle–shaped range queries [PXK + 02]. To reduce the indexing complexity of the node indexing, we introduce a new spatial index- ing method called an edge indexing. The basic idea of the edge indexing is that user queries are indexed on grid cells and objects are indexed on the edges of neighboring cells. The reason why queries are indexed on the cells is that every user query is represented by a point location, so that there is no overlapping between neighboring cells for the same query. The design goal of the edge indexing is to index the visible region of a virtual entity in the most efficient manner, so that a user can retrieve visibly relevant objects in real–time. Real delivery of identified object entities is beyond our scope. Our edge indexing is designed not only to provide an efficient indexing method for a square–shaped spatial extension of the entities in a grid, but also to support a massively large number of concurrent user and moving objects. For example, we want to achieve 100K ob- ject updates and 10K query evaluations per second. This goal is rather ambitious than currently proposed systems. In the following subsections, we will begin with formal definitions of edge structure and its following lemmas. 5.2.1 Abstraction In a direct acyclic graph network modelG D =(C;E),c2C denotes an equi-sized grid cell of a M£M grid partition ande2E denotes edge structure defined in two adjacent cells. The cell can be represented by two interchangeable forms. The first form is a row–wise space–filling curve 86 numberc and the second isn–dimensional vector 2 . For a given location vectorP < x 1 ;y 1 > in a 2DM£M grid space, its residing cell is given by cell of a point(x 1 ;y 1 )=Mb y 1 s c+b x 1 s c=M£y+x scalar ) c vector ) <x;y > (5.1) wheres is the side length of a cell. s£M is the side length of the map. Scalar representationc satisfies0·c<M 2 . Vector representation<x;y > satisfies0·x;y <M. Token is an abstraction of a virtual entity. It indicates specific spatial conditions with cells. Here, we use three types of tokens whose definitions are informally stated as follows: Inclusion Token (IT) It indicates that the spatial extent of an entity overlaps with or is covered by a given cell region. Appearance Token (AT) It denotes a spatial condition that an entity is an IT for a given cell, but not for a previously adjacent cell. Disappearance Token (DT) It is the opposite of AT, meaning that an entity does not satisfy the IT condition with a given cell while it does with a previously adjacent cell. These tokens are stored in separate data structures: a node and an edge. The node is a data structure that stores ITs. If ITs are user entities, they will be stored in user nodes. Otherwise, they would be stored in object nodes. Their formal definitions are given in Definition 1 and 2. Definition 1 A user node of a celli is a set of user ITs and defined as U i def = fuju:P \i:R6=;;u2Qg; 2 Typically, two–dimensional vector in the dissertation. 87 whereP is a user’s location andR is a square–shaped visible region or cell region. Definition 2 An object node of a celli is a set of object ITs and defined as N i def = fojo:R\i:R6=;;o2Og The edge is another data structure that stores ATs or DTs. The edge that stores ATs is termed an Appearance Edge (AE), while the edge that stores DTs is termed a Disappearance Edge (DE). Their formal definitions are presented in Definition 3 and 4. Previously adjacent cell of a given cell is one of the adjacent cells whose node structure is known a priori. For example, in aM£M grid map, a celli is surrounded by four adjacent cells (i¡1);(i+1);(i¡M);(i+M). IfN i is unknown whileN i¡1 is known, the cell(i¡1) will be termed the previously adjacent cell ofi. Definition 3 An appearance edge between a celli andj is defined as E + (i;j) def = 8 > > > > > > < > > > > > > : N j ¡(N i \N j ) : ifi<j andi is previously adjacent withj N j : ifi=j andj is a leftmost or topmost cell ; : otherwise; whereN i andN j are the node structures for the celli andj, respectively. N j ¡(N i \N j ) is the simple form of the set of appearance tokens that satisfy: fojo:R\i:R =;;o:R\j:R6=;;o2Og . 88 Definition 4 A disappearance edge between a celli andj is defined as E ¡ (i;j) def = 8 > > > > > > < > > > > > > : N i ¡(N i \N j ) : ifi<j andi is previously adjacent withj N j : ifi=j andj is a rightmost or bottommost cell ; : otherwise: Definition 3 and 4, however, may lead to following two misunderstandings. First, edge construction requiresN i ;N j . Strictly speaking, it is not always true, because the edge structures can also be directly constructed from object’s spatial geometry. N i andN j , as mentioned in the definitions briefly, are just a shorthand of the certain spatial condition of an object. Second, if the notationE(i;j) were acceptable, then its reverse–notationE(j;i) would be also acceptable. An object who was not shown ati while appearing atj is the element ofE + (i;j). It is equally true to be stated that the object that was visible atj disappears ati, thus beingE ¡ (j;i). As a result, E + (i;j)´ E ¡ (j;i) andE ¡ (i;j)´ E + (j;i). However, they are redundant notations. To avoid any possible confusion, we impose an ordering rule between two adjacent cells. IfE(i;j) where i<j is defined,E(j;i) is assumed undefined. From Definition 3 and 4, we can derive Lemma 6. This lemma guarantees the integrity of indexed objects, meaning that any object that appears should disappear. Lemma 6 Completeness If the visible region of an object is indexed onE + (i¡1;i) orE + (i;i), it will be indexed onE ¡ (j;j+1) orE ¡ (j;j), wherej¸i in the same row. Proof: Let a square–shaped visible region of an objecto have four corner cells,lt,lb,rt, and lb. If the visible region is indexed onE + (i;i+1), i satisfiesi:x = lt:x. For the given corner cells, there exists only one cell j that satisfies j:x = rt:x and j:y = i:y. If j is a rightmost 89 Cell 3 Cell 4 E + (3, 4)={P 1 } E_(3, 4)={P 2 ,R 1 } P 2 P 1 R 2 R 1 Figure 5.2: Example of edge indexing of two point entitiesfP 1 ;P 2 g and two polygonal entities fR 1 ;R 2 g between two row–wise adjacent cells 3 and 4. cell (j:x = M ¡1), o should be indexed on E ¡ (j;j), because o:R\j:R 6= ;. Otherwise, o should be indexed on E ¡ (j;j +1), because o:R\j:R 6= ; and o:R\(j +1):R = ;. Since i:x = lt:x · rt:x = j:x and i:y = j:y, i becomes less than or equal to j. Thus, the lemma is correct. Figure 5.2 visualizes the concept of edge structure defined between two neighbor cells. In the figure, two adjacent cells 3 and 4 have two edge transitions E + (3;4);E ¡ (3;4), two point entities P 1 ;P 2 , and two polygonal entities R 1 ;R 2 . By Definition 2, N 3 contains three tokens (P 2 ;R 1 ;R 2 ) while N 4 indexes two tokens (P 1 ;R 2 ). From Definition 3, E + (3;4) is obtained as follows: N 4 ¡ (N 3 \ N 4 ) = fP 1 g. Similarly, E ¡ (3;4) is computed from Definition 4, N 3 ¡(N 3 \N 4 )=fP 2 ;R 1 g. The above calculation also matches our intuition. P 2 ,R 1 , andR 2 overlap the cell 3 while P 1 ;R 2 overlap the cell 4. Movement from 3 to 4 makesP 2 ;R 1 disappear andP 1 appear. But the visible condition ofR 2 is unchanged. Thus,P 2 ;R 1 are inserted in the disappearance edge while P 1 in the appearance edge. 90 5.2.2 Visibility Computation The object node structure of a cell, by definition, is the set of object entities that are visible to any user entity in the cell. Therefore, the construction of the object node implies that it computes visible objects. Such construction process is called a cell evaluation. In this section, we will describe how to compute the object nodes from given edge structures. Let every edge structure be known. Among them, the leftmost and the topmost appear- ance edges are, in fact, the leftmost and topmost object nodes – that is,N 0 ;N 1 ;N 2 ;¢¢¢;N M¡1 , N M ;N 2M ;¢¢¢;N (M¡1)M . Lemma 7 proves that the visible set of a given cell can be recursively computed from the visible set of its neighboring cell and its edges. Lemma 7 Row–wise Cell EvaluationN i , the object node of a given celli, is constructed from a row–wise previously adjacent cell N i¡1 and its row–wise relevant edge structures, E + (i¡ 1;i);E ¡ (i¡1;i). N i = 8 > > < > > : E + (i;i) : i:x=0 N i¡1 +E + (i¡1;i)¡E ¡ (i¡1;i) : otherwise (5.2) Proof: Ifi is the leftmost cell,E + (i;i) will be defined by Definition 3. Thus, the lemmaN i = E + (i;i) is correct. Let i be a non–leftmost cell. Let an object o 1 be the element in i¡1 (o 1 2 N i¡1 ) and an object o 2 not be in N i¡1 (o 2 62 N i¡1 ). By definition, o 1 cannot be in E + (i¡1;i) nor o 2 in E ¡ (i¡1;i). The visible condition ofo 1 ;o 2 is either one of the following disjoint cases. 91 CASE 1: o 1 2E ¡ (i¡1;i) ando 2 2E + (i¡1;i) Ati,o 1 is excluded ando 2 is included. N i =N i¡1 +E + (i¡1;i)¡E ¡ (i¡1;i) (5.3) CASE 2: o 1 2E ¡ (i¡1;i) ando 2 62E + (i¡1;i) Ati,o 1 ando 2 are excluded. N i =N i¡1 ¡E ¡ (i¡1;i) (5.4) CASE 3: o 1 62E ¡ (i¡1;i) ando 2 2E + (i¡1;i) Ati,o 1 ando 2 are included. N i =N i¡1 +E + (i¡1;i) (5.5) CASE 4: o 1 62E ¡ (i¡1;i) ando 2 62E + (i¡1;i) Ati,o 1 is included ando 2 is excluded. N i =N i¡1 (5.6) Since every object falls into one of above cases,N i is the summation of Equation 5.3, 5.4, 5.5, and 5.6. Thus, the lemma is correct. The same logic can also be applicable for the column–wise cell evaluation (see Lemma 8). Since the proof is trivial, we omit it. Lemma 8 Column–wise Cell EvaluationN i is constructed from a column–wise previously ad- jacent cellN i¡M and its column–wise relevant edge structures,E + (i¡M;i);E ¡ (i¡M;i). N i = 8 > > < > > : E + (i;i) : i:y =0 N i¡M +E + (i¡M;c)¡E ¡ (i¡M;c) : otherwise (5.7) Lemma 7 and 8 imply that there exist two cell evaluation orders. The cell evaluation order N i¡1 ! N i ! N i+1 is called row–wise cell evaluations. If an evaluation order is N i¡M ! N i !N i+M , it is termed column–wise cell evaluations. 92 According to different orders, edges are further classified as either row–wise, if two neigh- bors are adjacent horizontally(E r ), or column–wise, if they are adjacent vertically(E c ). There- fore, in M £ m 2D grid map, there are eight associated edge structures on a cell i: E c + (i¡ M;i);E c ¡ (i¡M;i);E r + (i¡1;i);E r ¡ (i¡1;i);E r + (i;i+1);E r ¡ (i;i+1);E c + (i;i+M), and E c ¡ (i;i+M). It is also possible to combine various evaluation orders as long as we maintain all edge structures. For example, we may evaluate N i¡1 , then compute N i , using E + (i¡ 1;i) and E ¡ (i¡1;i). Next, we may proceed to computeN i+M , usingE + (i;i+M) andE ¡ (i;i+M). Such arbitrary evaluation orders, however, complicate algorithmic procedures with no significant complexity reduction. Instead of allowing such arbitrary orders, we prefer either row–wise eval- uations or column–wise evaluations. Since the row–wise cell evaluation requires only row–wise edges 3 , we can half the number of edge structures by fixing the evaluation order. From now on, our evaluation order uses the row–wise cell evaluation. 5.2.3 Edge Construction This section presents an edge construction algorithm and discusses its potential problem. To begin with, we will see a sample example. A given object can have either a point geometry or a rectangle geometry 4 . Figure 5.3 illustrates how to efficiently find relevant edges from object geometry. If the object geometry is a point as shown in Figure 5.3(a), the edge E + (3;4) and E ¡ (4;5) in row–wise cell evaluation will index the point objecto 1 . Evidently, the edge indexing is inefficient for the point geometry. Node indexing has one IT per point entity and requires 3 Similarly, the column–wise cell evaluation requires only column–wise edges. 4 We do not consider any irregular–shaped polygonal geometry. 93 8 7 6 5 4 3 2 1 0 o 1 ) 4 , 3 ( + E ) 4 , 1 ( + E ) 7 , 4 ( - E ) 5 , 4 ( - E 24 20 4 0 Object Region lt rt rb lb (a) a point in3£3 grid (b) an object region in5£5 grid Figure 5.3: Edge constructions for different types of object geometry one token removal and one insertion upon any location movement. The edge indexing, however, requires one AT and one DT per point entity and two token removals and two insertions during the update, in the worst case. In such a situation, we take advantage of using both data structures according to the shape of entity extension. In other words, point objects are stored in object node structures and the region objects are stored in edge structures. Thus, both structures coexist in our indexing scheme. With the same reasoning, a user location is stored in a user node structure. Figure 5.3(b) illustrates the edge construction for the square–shaped visible region of an object. The visible region has four points, whose corner cells are computed from Equation 5.1. Once the four corner cells – lt (p) : left top, lb (x) : left bottom, rt (q) : right top, andrb (y) : right bottom – are identified, corresponding appearance edges and disappearance edges are directly computed. Fromlt tolb, row–wise AEs are vertically aligned; fromrt to rb, row–wise DEs are vertically aligned ; from lt to rt, column–wise AEs are horizontally aligned ; and fromlb torb, column–wise DEs are horizontally aligned. Algorithm 1 outlines the edge construction for region geometry. In fact, it can supports not only token insertions but also token removals. To construct the edge structures of an objecto, 94 Algorithm 1IndexEdges (o,R,op) Require: o: object entity to be inserted or deleted. R: visible region ofo. op: insertion operation (+) or deletion operation (-). 1: (p;q;x;y)à corner cells ofR 2: ¯Ã op fUpdate Row Edges.g 3: foriÃ[p:x] byM,jÃ[q:y] byM do 4: ifi:x=0 then 5: E + (i;i)=E + (i;i) ¯ o 6: else 7: E + (i¡1;i)=E + (i¡1;i) ¯ o 8: end if 9: ifj:x=(M¡1) then 10: E ¡ (j;j)=E ¡ (j;j) ¯ o 11: else 12: E ¡ (j;j+1)=E ¡ (j;j+1) ¯ o 13: end if 14: end for we simply callIndexEdges(o;o:R;+). IndexEdges(o;o:R;¡) removes all the tokens of o. Since we use the row–wise cell evaluation, it only specifies how to search the row–wise edge structures and insert or remove tokens. Figure 5.4 reflects our finalized edge model without column edges. However, if you ex- amine the figure carefully, you may realize one problem: redundancy. In the figure, there are two subspaces S 1 and S 2 that are managed by their dedicated machines. For example, let us assume an object whose regionR overlaps only with the cell(M¡1) inS 1 and the cell0 inS 2 . System–wide edge construction suggests that two tokens (E + (M ¡2;M ¡1) inS 1 ,E ¡ (0;1) in S 2 ) are enough. However, our edge construction algorithm requires two additional tokens at E ¡ (M ¡ 1;M ¡ 1) in S 1 and E + (0;0) in S 2 . It is due to our integrity policy, which stems from Lemma 6. To maintain object integrity within the subspace, we use a naive integrity policy that every object appeared somewhere in one subspace should always be disappeared some other 95 0 1 M-1 M M 2 -M (M-1) 2 0 1 M-1 M M 2 -M (M-1) 2 ) 1 , 0 ( + E ) 0 , 0 ( + E ) 1 , 1 ( - - - M M E ) 1 , ( 2 2 + - - - M M M M E ) 0 , 0 ( ' - E S 1 S 2 Figure 5.4: Finalized row–wise edge structures and their corresponding symbolic notations. place in the same row of the same subspace and vice versa. Such integrity helps to find any dan- gling tokens, keeping the system healthy. Due to our integrity policy, boundary edges typically store orders of magnitude of tokens than non–boundary edges. Nevertheless, we expect that this redundancy does not cause any catastrophic disaster on system performance. 5.2.4 Round–based Monitoring In the past two sections, we have established the methodology how to index edge structures and how to compute visible sets. Now, we will address our round–based monitoring strategy on how to update edge structures upon any moving events and re–evaluate cells accordingly. Many objects are continuously moving and hence index structures must be regularly up- dated. Generally, this is done through a two–step algorithm that works as follows. The algo- rithm begins by updating all the corresponding indices of newly moved entities (update step) and then computes the node structures of every cell (cell evaluation step). After one cell evalu- ation, the node structure is delivered for user entities that are indexed on the cell. After all the cells are evaluated, the algorithm starts over. The two–step algorithm is outlined in Algorithm 2, 96 Algorithm 2Periodic Update and Evaluation 1: Initialize all data structures. 2: for true do 3: O;U 1;2;¢¢¢;M 2 ¡1 ÃUpdatefSTEP1: Entity Updateg 4: Evaluate (O;U 1;2;¢¢¢;M 2 ¡1 )fSTEP2: Cell Evaluateg 5: end for Algorithm 3Update Require: Update policy is eitherFull orIncremental. 1: Qà refresh set of user entities. 2: Oà refresh set of object entities. 3: for8q2Q do 4: U 1;2;¢¢¢;M 2 ¡1 ÃUpdateUser (q) 5: end for 6: for8o2O do 7: UpdateObject (o;policy) 8: end for 9: returnO;U 1;2;¢¢¢;M 2 ¡1 in which two steps are continuously alternated. Many node indexing systems are based on the algorithm [PXK + 02]. Our indexing method also uses the same round–based strategy. To use edge structures instead of node structures, the two–steps are slightly modified. These algorithms are sketched in Algorithm 3 and 6. Update Step Whenever Algorithm 3 is called, visible sets are newly re–evaluated if any entities moved to a new location within subspace, if there are any newly arrived entities, or if the entities in previous sets disappeared (line 1–2). Let us denote the old location of a user as u:P old , its new location as u:P new , the old visible region of an object as o:R old , and its new region as o:R new . And Algorithm 4 for user entities (line 3–5 in Algorithm 3), and Algorithm 5 or Algorithm 7 for object entities (line 6–8 in Algorithm 3) are dispatched, respectively. 97 Algorithm 4UpdateUser (q) 1: c old à cell number ofq:P old 2: c new à cell number ofq:P new 3: ifU old 6=c new then 4: U c old ¡= q;U cnew += q 5: end if 6: returnU 1;2;¢¢¢;M 2 ¡1 Algorithm 5UpdateObject (o,FULL) 1: IndexObject (o;o:R old ;¡)fToken Deletionsg 2: IndexObject (o;o:R new ;+)fToken Insertionsg Algorithm 4 calculates the old cell number and the new cell number of a given user, using its old and new locations (line 1–2). It then updates their respective user node structures if the cell numbers are different (line 3–5) and returns newly updated user node structures. For an object update, a naive approach calledUpdateObject withFULL update policy is used, whose algorithmic description is in Algorithm 5. It calls Algorithm 1 twice to delete existing tokens and insert new tokens. Cell Evaluation Step Once every update is made on relevant node structures, cells are then evaluated along the 2D grid map. The row–wise evaluation sequences are as follows: 0 ! 1 ! ¢¢¢ M¡1 M ! M +1 ! ¢¢¢ 2M¡1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (M¡1)M ! M 2 ¡M +1 ! ¢¢¢ M 2 ¡1 Algorithm 6 is an iterative version of the recursive definition of Lemma 5.2. It begins by initializing a temporary bit array (V ) whose size is the size of a given object set by marking all invisible whenever encountering a new row cell (line 3) and assigning the previously evaluated 98 Algorithm 6Evaluate (O;U 1;2;¢¢¢;M 2 ¡1 ): scans all the cell, calculates their visible sets, and delivers them to relevant users. 1: for iÃ[0:M 2 ¡1] do 2: if i:x=0 then 3: V[1:jOj]ÃinvisiblefInitialize a visible set whenever starting a new row.g 4: previousÃi 5: else 6: previousÃi¡1 7: end if 8: for 8o 1 2E + (previous;i);8o 2 2E ¡ (previous;i) do 9: V[o 1 ]Ãvisible;V[o 2 ]Ãinvisible 10: end for fN i ´Vg 11: for 8u2U i do 12: deliverV touftransmit newly computed visible set to the registered client.g 13: end for 14: end for cell (line 4 and 6). It then marks the bit flag of all the objects in the appearance edge visible while negating the flag in the disappearance edges (line 9 5 ). After line 10, the elements marked visible in the temporary array are set inN i . Newly updatedN i is then transmitted to all clients who are inside the cell i (line 11–12). The algorithm continues the cell evaluation of the next cell until it evaluates all the cells. In the algorithm however, you would realize that the rightmost disappearance edge is not involved during the evaluation. It is because the algorithm stops as soon as the rightmost object node structureN rightmost is computed and proceeds to a next row. Thus, we do not evaluate the rightmost edges. 5.2.5 Summary Figure 5.5a illustrates the concept of node indexing for the sample space in Figure 5.1. Every cell stores IT entities that intersect with its region. Computing the visible set of the spectatorS is to 5 We can set up the integrity check whetherV[o2] is visible andV[o1] is invisible before updating the flag. 99 Tokens: IT(E1) IT(E2) IT(A) IT(S) Tokens: AT(E1) DT(E1) AT(E2) DT(E2) AT(A) DT(A) IT(S) (a) node indexing (b) edge indexing (c) edge indexing with row–wise cell evaluation Figure 5.5: Illustration of different data structures for node indexing and edge indexing for the sample space in Figure 5.1. There are three object entities,fE1;E 2 ;Ag, and two user entities, fS;Ag in the world. simply retrieve object node structure of the spectator’s residing cell. In the figure,S recognizes thatE 2 is a visible object. Figure 5.5b demonstrates how edge structures are constructed from node structures. The cell evaluation is the reverse of edge construction process, building the object node structures from the edge structures. Figure 5.5c visualizes our row–wise edge indexing and its cell evaluation method. Total numbers of indexed tokens shown in Figure 5.5 are (a) 25 for node indexing, (b) 35 (17 ATs + 17 DTs + 1 IT) for the original edge indexing, and (c) and 17 (8 ATs + 8 DTs + 1 IT) for our finalized edge indexing model. 5.3 Optimization Issues In this section, we describe two optimization techniques for the edge indexing: incremental update and two–table edge indexing. While the incremental update policy focuses on the im- provement on the update complexity, the two–table edge indexing aims to enhance the overall 100 Case (1) Case (2) Case (3) ' lb C y lb y lb . '. - y lt y lt . '. - y lb y lb '. . - y lt y lt '. . - y lb y lt . . - y lb y lt . '. - Figure 5.6: Three different cases of newly updated cell intervals for appearance edges. Dashed lines are cell intervals of new visible region while dotted lines are those of old one. performance. As we will discuss in later section, the impact of the incremental update policy is noticeable in slowly moving environments, but less impressive than that of the two–table edge indexing. 5.3.1 Incremental Update The edge construction described in Algorithm 1 may be viewed as the indexing of two vertical line segments : the left line segment (i à [p:x] by M) and the right line segment (j à [q :y] byM). The original update policy in Algorithm 5 or the full update policy removes all ATs and DTs on the line segments and inserted them into their new line segments. This naive approach, while insensitive to the moving speed of updated objects, is still proportional to the length of the line segments. As depicted in Figure 5.6, the change of the line segment upon a update event falls into one of three cases. The case (1) and (2) in the figure indicate that a newly update region moved vertically. The case (3) illustrates that the object moved horizontally. For the former cases, we 101 still have room for reducing the token removals and insertions, because the visible condition of some cells on the line segments may not be changed. Algorithm 3 outlines the incremental update policy that computes the edges of an object to be removed or to be inserted and executes appropriate operations. The type of the change of each line segment is determined through a simple examination (line 7, 11, 15 for the left line segment; line 20, 23, 28 for the right line segment). In worst case, the complexity of the algorithm is bounded by that of full update policy only when the algorithm enters into line 15–17 and line 28–30. 5.3.2 Two–table Edge Indexing Let us assume that edge structures are implemented as hash table. Inserting a token is imple- mented by inserting it at the head of the corresponding hash bucket, hence the processing cost becomes constant. However, the processing cost of token removal is proportional to the number of tokens per hash bucket. Therefore, a large number of token removals may cause significant system degradation. Two–table edge indexing is designed to make the token removal overhead constant. It uses following strategies. First, we split a single edge structure that indexes both stationary and moving entities into two separate structures (see Figure 5.7). If an entity is not moving, its tokens will be placed in a stationary data structure. Otherwise, it will be stored in an edge structure. For the stationary data structures, we may use traditional spatial indexing methods such as R-Tree. The stationary table may receive token removal or insertion requests infrequently. Second, all edge structures are periodically reconstructed. After the reconstruction, all grid cells are evaluated to compute their visible sets. During the cell evaluation, the scanned 102 Algorithm 7UpdateObject (o,Incremental) Require: o:R old : previous region o:R new : new region 1: p 0 ;q 0 ;x 0 ;y 0 à four corner cells ofo:R old 2: p;q;x;yà four corner cells ofo:R new 3: if p 0 ;q 0 ;x 0 ;y 0 =p;q;x;y then 4: return 5: end if fUpdate Row–wise Appearance Edgesg 6: if p:x=p 0 :x andp 0 :y <p:y andx 0 :y >p:y then 7: foriÃ<p:x;[p 0 :y :p:y)> andjÃ<p:x;[x 0 :y :x:y]>¢¢¢CASE (1) do 8: E + (i¡1;i)¡= o,E + (j¡1;j)+= o 9: end for 10: else if p:x=p 0 :x andp:y <p 0 :y andx:y >p 0 :y then 11: foriÃ<p:x;[x:y :x 0 :y]> andjÃ<p:x;[p:y :p 0 :y)>¢¢¢ CASE (2) do 12: E + (i¡1;i)¡= o,E + (j¡1;j)+= o 13: end for 14: else 15: foriÃ<p 0 :x;[p 0 :y :x 0 :y]> andjÃ<p:x;[p:y :x:y]>¢¢¢ CASE (3) do 16: E + (i¡1;i)¡= o,E + (j¡1;j)+= o 17: end for 18: end if fUpdate Row–wise Disappearance Edgesg 19: if q:x=q 0 :x andq 0 :y <q:y andy 0 :y >q:y then 20: foriÃ<q:x;[q 0 :y :q:y)> andjÃ<q:x;[y 0 :y :y:y]>¢¢¢CASE (1) do 21: E ¡ (i¡1;i)¡= o,E ¡ (j¡1;j)+= o 22: end for 23: else if q:x=q 0 :x andq:y <q 0 :y andy:y >q 0 :y then 24: foriÃ<q:x;[y:y :y 0 :y]> andjÃ<q:x;[q:y :q 0 :y)>¢¢¢CASE (2) do 25: E ¡ (i¡1;i)¡= o,E ¡ (j¡1;j)+= o 26: end for 27: else 28: foriÃ<q 0 :x;[q 0 :y :y 0 :y]> andjÃ<q:x;q:y :y:y]>¢¢¢CASE (3) do 29: E ¡ (i¡1;i)¡= o,E ¡ (j¡1;j)+= o 30: end for 31: end if 103 Object Table Quasi-stationary Index Table Moving Index Table 0 1 M-1 M M 2 -M (M-1) 2 0 1 M-1 M M 2 -M (M-1) 2 o i .V Query Table o j .V Node indexing Edge indexing q i .P q j .P Figure 5.7: Conceptual model of two–table edge indexing. Algorithm 8UpdateObject (o,TwoTable) 1: IndexEdges(o,o:R, + ) edge structures are destroyed. Therefore, after the cell evaluation, there would have no remaining edge structures. For next cell evaluations, edges are then constructed again. As a result, lookup operations are no longer necessary and the system becomes insensitive to any distribution patterns and the moving speed of the populated entities. The edge structure is implemented as a singly linked list. Edge reconstruction for two–table approach ( Algorithm 8) is the same as the edge inser- tion for the original edge indexing method. After the reconstruction, all the cells are evaluated. Algorithm 9 is exactly identical to Algorithm 6 except line 10. The line 10 states that tokens are removed from the edge as soon as they are evaluated. Unlike the normal token removal, this 104 Algorithm 9EvaluateTwoTable (O;U 1;2;¢¢¢;M 2 ¡1 ) 1: for iÃ[0:M 2 ¡1] do 2: if i:x=0 then 3: V[1:jOj]Ãinvisible 4: previousÃi 5: else 6: previousÃi¡1 7: end if 8: for 8o 1 2E + (previous;i);8o 2 2E ¡ (previous;i) do 9: V[o 1 ]Ãvisible;V[o 2 ]Ãinvisible 10: E + (previous;i)¡= o 1 ;E ¡ (previous;i)¡= o 2 ftoken removalsg 11: end for fEdge are destroyed.g 12: for 8u2U i do 13: sendV tou 14: end for 15: end for removal procedure does not require any lookup operation. Regardless of hash bucket size, its pro- cessing complexity , thus, becomes constant. Moreover, it is insensitive to distribution patterns of object locations and moving speeds. The two–table approach replaces existing Algorithm 7 (or Algorithm 5) and 6 with Algo- rithm 8 and 9, respectively. We term an approach that uses Algorithm 5 and 6 as a single–table full edge indexing while the approach using Algorithm 7 and 6 as a single–table incremental edge indexing. 5.4 Analysis Here present the analysis results of the three indexing schemes (node indexing, single–table edge indexing, and two–table edge indexing) quantitatively in terms of memory utilization and pro- cessing time. In this analysis, we assume that node and edge structures are implemented with a generalized hash table, in which hash table size is configurable and bucket entries in a hash bucket 105 are singly linked. If the hash table size is 1, the hash table structure becomes a singly linked list. Alternative choice might be the use of balanced binary tree structure. Preliminary experiments, however, showed that the tree structure suffered from intolerable performance degradation due to excessive tree traversals during a cell evaluation. On the contrary, the hash table implementation reported comparatively satisfactory performance number. For hash table manipulations we assume three memory–access functions: token insertion, token removal, and token scan. Their processing costs are denoted byT a ;T d ; andT s , respectively. A token scan operation sequentially reads all the tokens in a hash bucket. It is extensively used during cell evaluations. A token insertion inserts a token into the head of a corresponding hash bucket. Therefore,T a is constant. A token removal searches a token from its corresponding hash bucket and deletes from the bucket. T s and T d are a function of proportional to the number of tokens in the bucket. For the purpose of analysis, we define two random variables. One variable, denoted by m o , represents the side length of the visible region of an entity o. The side length is uniformly distributed in the range of [m min ;m max ]. The mean value ofm o is denoted bym. The second random variable V denotes the x–directional or y–directional maximum distance of a moving entity during a time interval. The simulated movement of an entity during the given time is also uniformly distributed in the range of [0;v]. To simplify the analysis, both random variables are expressed as cell units. 106 5.4.1 Memory Requirement Let the token size be denoted bys bytes. The node indexing usess¢jU q j bytes for user entities ands¢ P o2U (m o +1) 2 ¼s(m 2 +2m+1+Var(m o ))jUj bytes for object entities. The single– table edge indexing consumes s¢jU q j bytes for the user entities and s¢ P o2U 2(m o + 1) ¼ 2s(m+1)jUj bytes for the object entities. The two-table edge indexing occupiess¢jU q j bytes for the users and sf P i2O 2(m i +1)+ P j2(U¡O) 2(m j +1)g ¼ 2s(m+1)jUj bytes for the objects. Table 5.2 summarizes these results. In our target application, our edge indexing methods consume approximately m+1 2 times less memory space than the node indexing. Different grid partitions for edge indexing methods lead to different memory requirements. For example, here are two grids: aM£M grid and a2M£2M grid. The memory requirement for the user entities still remains unchanged, because it depends only on the total number of user entities. The memory requirements for the object entities are approximately2s(m+1)jUj in the M £M grid and 2s(2m+1)jUj in the (2M)£(2M) grid. Thus, a four times larger cell size results in approximately twice smaller token uses. 5.4.2 Processing Cost We present the analysis results of the time complexity of update operation and cell evaluation. For a fair comparison, we only show the run–time complexity of moving objects and moving users. We assume that a set of moving objectsO and a set of moving usersQ are known in advance. Update Complexity Similar to the edge indexing, the node indexing may have two update policies: full update and incremental update. The full update, implemented in Q–Index [PXK + 02] and SINA [MXA04], 107 Maximum Reachable Distance (v) (0,0) i j (i,j) A A A A B B B B Figure 5.8: Illustration of next possible cell locations,< i;j >, which movesi cells andj cells from a current location at<0;0>. The possible locations are classified into three groups: A,B, and within the same cell. removes all the tokens from old locations and insert them at new cell locations. The incremental update policy, implemented by no existing work, removes and inserts all the tokens whose spatial condition changed during a period. In this analysis, we consider the best update scenario of the node indexing – that is, the node indexing with incremental update policy. To analyze the time complexity of update operation of a node indexing, we introduce the maximum reachable distance (v). Using this, the next cell of a moving entity is then uniformly distributed over < x§ v;y § v > grid space from current cell < x;y >. Without loss of generality, we assume that the entity is currently placed at the origin cell,< 0;0 >, and the next cell is denoted by< i;j >, where1· i;j · v. It is visualized in Figure 5.8. As in Figure 5.8, the next cell may fall into three categories: A, B, and within the same cell. The movement to A means the x– and y–directional movement and the movement toB represents either an x– or a y–directional movement. In the incremental node indexing, if an objecto resides in the same 108 cell, there will be no update. If it moves into the area A, there will be (i +j)(m o + 1)¡ij token insertions and removals. Otherwise, there will bek(m o +1) token insertions and removals, where 1 · k · v. Thus, the expected processing time of the update of a given object o in the node indexing is the summation of three different movement types: T node (o) = 4¢(A)+4¢(B)+1¢ no movement (2v+1) 2 ¢(T a +T d ) = 4 P v j=1 P v i=1 f(i+j)(m o +1)¡ijg+4 P v k=1 k¢(m o +1) (2v+1) 2 ¢(T a +T d ) = v(v+1)fv(4m o +3¡v)+2(m o +1)g (2v+1) 2 ¢(T a +T d ): The expected elapsed time of any object update by the node indexing is T node = P o2O T node (o) jOj = v(v+1)fv(4m+3¡v)+2m+1)g (2v+1) 2 ¢(T a +T d ): (5.8) The analysis of the expected time of the update of a given objecto for a single–table full edge indexing is very straightforward, sine the update calls 2£(m o +1) token insertions and removals. T edge full (o)=2(m o +1)(T a +T d ) Accordingly, the expected time of any object update of the single–table full edge indexing is T edge full = P o2O T edge full (o) jOj =2(m+1)(T a +T d ): (5.9) 109 The analysis of the expected time of any object update for a single–table incremental edge indexing becomes complicated, because the time complexity depends not only on the side length of visible region but also on moving speed. In the worst case, the time complexity is bounded by T edge full . The new cell of a moving object is one of the following cases: Within cell movement The object moves within the same cell. Its probability is 1 (2v+1) 2 . X–directional movement The object moves along the x–axis. It corresponds to Case (3) in Figure 5.6. Its update policy is functionally equivalent to that of the single–table full edge indexing. Since its probability is 2v (2v+1) 2 , the expected time for the given object update is T x = 2v (2v+1) 2 ¢T edge full (o) (5.10) . Y–directional movement The object moves along the y–axis. It corresponds to Case (1) or (2) in Figure 5.6. It requires pairs of a token insertion and removal. If v < m o , the number of pairs depends on uniformly distributed cell units. Otherwise, it would be equivalent to the single–table full edge indexing. The probability is the same as that of X–directional movement. The expected processing time is T y = ( 2 (2v+1) 2 ¢f1+¢¢¢+vg¢(T a +T d )= v(v+1)(T a +T d ) (2v+1) 2 : v <m o 2 (2v+1) 2 ¢f1+¢¢¢+m o +(v¡m o )m o g¢(T a +T d ) : otherwise (5.11) . X– and Y–directional movement The object moves in one of the cells in A in Figure 5.8. It corresponds to Case (3) in Figure 5.6. Its update policy is equivalent to that of the full update while its probability is (2v) 2 (2v+1) 2 . Thus, the expected processing time is expressed as T xy = (2v) 2 (2v+1) 2 ¢T edge full (o) (5.12) . 110 The expected running time of the single–table incremental edge indexing for a given object o is obtained by combing Equation 5.10, 5.11, and 5.12. T edge inc (o) = T x (o)+T y (o)+T xy (o) = 8 > > < > > : v(4m o (1+2v)+9v+5)(T a +T d ) (2v+1) 2 : v <m o (6vm o +8v 2 m o +4v+8v 2 +m o ¡m 2 o )(T a +T d ) (2v+1) 2 : otherwise (5.13) Therefore, the expected time of the single–table incremental edge indexing for any object movement can be induced from Equation 5.13. Ifv <m o , it will be T edge inc v<mo = P o2O;v<m o T edge inc (o) jOj = v(4m(1+2v)+9v+5) (2v+1) 2 ¢(T a +T d ) = v(4m(1+2v)+9v+5) (2v+1) 2 ¢2(m+1) ¢T edge full : (5.14) Otherwise, it would be T edge inc v¸m o = P o2O;v¸m o T edge inc (o) jOj = 6vm+8v 2 m+4v+8v 2 +m¡m 2 ¡Var(m o ) (2v+1) 2 ¢(T a +T d ) = 6vm+8v 2 m+4v+8v 2 +m¡m 2 ¡Var(m o ) (2v+1) 2 ¢2(m+1) ¢T edge full : The expected time of any object update for the two–table edge indexing is trivially com- puted. T twotable =2(m+1)£T a (5.15) 111 All the update complexities in Equation 5.8, 5.9, 5.14, and 5.15 are summarized in Ta- ble 5.3. In the table, it is evident that while the update cost of the worst–case edge indexing (single–table edge indexing with full update policy) depends only on m, that of the best–case node indexing (node indexing with incremental update policy) is still proportional to two vari- ables, v and m. For a smaller v (i.e., v = 1), the update cost of the node indexing slightly outperforms that of the edge indexing (i.e., 12m+8 9 vs. 2(m+1)).Asv increases, the performance gain is then immediately reversed (i.e., 60m+24 25 versus2(m+1), wherev =2). Another interesting result is that the two–table edge indexing depends only on the token insertion cost, T a . Typically, T d is slightly greater than T a , since T d requires at least one token lookup operation. After the lookup,T d executes the reverse operation ofT a . Thus,T d may well be expressed as(T a +T lookup ) and can be simplified as(T a + jEj 2¢b ¢T s ), wherejEj is the size of the edge structure and b is the number of its hash buckets. From this observation, we can infer that the single–table full edge indexing takes at least two times longer than the two–table edge indexing. Figure 5.9 shows the dependency on the side length of visible region whenv < m max . In the figure we assume that the average side length occupies 10 percent of unit space. Incremental node indexing method, however, depends not only on the side length but also still on the maxi- mum reachable distance. Thus, the update complexity of the node indexing is proven to be much higher than that of the single–table full edge indexing. The simulation results also validated a common belief that, in less dynamic environments (a smaller v), incremental updates reduce the amount of token insertions and removals notice- ably while in extremely dynamic environments (a larger v value) the such reduction becomes negligible. 112 1 2 3 4 5 0 5 10 15 20 25 30 35 40 Maximum Reachable Distance (v) (%) # of Affected Tokens Two−table Edge Indexing Incremental Edge Indexing Full Edge Indexing Incremental Node Indexing Figure 5.9: Simulation results of the update complexity of different indexing methods. The update complexity is computed as the expected number of token removals and insertions per any object update and plotted as a function of maximum reachable distance (v). The average side length of the visible region is assumed to occupy 10% of the side length of 2D grid map. 5.4.2.1 Cell Evaluation Complexity In this analysis, we do not consider any data delivery overhead after a cell evaluation. The node indexing scans all entities and then collects the user entities indexed on every cell node. Therefore, it takesjQj£T s to scan all user entities. If a node stores (m 2 +2m+1+Var(m o ))jOj M 2 object entities, the expected completion time of one cell evaluation will then be P o2O (m 2 +2m+1+Var(m o ))jOj M 2 ¢ T s . If any cell has at most one user entity, the expected completion time of all cell evaluations will bejQj¢ (m 2 +2m+1+Var(m o ))jOj M 2 ¢T s . The time complexity of all cell evaluations by the single–table edge indexing isT s ¢jOj¢ 2(m+1). Note that in the single–table edge indexing we need to scan all the tokens for cell eval- uations. Two–table edge indexing, however, usesT 0 d . It is the time cost of the removal operation 113 of the taken after its evaluation. Unlike the T d operation used in the single–table approach, the T 0 d operation is much lighter because it does not require any lookup operation. Table 5.4 summarizes the time complexities of different cell evaluation scenarios. If pre- viously computed result sets are re–used during the next evaluation round, the expected elapsed time of the node indexing will be bounded by all cell evaluations (i.e., T s (m 2 + 2m + 1 + Var(m o ))jOj). In the worst case, the evaluation of all the cell by the node indexing is still m+1 2 times longer than that of any edge indexing methods. 5.4.2.2 Putting it Together: Periodic Monitoring Cost As seen in Section 5.4.2, the edge indexing methods outperformed the node indexing in terms of update cost and cell evaluation cost. In this section, we focus on the comparison of the single– table edge indexing and the two–table edge indexing. The total elapsed time of the single–table full edge indexing for a given set of moving entities is the summation of the elapsed time of updates and cell evaluations and is computed as follows: (T a +T d +T s )¢fjQj+jOj2(m+1)g (5.16) Similarly, the total elapsed time of the two–table edge indexing is as follows: (T a +T 0 d +T s )¢fjQj+jOj2(m+1)g (5.17) From Equation 5.16 and 5.17, we conclude that the two–table edge indexing, although it is a minor optimization of the single–table edge indexing by replacing unpredictableT d with pre- dictableT 0 d , achieves significant performance improvements over the single–table edge indexing. 114 First of all,T 0 d is very predictable and is a more lightweight procedure thanT d . Another novelty of the two–table approach is that it is highly resilient to underlying distribution pattern, regardless of whether the objects are highly skewed or uniformly distributed. From input parameters, Equation 5.17 can induce the minimum time period of the two– table approach. While T a , T s and T 0 d are system–specific parameters, jOj;jQj, and m are all application–specific. The latter can be configured by the former and any given real–time con- straintT . Thus, maximum system throughput – that is, how many moving objects and users are supported by the given system – is defined as Maximum System Throughput=jQj+jOj2(m+1)= T T s +T a +T 0 d : For example, if a given sub–world is only filled with moving avatars,A = Q = O, their average side length is 10% of the map side length, T s +T 0 d takes 0.42 microseconds per token evaluation, andT a takes 0.78 microseconds, then the system can handle about 36,231 avatars per second. 5.5 Evaluation In this section, we examine the applicability of our edge indexing implementation. To estimate the degree of real–time support of our indexing method, we used the total elapsed time of updating all moving entities and computing visible sets of all the cells. We also present the simulation results of different grid partitioning policies and compared them with naive visibility computation methods. 115 0 20 40 60 80 100 0 20 40 60 80 100 0 200 400 600 800 1000 1200 y in a grid x in a grid # of indexed objects 0 20 40 60 80 100 0 50 100 0 1000 2000 3000 4000 5000 6000 7000 y in a grid x in a grid # of indexed objects (a) appearance edges (b) disappearance edges Figure 5.10: Size distribution of row edges. It uses100£100 grid model. 5.5.1 Simulation Setup We implemented the edge indexing algorithms in C and ran the experiments on a 64-bit 900MHz Itanium processor with 8 GBs of memory. We implemented a generalized hash table mechanism to store node and edge structures. 5.5.2 Results Edge Size Distribution Figure 5.10 shows one typical example of distribution patterns of edge sizes obtained during our simulations. We populated one million objects whose average visible side length is 10 cell units in 100x100 grid model. As shown in Section 5.4.1, the expected number of indexed objects of an edge is (m+1)u c 2 = 11£1M 100 2 = 1100. The node indexing, however, require (m+1) 2 u c 2 = 121£1M 100 2 = 12100 per cell on average. One interesting aspect of this distribution is that appearance edges near at the leftmost cells have smaller sizes and disappearance edges at the rightmost cells had larger 116 sizes. This anomaly is merely the side-effect of Lemma 6. Since the rightmost disappearance edges do not contribute to the visibility computation, they do not participate in the two–step algorithm. Periodic Monitoring Cost Tables 5.5 and 5.6 showed the performance metrics of different edge indexing methods when varyingv. The moving speed of the entities was also uniformly assigned between 0 andv. In a slowly moving environment (Table 5.5), the incremental edge indexing method outperformed the full update edge indexing, since the incremental update reduced the number of updated tokens the full update. The two–table edge indexing surpassed the single–table schemes. It is mainly due to the elimination of token lookup operations during the update. The two–table method, however, showed slightly higher evaluation time than the single–table methods. It was because the two–table method performed additional token removals after token evaluations. Table 5.6 exemplified the elapsed time of token updates and cell evaluations in a highly dynamic environment, where slowly moving and dynamically moving objects co–exist. Com- pared with the result in Table 5.5, the two–table method reported similar performance regardless of underlying moving environments. The performance gain obtained by the incremental policy of the single–table method, however, is decreased in the highly dynamic environment. Effect of Different Grid Size We measured the system throughput of different visibility computation models: two computation– driven exhaustive search algorithms (euclidean distance measure and intersection measure) and two–table edge indexing method with three different grid partitions (50£ 50;100£ 100, and 117 10K 50K 100K 10 −1 10 0 10 1 10 2 # of Object Updates (10K queries) Total Elapsed Time (seconds) Population Size = 100K, visible range = 5−15%, mobility = 1% Exhaustive Search (Intersection Test) Exhaustive Search (Euclidean Distance Measure) 200x200 Two−table Edge Indexing 100x100 Two−table Edge Indexing 50x50 Two−table Edge Indexing Figure 5.11: Total elapsed time of different visibility determination schemes. 200£ 200). The euclidean distance measure used the ideal visible distance defined in Equa- tion 3.2. The intersection measure computes the visibility of two entities by examining whether their visible regions intersect. The exhaustive search algorithms have following advantages. First, they don’t require any extra memory space, since they don’t keep any intermediate results during the visibility compu- tation. Second, they can tolerate unpredictable behaviors of object movements. Lastly, they can compute the ideal visible distance that accounts both for user’s visual strength and object’s visual characteristics. In spite of their simple design and extensibility, they typically suffer from lengthy computational delays to complete visibility determinations. Figure 5.11 reveals the significant performance difference between the exhaustive solutions and the two–table methods – that is, two orders of magnitude difference. Figure 5.11 also showed that our two–table edge indexing methods can be practically meaning, since the method in a 100£100 grid model can support 118 50K object updates in a second. Even compared with the results of the spatial indexing methods for location based services [MXA04, HXL05], our performance results are very comparable and promising. 5.6 Summary In this chapter, we proposed a new main–memory spatial indexing method, called edge indexing. To efficiently store the indices of the spatial extent of an object, we introduced a high–level ab- straction model, edge structure. Every edge between two adjacent cells stores indices (or tokens) that indicate that the visible condition of their corresponding object is altered. For example, if an object becomes visible when a user moves from one cell i to another cell j, its token will be stored on the appearance edge, E + (i;j); if invisible, it will be stored on the disappearance edge, E ¡ (i;j); otherwise, any token would be stored in any data structure. Thus, the indexing complexity of the edge indexing is proportional to the side length of the spatial extent, not the area of the extent. Using the edge structure, we presented an edge construction algorithm, two edge update algorithms, and a cell–evaluation based visibility determination algorithm. Our visibility determi- nation algorithm is also based on two–step round–based monitoring technique. We also presented an improved version of the edge indexing, called a two–table edge indexing. It separates edge structure into two separate edge structures: one for stationary objects and the other for moving objects. Especially, the edge structures for moving objects are reconstructed and evaluated at every round. In addition, we eliminated unnecessary memory accesses during token insertions and removals, which made the two–table algorithm deterministic and doubled the efficiency of 119 update operation. Through simulations, we proved that our two–table edge indexing achieved two orders of magnitude higher efficiency than naive visibility determination methods. 120 Table 5.1: Summary of symbolic notations. Symbol Meaning Notations for virtual entities U set of populated object entities O set of moving object entities,OµU U q set of populated query entities Q set of moving query entities,QµU q A set of avatar entities,A=faja2U\U q g i:P point location of entityi wherei2U[U q . i:R square–shaped region of object entityi wherei2U. m i side length of object entityi wherei2 U. It is represented by the number of cell units. m average side length of object entities Var(m i ) variance of random variablem i Notations for cell structure M number of cells per map side in aM£M grid model c scalar representation of a cell number in a given M £ M grid model,0·c<M 2 c<x;y > alternative vector representation of a cellc (c:x : x–directional cell number, c:y : y–directional cell number) where0·c:x;c:y <M c:R square–shaped region of a cellc U c user entities indexed on a cellc E + (i;j) set of objects that become visible to a user when it moves from a celli to its neighboring cellj. E ¡ (i;j) set of objects that become invisible to a user when it moves from a celli to its neighboring cellj. Complexity Analysis T s time cost of a token lookup operation in an edge structure T a time cost of a token insertion operation T d time cost of a token removal operation T 0 d time cost of a modified token removal operation s space cost of a token. It is represented by the number of bytes. jSj size of an edgeS v maximum reachable distance. It is represented by the number of cell units. Table 5.2: Memory requirements of three indexing methods. indexing method user entities object entities node indexing s¢jU q j s((m+1) 2 +Var(m o ))jUj single–table edge indexing s¢jU q j 2s(m+1)jUj two–table edge indexing s¢jU q j 2s(m+1)jUj 121 Table 5.3: Update time cost for a update event. indexing method queries£(T a +T d ) objects£(T a +T d ) node indexing a jQj¢ v(v+1)fv(4m+3¡v)+2(m+1)g (2v+1) 2 jOj node indexing b jQj jOj¢ v(v+1)fv(4m+3¡v)+2(m+1)g (2v+1) 2 single–table edge c jQj jOj¢2(m+1) single–table edge d jQj jOj¢ v(4m(1+2v)+9v+5) (2v+1) 2 two–table edge jQj¢ Ta T a +T d jOj¢2(m+1) Ta T a +T d a incremental policy wherev <mq andq2Q b incremental policy wherev <m o ando2O c full policy d incremental policy wherev <m o Table 5.4: Summary of the expected elapsed time of all cell evaluations. indexing method expected elapsed time node indexing T s ¢jQj¢ (m 2 +2m+1+Var(mo))jOj M 2 single–table edge T s ¢(jQj+jOj¢2(m+1)) two–table edge (T s +T 0 d )¢(jQj+jOj¢2(m+1)) Table 5.5: Measured elapsed time (seconds) of 100K moving objects and 10K moving queries in a slowly moving environment (v =1). indexing Update Time Evaluation Time Total Single–table with full policy 3.48 0.82 4.30 Single–table with incremental policy 2.08 0.80 2.88 Two–table 1.74 0.93 2.67 Table 5.6: Measured elapsed time (seconds) of 100K moving objects and 10K moving queries in a highly dynamic environment (v =15). indexing Update Time Evaluation Time Total Single–table with full policy 3.65 0.77 4.42 Single–table with incremental policy 3.49 0.74 4.23 Two–table 1.75 0.93 2.68 122 Chapter 6 Conclusions and Future Work 6.1 Summary This thesis addressed two challenging issues of newly emerging networked virtual environments: visual artifact and scalability issue. We recognized that the visual artifact caused by object pop- ping was primarily attributable to the nature of 3D object streaming methodology. We also ob- served that the scalability is becoming a serious problem in such environments. To support a mas- sive number of concurrent users, many application systems employed a grid partitioning method. Nevertheless, the server capacity is still limited to thousands of moving users in stationary envi- ronments and hundreds of or even tens of concurrent users in moving environments. To eliminate the object popping effect, we suggested a new view orientation approach, called an object paradigm. The intuition behind the object paradigm is that users in virtual space have homogeneous visual characteristics, while objects possess heterogeneous visible range. Most of the traditional visibility algorithms, however, assumes a user paradigm where only users have heterogeneous visible range. Various visibility algorithms, thus, fall into one of the cate- gories (user, object, and hybrid) that are classified by the use of either one paradigm or both. The 123 user model uses only the user paradigm; the object model uses only the object paradigm; and the hybrid model uses both paradigms. To compare all visibility algorithms, we devised four visibility determination scenarios: RQ–OP for the user model, PQ–OR for the object model, and RQ–OR and ACQ–OR for the hy- brid model. Preliminary simulation results revealed that RQ–OP couldn’t achieve any optimality since two evaluation metrics, precision and recall, showed the trade–off relation. PQ–OR, how- ever, could reach the optimality, meaning that all the retrieved objects are also visibly relevant and all the visibly relevant objects are retrieved as long as user’s visual strength is homogeneous. While RQ–OR achieved no object popping effect, it retrieved visibly irrelevant objects unneces- sarily. ACQ–OR, even it is classified as the hybrid model, is the approximation of PQ–OR. It uses a grid model as a sub–spacing method. Instead of using a user’s current location as a query point, it uses cell region as a query location. In ACQ–OR, every cell maintains the list of visible objects and transmits the list to its residing users. In a fine–grained grid model, ACQ–OR reported very promising results. Even in a20£20 grid model, it surpassed the user model. Thus, we conclude that the visibility algorithms based on the object paradigm retrieve more visibly relevant objects than those based on the user paradigm. We also presented the lower bound and upper bound of the performance of various vis- ibility algorithms through probabilistic analytical modelling. To analyze the lower bounds of individual algorithms, we derived the probabilistic prediction model that computes the quantita- tive performance measures of a stationary user in a stationary environment. To present the upper bounds, we similarly analyzed the performance measures of a moving user in a stationary en- vironment. From these models, we predicted that the visibility algorithm based on the object paradigm, in terms of visible relevance, outperformed the algorithm based on the user paradigm. 124 We also verified that our prediction results matched the simulation results very accurately. When we varied the distribution pattern of object size, we also observed that our conclusions were still valid. To support a large number of concurrent users and retrieve their visibly relevant objects in real–time, we proposed a new spatial indexing method, called an edge indexing. The edge index- ing stores the change of visible condition of an object and uses ACQ–OR to compute visible sets in real–time. To accelerate the computation more efficiently, we also proposed the separation of the data structures for stationary objects and for moving objects, which is called the two–table edge indexing. Experimental results showed that our edge indexing methods outperform the ex- isting spatial indexing methods. Our indexing method also achieved two orders of magnitude performance improvements over naive visibility computation methods. The two–table edge in- dexing also presented two times faster computation time than the original edge indexing. From the experiments, we conclude that our edge indexing method, although not fully optimized yet, is a very promising approach. 6.2 Directions for Future Research Although some research and implementation have been accomplished, there still remain many open issues, especially in spatial indexing. For example, the edge indexing still has high indexing complexity for an object region, since the indexing complexity is proportional to the side length of the object region. One of the new research directions is to make the indexing complexity constant. Our intuition says that if we reduce the object region to four corner points 1 , the indexing 1 In the edge indexing, we reduced the object region to two vertical or horizontal line segments. 125 complexity will be quite comparable to that of an indexing method for LBS applications. This approach, however, may increase the processing load during the cell evaluation, since the visible region of the object should be computed from the four corner points. Thus, characterizing the trade–off relation between the indexing complexity and the cell evaluation complexity will be a very interesting topic. As seen in Chapter 4, the mixed use of the object model and the user model may be more advantageous than the sole use of either one. It does not mean the use of the hybrid model. It would rather mean that a system may choose the most suitable model dynamically or separate visible ranges are managed by either model. As we have shown throughout this dissertation, the search quality of the user model is worse than that of the object model, while the visibility computation of the user model is much more efficient than that of the object model. To find the optimal point that accounts both for the computational (or indexing) complexity and the retrieval quality may be closely related with the fundamental understanding of the mixed use of spatial databases and point databases. Our contributions, as mentioned in Chapter 1 briefly, are not limited to a visibility deter- mination domain. Our methodologies can be applicable to various spatial interaction models. For example, every virtual entity may have heterogeneous audible range. Since the audible range is measurable and the ideal audible range is derivable between two entities, we may directly apply our methodologies to an audibility determination domain. Video streaming and mobile streaming may be another application areas that can be benefitted by our contributions [QMJL04]. we plan to explore the applicability of our contributions to various spatial determination areas. 126 References [Bai07] William Sims Bainbridge. The scientific research potential of virtual worlds. Sci- ence 317, 472 (2007), July 2007. [BBH + 65] Neil R. Bartlett, John Lott Brown, Yun Hsia, Conrad G. Mueller, and Lorrin A. Riggs. Vision and Visual Perception. John Wiley & Sons, Inc., 1965. [BF93] Steve Benford and Lennart E. Fahlen. A spatial model of interaction in large virtual environments. In ECSCW, pages 107–, 1993. [BL01] Nathaniel E. Baughman and Brian Neil Levine. Cheat-proof playout for centralized and distributed online games. In INFOCOM, pages 104–113, 2001. [CGL + 98] Jimmy H. P. Chim, Mark Green, Rynson W. H. Lau, Hong Va Leong, and An- tonio Si. On caching and prefetching of virtual objects in distributed virtual en- vironments. In MULTIMEDIA ’98: Proceedings of the sixth ACM international conference on Multimedia, pages 171–180, New York, NY , USA, 1998. ACM. [CHHL05] Kuan-Ta Chen, Polly Huang, Chun-Ying Huang, and Chin-Laung Lei. Game traffic analysis: An MMORPG perspective. In NOSSDAV’05: Proceedings of the inter- national workshop on Network and operating systems support for digital audio and video, pages 19–24. ACM Press, 2005. [CLLS03] J Chim, R. W.H. Lau, H. V . Leong, and A Si. Cyberwalk: a web-based distributed virtual walkthrough environment. IEEE Transactions on Multimedia, 5(4):503– 515, Dec. 2003. [COCSD03] Daniel Cohen-Or, Yiorgos L. Chrysanthou, Claudio T. Silva, and Durand Durand. A survey of visibility for walkthrough applications. IEEE Transactions on Visual- ization and Computer Graphics, 09(3):412–431, 2003. [CT97] Satyan R. Coorg and Seth J. Teller. Real-time occlusion culling for models with large occluders. In Symposium on Interactive 3D Graphics, pages 83–90, 189, 1997. [FS93] Thomas A. Funkhouser and Carlo H. Séquin. Adaptive display algorithm for interactive frame rates during visualization of complex virtual environments. In SIGGRAPH ’93: Proceedings of the 20th annual conference on Computer graph- ics and interactive techniques, pages 247–254, New York, NY , USA, 1993. ACM Press. 127 [GG98] V olker Gaede and Oliver G¨ unther. Multidimensional access methods. ACM Com- puting Surveys, 30(2):170–231, 1998. [Gut84] Antonin Guttman. R-trees: a dynamic index structure for spatial searching. In SIGMOD ’84: Proceedings of the 1984 ACM SIGMOD international conference on Management of data, pages 47–57, New York, NY , USA, 1984. ACM Press. [HS98] Gerd Hesina and Dieter Schmalstieg. A network architecture for remote rendering. In Second International Workshop on Distributed Interactive Simulation and Real- Time Applications, 1998. [HXL05] Haibo Hu, Jianliang Xu, and Dik Lun Lee. A generic framework for monitoring continuous spatial queries over moving objects. In SIGMOD Conference, 2005. [IHK04] Takuji Iimura, Hiroaki Hazeyama, and Youki Kadobayashi. Zoned federation of game servers: a peer-to-peer approach to scalable multi-player online games. In SIGCOMM 2004 Workshops: Proceedings of ACM SIGCOMM 2004 workshops on NetGames ’04, pages 116–120, New York, NY , USA, 2004. ACM Press. [KCC + 05] Jaecheol Kim, Jaeyoung Choi, Dukhyun Chang, Taekyoung Kwon, and Yanghee Choi. Traffic charateristics of a massively multiplayer online role playing game and its implications. In 4th Workshop on Network and System Support for Games (NetGames ’05), Oct 2005. [KLXH04] B. Knutsson, H. Lu, W. Xu, and B. Hopkins. Peer-to-peer support for massively multiplayer games, 2004. [KPH04] Dmitri V . Kalashnikov, Sunil Prabhakar, and Susanne E. Hambrusch. Main memory evaluation of monitoring queries over moving objects. Distrib. Parallel Databases, 15(2):117–135, 2004. [KPHA02] Dmitri V . Kalashnikov, Sunil Prabhakar, Susanne E. Hambrusch, and Walid G. Aref. Efficient evaluation of continuous range queries on moving objects. In DEXA ’02: Proceedings of the 13th International Conference on Database and Expert Systems Applications, pages 731–740, London, UK, 2002. Springer-Verlag. [KR04] Bong-Jun Ko and Dan Rubenstein. Distributed server replication in large scale networks. In NOSSDAV ’04: Proceedings of the 14th international workshop on Network and operating systems support for digital audio and video, pages 127– 132, New York, NY , USA, 2004. ACM Press. [KS05] John Krumm and Steve Shafer. Data store issues for location-based services. IEEE Computer Society Bulletin of the Technical Committee on Data Engineering, 28:35–42, 2005. [LHJ + 03] M. Lee, W. Hsu, C. Jensen, B. Cui, and K. Teo. Supporting frequent updates in r-trees: A bottom-up approach. In VLDB, pages 608–619, 2003, 2003. 128 [MDMW04] D. Marshall, D. Delaney, S. McLoone, and T. Ward. Challeges in modern dis- tributed interactive application design. Technical report, Department of Computer Science, National University of Ireland, Maynooth, Maynooth, Col. Kildare, Ire- land, 2004. [MK03] Jussi Myllymaki and James Kaufman. High-performance spatial indexing for location-based services. In WWW ’03: Proceedings of the 12th international con- ference on World Wide Web, pages 112–117, New York, NY , USA, 2003. ACM Press. [MXA04] Mohamed F. Mokbel, Xiaopeing Xiong, and Walid G. Aref. Sina: scalable incre- mental processing of continuous queries in spatio-temporal databases. In Proceed- ings of the 2004 ACM SIGMOD international conference on Management of data, pages 623–634. ACM Press, 2004. [Org06] WMO (The World Meteorological Organization). Visibility syn. meteorological visibility, meteorological visibility at night. Internaitonal Meteorological V ocabu- lary, WMO - No. 182, Jun 2006. [OYT96] Toshikazu Ohshima, Hiroyuki Yamamoto, and Hideyuki Tamura. Gaze-directed adaptive rendering for interacting with virtual space. Virtual Reality Annual Inter- national Symposium (VRAIS 96), 00:103, 1996. [Pfa00] Jonathan David Pfautz. Depth Perception in Computer Graphics. PhD thesis, Trinity College, University of Cambridge, 2000. [PLLY01] Sungju Park, Dongman Lee, Mingyu Lim, and Chansu Yu. Scalable data manage- ment using user-based caching and prefetching in distributed virtual environments. In VRST ’01: Proceedings of the ACM symposium on Virtual reality software and technology, pages 121–126, New York, NY , USA, 2001. ACM. [PXK + 02] S. Prabhakar, Y . Xia, D. Kalashnikov, W. Aref, and S. Hambrusch. Query indexing and velocity constrained indexing: Scalable techniques for continuous queries on moving objects. IEEE Transactions on Computers, 51(10):1124–1140, October 2002. [QMJL04] Peter Quax, Patrick Monsieurs, Tom Jehaes, and Wim Lamotte. Using autonomous avatars to simulate a large-scale multi-user networked virtual environment. In VR- CAI ’04: Proceedings of the 2004 ACM SIGGRAPH international conference on Virtual Reality continuum and its applications in industry, pages 88–94, New York, NY , USA, 2004. ACM. [RO03] Philip Rosedale and Cory Ondrejka. Enabling player-created online worlds with grid computing and streaming. Gamastutra Magazine, http://www.gamasutra.com/resource guide/20030916/rosedale 01.shtml, September 2003. [TL01] Eyal Teler and Dani Lischinski. Streaming of complex 3d scenes for remote walkthroughs. Comput. Graph. Forum, 20(3), 2001. 129 [VR79] C. J. Van Rijsbergen. Information Retrieval, 2nd edition. Dept. of Computer Science, University of Glasgow, 1979. [wow] World of Warcraft (WoW). Blizzard Entertainment, http://www.worldofwarcraft.com. [XP03] Yuni Xia and Sunil Prabhakar. Q+rtree: Efficient indexing for moving object databases. In DASFAA ’03: Proceedings of the Eighth International Conference on Database Systems for Advanced Applications, page 175, Washington, DC, USA, 2003. IEEE Computer Society. 130
Abstract (if available)
Abstract
Newly emerging game-based application systems provide three-dimensional virtual environments where multiple users interact with each other in real--time. They are filled with autonomous, mutable virtual content which is continuously augmented by the users. To make the systems highly scalable and dynamically extensible, they are usually built on a client-server based grid subspace division where the virtual worlds are partitioned into manageable sub-worlds. In each sub-world, the user continuously receives relevant geometry updates of moving objects from remotely connected servers and renders them according to her viewpoint, rather than retrieving them from a local storage medium.
Linked assets
University of Southern California Dissertations and Theses
Conceptually similar
PDF
Partitioning, indexing and querying spatial data on cloud
PDF
Location-based spatial queries in mobile environments
PDF
Enabling query answering in a trustworthy privacy-aware spatial crowdsourcing
PDF
MOVNet: a framework to process location-based queries on moving objects in road networks
PDF
Efficient updates for continuous queries over moving objects
PDF
Rapid prototyping and evaluation of dialogue systems for virtual humans
PDF
Dynamic pricing and task assignment in real-time spatial crowdsourcing platforms
PDF
Parasocial consensus sampling: modeling human nonverbal behaviors from multiple perspectives
PDF
Weighted factor automata: A finite-state framework for spoken content retrieval
PDF
Scalable peer-to-peer streaming for interactive applications
PDF
Data-driven methods in description-based approaches to audio information processing
PDF
Prediction models for dynamic decision making in smart grid
PDF
Enabling spatial-visual search for geospatial image databases
PDF
Query processing in time-dependent spatial networks
PDF
Differentially private learned models for location services
PDF
A function-based methodology for evaluating resilience in smart grids
Asset Metadata
Creator
Seo, Beomjoo
(author)
Core Title
Edge indexing in a grid for highly dynamic virtual environments
School
Viterbi School of Engineering
Degree
Doctor of Philosophy
Degree Program
Computer Science
Publication Date
02/29/2008
Defense Date
11/12/2007
Publisher
University of Southern California
(original),
University of Southern California. Libraries
(digital)
Tag
3D object streaming,grid partitioning,OAI-PMH Harvest,object popping,spatial indexing,visibility model
Language
English
Advisor
Zimmermann, Roger (
committee chair
), Narayanan, Shrikanth S. (
committee member
), Shahabi, Cyrus (
committee member
)
Creator Email
beomjoo90@gmail.com
Permanent Link (DOI)
https://doi.org/10.25549/usctheses-m1032
Unique identifier
UC1316138
Identifier
etd-Seo-20080229 (filename),usctheses-m40 (legacy collection record id),usctheses-c127-41816 (legacy record id),usctheses-m1032 (legacy record id)
Legacy Identifier
etd-Seo-20080229.pdf
Dmrecord
41816
Document Type
Dissertation
Rights
Seo, Beomjoo
Type
texts
Source
University of Southern California
(contributing entity),
University of Southern California Dissertations and Theses
(collection)
Repository Name
Libraries, University of Southern California
Repository Location
Los Angeles, California
Repository Email
cisadmin@lib.usc.edu
Tags
3D object streaming
grid partitioning
object popping
spatial indexing
visibility model