interest management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · each cell is a group. a...
TRANSCRIPT
![Page 1: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group](https://reader033.vdocuments.net/reader033/viewer/2022060807/608be3bef4533f53567af28b/html5/thumbnails/1.jpg)
Interest Management
1
![Page 2: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group](https://reader033.vdocuments.net/reader033/viewer/2022060807/608be3bef4533f53567af28b/html5/thumbnails/2.jpg)
Relevance Filtering
2
![Page 3: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group](https://reader033.vdocuments.net/reader033/viewer/2022060807/608be3bef4533f53567af28b/html5/thumbnails/3.jpg)
Idea: only need to update another player p if the update matters to p.
3
![Page 4: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group](https://reader033.vdocuments.net/reader033/viewer/2022060807/608be3bef4533f53567af28b/html5/thumbnails/4.jpg)
Aura / Area-of-Interest
4
![Page 5: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group](https://reader033.vdocuments.net/reader033/viewer/2022060807/608be3bef4533f53567af28b/html5/thumbnails/5.jpg)
Update of p matters to q if the auras of p and q intersect.
5
![Page 6: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group](https://reader033.vdocuments.net/reader033/viewer/2022060807/608be3bef4533f53567af28b/html5/thumbnails/6.jpg)
Foci (what a player can see)
6
![Page 7: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group](https://reader033.vdocuments.net/reader033/viewer/2022060807/608be3bef4533f53567af28b/html5/thumbnails/7.jpg)
Nimbi (where a player can be seen)
7
![Page 8: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group](https://reader033.vdocuments.net/reader033/viewer/2022060807/608be3bef4533f53567af28b/html5/thumbnails/8.jpg)
Update of p matters to q if the foci of p intersects nimbi of q.
8
![Page 9: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group](https://reader033.vdocuments.net/reader033/viewer/2022060807/608be3bef4533f53567af28b/html5/thumbnails/9.jpg)
Calculating aura/foci/nimbi can be costly.
9
![Page 10: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group](https://reader033.vdocuments.net/reader033/viewer/2022060807/608be3bef4533f53567af28b/html5/thumbnails/10.jpg)
Idea: approximate use bounding boxes
10
![Page 11: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group](https://reader033.vdocuments.net/reader033/viewer/2022060807/608be3bef4533f53567af28b/html5/thumbnails/11.jpg)
or approximate using cells
11
![Page 12: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group](https://reader033.vdocuments.net/reader033/viewer/2022060807/608be3bef4533f53567af28b/html5/thumbnails/12.jpg)
Large cell: Redundant messages.Small cell: Large management overhead.
12
![Page 13: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group](https://reader033.vdocuments.net/reader033/viewer/2022060807/608be3bef4533f53567af28b/html5/thumbnails/13.jpg)
The white player will receive many messages he/she is not interested in.
13
![Page 14: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group](https://reader033.vdocuments.net/reader033/viewer/2022060807/608be3bef4533f53567af28b/html5/thumbnails/14.jpg)
Idea: we can dynamically partition the cells into smaller ones as needed.
14
![Page 15: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group](https://reader033.vdocuments.net/reader033/viewer/2022060807/608be3bef4533f53567af28b/html5/thumbnails/15.jpg)
Generalization: an entity may specify any other events/entity it is interested in.
15
![Page 16: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group](https://reader033.vdocuments.net/reader033/viewer/2022060807/608be3bef4533f53567af28b/html5/thumbnails/16.jpg)
Communication Abstraction
16
![Page 17: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group](https://reader033.vdocuments.net/reader033/viewer/2022060807/608be3bef4533f53567af28b/html5/thumbnails/17.jpg)
Multicast: send a message to a set of subscribers
17
![Page 18: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group](https://reader033.vdocuments.net/reader033/viewer/2022060807/608be3bef4533f53567af28b/html5/thumbnails/18.jpg)
Group: a channel to publish messages
18
![Page 19: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group](https://reader033.vdocuments.net/reader033/viewer/2022060807/608be3bef4533f53567af28b/html5/thumbnails/19.jpg)
A client can subscribe to/join a group to start receiving
messages from that group.
19
![Page 20: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group](https://reader033.vdocuments.net/reader033/viewer/2022060807/608be3bef4533f53567af28b/html5/thumbnails/20.jpg)
A client can unsubscribe from/leave a group to stop receiving messages from that
group.
20
![Page 21: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group](https://reader033.vdocuments.net/reader033/viewer/2022060807/608be3bef4533f53567af28b/html5/thumbnails/21.jpg)
Anyone can send a message to a group (need
not be a subscriber).
21
![Page 22: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group](https://reader033.vdocuments.net/reader033/viewer/2022060807/608be3bef4533f53567af28b/html5/thumbnails/22.jpg)
a group a subscriber
22
![Page 23: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group](https://reader033.vdocuments.net/reader033/viewer/2022060807/608be3bef4533f53567af28b/html5/thumbnails/23.jpg)
Each cell is a group. A subscriber can subscribe to multiple cells. A group
can have multiple publishers.
a group
23
![Page 24: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group](https://reader033.vdocuments.net/reader033/viewer/2022060807/608be3bef4533f53567af28b/html5/thumbnails/24.jpg)
Previously
• Motivation for Interest Management
• Aura-based / Cell-based / General IM
• Publish / Subscribe Abstractions
• IP Multicast
24
![Page 25: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group](https://reader033.vdocuments.net/reader033/viewer/2022060807/608be3bef4533f53567af28b/html5/thumbnails/25.jpg)
Cell-based
25
![Page 26: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group](https://reader033.vdocuments.net/reader033/viewer/2022060807/608be3bef4533f53567af28b/html5/thumbnails/26.jpg)
Is rectangle the best shape for a cell?
26
![Page 27: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group](https://reader033.vdocuments.net/reader033/viewer/2022060807/608be3bef4533f53567af28b/html5/thumbnails/27.jpg)
Hexagonal cells approximate a circle better.
27
![Page 28: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group](https://reader033.vdocuments.net/reader033/viewer/2022060807/608be3bef4533f53567af28b/html5/thumbnails/28.jpg)
Require less subscribe/unsubscribe when moving.
28
![Page 29: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group](https://reader033.vdocuments.net/reader033/viewer/2022060807/608be3bef4533f53567af28b/html5/thumbnails/29.jpg)
Assume a player is interested in it’s current cell and surrounding cell.
29
![Page 30: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group](https://reader033.vdocuments.net/reader033/viewer/2022060807/608be3bef4533f53567af28b/html5/thumbnails/30.jpg)
Assume a player is interested in it’s current cell and surrounding cell.
30
![Page 31: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group](https://reader033.vdocuments.net/reader033/viewer/2022060807/608be3bef4533f53567af28b/html5/thumbnails/31.jpg)
and moves to a neighboring cell with equal probability.
31
![Page 32: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group](https://reader033.vdocuments.net/reader033/viewer/2022060807/608be3bef4533f53567af28b/html5/thumbnails/32.jpg)
and moves to a neighboring cell with equal probability.
32
![Page 33: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group](https://reader033.vdocuments.net/reader033/viewer/2022060807/608be3bef4533f53567af28b/html5/thumbnails/33.jpg)
Every move requires 3 new subscriptions and 3 un-subscriptions.
unsubscribe
subscribe
33
![Page 34: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group](https://reader033.vdocuments.net/reader033/viewer/2022060807/608be3bef4533f53567af28b/html5/thumbnails/34.jpg)
Moving horizontally/vertically requires 3 new subscription and 3 unsubscriptions.
34
![Page 35: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group](https://reader033.vdocuments.net/reader033/viewer/2022060807/608be3bef4533f53567af28b/html5/thumbnails/35.jpg)
Moving diagonally requires 5 new subscription and 5 unsubscriptions.
35
![Page 36: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group](https://reader033.vdocuments.net/reader033/viewer/2022060807/608be3bef4533f53567af28b/html5/thumbnails/36.jpg)
Hexgonal cells is better1. rounder2. less group join/leave
36
![Page 37: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group](https://reader033.vdocuments.net/reader033/viewer/2022060807/608be3bef4533f53567af28b/html5/thumbnails/37.jpg)
Visibility-Based Interest Management
37
![Page 38: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group](https://reader033.vdocuments.net/reader033/viewer/2022060807/608be3bef4533f53567af28b/html5/thumbnails/38.jpg)
38
![Page 39: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group](https://reader033.vdocuments.net/reader033/viewer/2022060807/608be3bef4533f53567af28b/html5/thumbnails/39.jpg)
Ideally one should consider occlusion (we focus on visual occlusion)
39
![Page 40: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group](https://reader033.vdocuments.net/reader033/viewer/2022060807/608be3bef4533f53567af28b/html5/thumbnails/40.jpg)
A player P is interested in (events generated by) an
entity Q if P can see Q, and Q is near P.
40
![Page 41: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group](https://reader033.vdocuments.net/reader033/viewer/2022060807/608be3bef4533f53567af28b/html5/thumbnails/41.jpg)
Ideally one should consider occlusion (we focus on visual occlusion)
41
![Page 42: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group](https://reader033.vdocuments.net/reader033/viewer/2022060807/608be3bef4533f53567af28b/html5/thumbnails/42.jpg)
need not be binary: can generalize to multi-
level of interest depending on distance
42
![Page 43: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group](https://reader033.vdocuments.net/reader033/viewer/2022060807/608be3bef4533f53567af28b/html5/thumbnails/43.jpg)
Ray Visibility Interest Management
43
![Page 44: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group](https://reader033.vdocuments.net/reader033/viewer/2022060807/608be3bef4533f53567af28b/html5/thumbnails/44.jpg)
Object-to-Object Visibility
1. Expensive2. Frequent re-calculations.
but gives exact visibility.
44
![Page 45: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group](https://reader033.vdocuments.net/reader033/viewer/2022060807/608be3bef4533f53567af28b/html5/thumbnails/45.jpg)
A player P is interested in (events generated by) an entity Q if P can see Q’s
cell, and Q is near P.
45
![Page 46: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group](https://reader033.vdocuments.net/reader033/viewer/2022060807/608be3bef4533f53567af28b/html5/thumbnails/46.jpg)
Object-to-Cell Visibility
46
![Page 47: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group](https://reader033.vdocuments.net/reader033/viewer/2022060807/608be3bef4533f53567af28b/html5/thumbnails/47.jpg)
Object-to-CellVisibility
1. Less expensive2. Less frequent re-calculations3. Less accurate
47
![Page 48: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group](https://reader033.vdocuments.net/reader033/viewer/2022060807/608be3bef4533f53567af28b/html5/thumbnails/48.jpg)
When player moves, still need to recompute
visible cells.
48
![Page 49: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group](https://reader033.vdocuments.net/reader033/viewer/2022060807/608be3bef4533f53567af28b/html5/thumbnails/49.jpg)
A player P is interested in (events generated by) an
entity Q if P’s cell can “see” Q’s cell, and Q is near P.
49
![Page 50: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group](https://reader033.vdocuments.net/reader033/viewer/2022060807/608be3bef4533f53567af28b/html5/thumbnails/50.jpg)
i.e., there exists in a point in P’s cell that can see a point in Q’s cell, and Q is
near P.
50
![Page 51: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group](https://reader033.vdocuments.net/reader033/viewer/2022060807/608be3bef4533f53567af28b/html5/thumbnails/51.jpg)
Cell-to-Cell Visibility
51
![Page 52: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group](https://reader033.vdocuments.net/reader033/viewer/2022060807/608be3bef4533f53567af28b/html5/thumbnails/52.jpg)
Cell-to-Cell Visibility
1. Much Less expensive2. Calculate once!
but even less accurate.
52
![Page 53: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group](https://reader033.vdocuments.net/reader033/viewer/2022060807/608be3bef4533f53567af28b/html5/thumbnails/53.jpg)
Computing Cell-to-Cell Visibility
53
![Page 54: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group](https://reader033.vdocuments.net/reader033/viewer/2022060807/608be3bef4533f53567af28b/html5/thumbnails/54.jpg)
Check if there exist two points, one in each cell, that can see each other (can draw a line
without passing through occlusion)
54
![Page 55: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group](https://reader033.vdocuments.net/reader033/viewer/2022060807/608be3bef4533f53567af28b/html5/thumbnails/55.jpg)
Trivial case: if two cells are adjacent and the boundary is not completely occluded.
55
![Page 56: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group](https://reader033.vdocuments.net/reader033/viewer/2022060807/608be3bef4533f53567af28b/html5/thumbnails/56.jpg)
Build a graph of cells -- connect two vertices if they share a boundary and is visible to each other.
56
![Page 57: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group](https://reader033.vdocuments.net/reader033/viewer/2022060807/608be3bef4533f53567af28b/html5/thumbnails/57.jpg)
if two cells are not-adjacent, then for them to be visible to each other, there should exists a
path between them, and ...
57
![Page 58: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group](https://reader033.vdocuments.net/reader033/viewer/2022060807/608be3bef4533f53567af28b/html5/thumbnails/58.jpg)
consider the non-occluded boundaries along path..
58
![Page 59: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group](https://reader033.vdocuments.net/reader033/viewer/2022060807/608be3bef4533f53567af28b/html5/thumbnails/59.jpg)
The set of points on the left L and right R can be separated by a line.
59
![Page 60: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group](https://reader033.vdocuments.net/reader033/viewer/2022060807/608be3bef4533f53567af28b/html5/thumbnails/60.jpg)
The set of points on the left L and right R can be separated by a line.
60
![Page 61: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group](https://reader033.vdocuments.net/reader033/viewer/2022060807/608be3bef4533f53567af28b/html5/thumbnails/61.jpg)
Linearly Separable Point Sets
no yes
61
![Page 62: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group](https://reader033.vdocuments.net/reader033/viewer/2022060807/608be3bef4533f53567af28b/html5/thumbnails/62.jpg)
We can model this problem as a set of linear equations.
(x1,y1)
(x2,y2)
ax + by - c = 0
62
![Page 63: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group](https://reader033.vdocuments.net/reader033/viewer/2022060807/608be3bef4533f53567af28b/html5/thumbnails/63.jpg)
Find a solution (a, b, c) for the following:
ax + by - c = 0ax1 + by1 - c > 0 for all (x1,y1) in Lax2 + by2 - c < 0 for all (x2,y2) in R
(x1,y1)
(x2,y2)
ax + by - c = 0
63
![Page 64: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group](https://reader033.vdocuments.net/reader033/viewer/2022060807/608be3bef4533f53567af28b/html5/thumbnails/64.jpg)
We can break into smaller cells if occlusion is not aligned with boundary of cells.
64
![Page 65: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group](https://reader033.vdocuments.net/reader033/viewer/2022060807/608be3bef4533f53567af28b/html5/thumbnails/65.jpg)
(Irregular) triangular cells can adapt toany polygonal occlusions.
65
![Page 66: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group](https://reader033.vdocuments.net/reader033/viewer/2022060807/608be3bef4533f53567af28b/html5/thumbnails/66.jpg)
Note: Rendering engine usually compute visibility information which we may be able to reuse in the Interest Management module.
66
![Page 67: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group](https://reader033.vdocuments.net/reader033/viewer/2022060807/608be3bef4533f53567af28b/html5/thumbnails/67.jpg)
Recap: Shape of cellsVisibility-based IMPre-computing C2C Visibility
67
![Page 68: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group](https://reader033.vdocuments.net/reader033/viewer/2022060807/608be3bef4533f53567af28b/html5/thumbnails/68.jpg)
Generalized Interest Management
68
![Page 69: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group](https://reader033.vdocuments.net/reader033/viewer/2022060807/608be3bef4533f53567af28b/html5/thumbnails/69.jpg)
Example: Interested in (i) objects around avatar(ii) buildings in a region(iii) the opponent’s avatar
69
![Page 70: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group](https://reader033.vdocuments.net/reader033/viewer/2022060807/608be3bef4533f53567af28b/html5/thumbnails/70.jpg)
Subscription can be based on any attributes (not just position)
70
![Page 71: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group](https://reader033.vdocuments.net/reader033/viewer/2022060807/608be3bef4533f53567af28b/html5/thumbnails/71.jpg)
We can view each object as occupying a multidimensional space (each attribute is a dimension)
71
![Page 72: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group](https://reader033.vdocuments.net/reader033/viewer/2022060807/608be3bef4533f53567af28b/html5/thumbnails/72.jpg)
A subscription specify a region in the same space.
72
![Page 73: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group](https://reader033.vdocuments.net/reader033/viewer/2022060807/608be3bef4533f53567af28b/html5/thumbnails/73.jpg)
When an update region of an entity P intersects the subscription region of entity Q, updates of P is sent to Q.
73
![Page 74: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group](https://reader033.vdocuments.net/reader033/viewer/2022060807/608be3bef4533f53567af28b/html5/thumbnails/74.jpg)
How to test if two regions overlap in k-dimensional space?
74
![Page 75: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group](https://reader033.vdocuments.net/reader033/viewer/2022060807/608be3bef4533f53567af28b/html5/thumbnails/75.jpg)
Naive approach: O(nm) for n update region and m subscription region.
75
![Page 76: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group](https://reader033.vdocuments.net/reader033/viewer/2022060807/608be3bef4533f53567af28b/html5/thumbnails/76.jpg)
Dimensional Reduction
If 2 regions overlap, then they overlap in each of the individual k dimension.
76
![Page 77: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group](https://reader033.vdocuments.net/reader033/viewer/2022060807/608be3bef4533f53567af28b/html5/thumbnails/77.jpg)
77
![Page 78: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group](https://reader033.vdocuments.net/reader033/viewer/2022060807/608be3bef4533f53567af28b/html5/thumbnails/78.jpg)
How to test if two intervals overlap?
78
![Page 79: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group](https://reader033.vdocuments.net/reader033/viewer/2022060807/608be3bef4533f53567af28b/html5/thumbnails/79.jpg)
Step 1: Sort all end points and put into a list L
79
![Page 80: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group](https://reader033.vdocuments.net/reader033/viewer/2022060807/608be3bef4533f53567af28b/html5/thumbnails/80.jpg)
80
![Page 81: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group](https://reader033.vdocuments.net/reader033/viewer/2022060807/608be3bef4533f53567af28b/html5/thumbnails/81.jpg)
Step 2: Scan from left to right. Remember all active subscription regions S and all active update regions U.
81
![Page 82: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group](https://reader033.vdocuments.net/reader033/viewer/2022060807/608be3bef4533f53567af28b/html5/thumbnails/82.jpg)
Active Subscriptions: S1
S1
82
![Page 83: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group](https://reader033.vdocuments.net/reader033/viewer/2022060807/608be3bef4533f53567af28b/html5/thumbnails/83.jpg)
Active Subscriptions: S1, S2
S1
S2
83
![Page 84: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group](https://reader033.vdocuments.net/reader033/viewer/2022060807/608be3bef4533f53567af28b/html5/thumbnails/84.jpg)
Active Subscriptions: S1, S2Active Update Regions: U1
S1
S2
U1
84
![Page 85: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group](https://reader033.vdocuments.net/reader033/viewer/2022060807/608be3bef4533f53567af28b/html5/thumbnails/85.jpg)
We can determine the overlaps when we process the endpoint of a region.
85
![Page 86: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group](https://reader033.vdocuments.net/reader033/viewer/2022060807/608be3bef4533f53567af28b/html5/thumbnails/86.jpg)
Active Subscriptions: S2Active Update Regions: U1
S1 overlaps U1
S1
S2
U1
86
![Page 87: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group](https://reader033.vdocuments.net/reader033/viewer/2022060807/608be3bef4533f53567af28b/html5/thumbnails/87.jpg)
Active Subscriptions: noneActive Update Regions: U1
S2 overlaps U1
S1
S2
U1
87
![Page 88: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group](https://reader033.vdocuments.net/reader033/viewer/2022060807/608be3bef4533f53567af28b/html5/thumbnails/88.jpg)
88
![Page 89: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group](https://reader033.vdocuments.net/reader033/viewer/2022060807/608be3bef4533f53567af28b/html5/thumbnails/89.jpg)
If we encounter the endpoint of a subscription region, then it overlaps with all active update regions.
If it is the endpoint of an update region, then it overlaps with all active subscription region.
89
![Page 90: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group](https://reader033.vdocuments.net/reader033/viewer/2022060807/608be3bef4533f53567af28b/html5/thumbnails/90.jpg)
Exercise: trace through the smallexample and convince yourself that it works..
90
![Page 91: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group](https://reader033.vdocuments.net/reader033/viewer/2022060807/608be3bef4533f53567af28b/html5/thumbnails/91.jpg)
Sort-based approach:O(n log n + m log m) for sorting
O(n + m) to scan
91
![Page 92: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group](https://reader033.vdocuments.net/reader033/viewer/2022060807/608be3bef4533f53567af28b/html5/thumbnails/92.jpg)
Note: storing overlap information still takes O(nm) since in the worst case there are O(nm) overlaps.
92
![Page 93: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group](https://reader033.vdocuments.net/reader033/viewer/2022060807/608be3bef4533f53567af28b/html5/thumbnails/93.jpg)
Temporal Coherence
Changes to value of an attribute is small between two consecutive time steps.
93
![Page 94: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group](https://reader033.vdocuments.net/reader033/viewer/2022060807/608be3bef4533f53567af28b/html5/thumbnails/94.jpg)
Sort-based approach:O(n log n + m log m) to pre-sort the dataO(n + m) for sorting (insertion sort)O(n + m) to scan
94
![Page 95: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group](https://reader033.vdocuments.net/reader033/viewer/2022060807/608be3bef4533f53567af28b/html5/thumbnails/95.jpg)
In fact, only regions which are swapped during insertion sort need to update their overlap set.
95
![Page 96: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group](https://reader033.vdocuments.net/reader033/viewer/2022060807/608be3bef4533f53567af28b/html5/thumbnails/96.jpg)
96