<!-- MHonArc v2.4.4 --> <!--X-Subject: Re: q-tree stuff --> <!--X-From-R13: "Qnegre F Eubpx" <pgfbNhzvnpf.hzq.rqh> --> <!--X-Date: from tacitus.globecomm.net [207.51.48.7] by mx01.ny.us.ibm.net id 857369102.114395-1 Mon Mar 3 06:05:02 1997 --> <!--X-Message-Id: 199703030434.EAA18312#lupa,umiacs.umd.edu --> <!--X-Content-Type: text/plain --> <!--X-Head-End--> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> <html> <head> <title>MUD-Dev message, Re: q-tree stuff</title> <!-- meta name="robots" content="noindex,nofollow" --> <link rev="made" href="mailto:ctso#umiacs,umd.edu"> </head> <body background="/backgrounds/paperback.gif" bgcolor="#ffffff" text="#000000" link="#0000FF" alink="#FF0000" vlink="#006000"> <font size="+4" color="#804040"> <strong><em>MUD-Dev<br>mailing list archive</em></strong> </font> <br> [ <a href="../">Other Periods</a> | <a href="../../">Other mailing lists</a> | <a href="/search.php3">Search</a> ] <br clear=all><hr> <!--X-Body-Begin--> <!--X-User-Header--> <!--X-User-Header-End--> <!--X-TopPNI--> Date: [ <a href="msg00042.html">Previous</a> | <a href="msg00044.html">Next</a> ] Thread: [ <a href="msg00041.html">Previous</a> | <a href="msg00070.html">Next</a> ] Index: [ <A HREF="author.html#00043">Author</A> | <A HREF="#00043">Date</A> | <A HREF="thread.html#00043">Thread</A> ] <!--X-TopPNI-End--> <!--X-MsgBody--> <!--X-Subject-Header-Begin--> <H1>Re: q-tree stuff</H1> <HR> <!--X-Subject-Header-End--> <!--X-Head-of-Message--> <UL> <LI><em>To</em>: <<A HREF="mailto:mud-dev#null,net">mud-dev#null,net</A>></LI> <LI><em>Subject</em>: Re: q-tree stuff</LI> <LI><em>From</em>: "Carter T Shock" <<A HREF="mailto:ctso#umiacs,umd.edu">ctso#umiacs,umd.edu</A>></LI> <LI><em>Date</em>: Sun, 2 Mar 1997 23:34:07 -0500</LI> </UL> <!--X-Head-of-Message-End--> <!--X-Head-Body-Sep-Begin--> <HR> <!--X-Head-Body-Sep-End--> <!--X-Body-of-Message--> <PRE> > Thanks Todd! The picture came out fine on my Amiga, so it must have > worked on PC's, right? :-) Whew. Bit of honesty here.. I am completely new to PC's, windoze, MIME et. al. Got my first ever PC about a month ago. Eunuchs rules :) > > To summarize my understanding here (you never know, I could have missed > it altogether!), objects are stored in B-trees, in which the index is [snip] Yeah, that's pretty much the gist of it, but recall that that is a very limited implementation. Without getting too gory, another variant is to implement a B+-Tree and store codes for the morton blocks in internal nodes and codes for point data in the leaves. Note that the morton block stuff applies to all flavors of quadtrees (for linearizing them.. getting rid o' the pointers). Use of morton codes to index the data itself is limited usually to point data. You can choose a centroid for objects in higher dimensions but it never works out that well in real life. > If your "grids" get *very* big, so that having an array for them is not > practical, then you do as Todd said - just have quad-trees representing > the various properties that are needed to describe the location (terrain > type, monster sets, weather, temperature, etc.) Well, not really. The grid can be any size, the question is what is the minimum feature size in the grid. Here we're talking region qtrees where the blocks themselves become what we are interested in (you subdivide until you have a whole block that is or is not "forest" or whatever). If you are indexing Wyoming, things work extremely well because it's big and rectangular. Trying to do something like fjords is messy as hell. lotsa subdivision. The point is that I agree wholeheartedly. qtrees are not the whole answer. Hybrid structures (a qtree of r-trees, an r-tree of qtrees, k-d trees, various other esoterica) are usually the best solution. For discrete data (i.e. not arbitrary region, but objects) there are some nice variants (check out "PMR Quadtrees"), but in general, qtrees tend to do better with either sparse data sets or dense data sets with fairly regular distribution. cities and fields in the same structure tend to do better with r-trees, or r-tree-like structures. However, in light of your wish to have a space that doesn't necessarily obey all of the rules of physics.... One huge advantage of qtrees over rtrees is that a spatial join is very efficient. Qtrees are like binary trees where every node in the tree is itself a qtree; rtrees don't have this property (since they tend to be built like B-Trees). This means that you can take some chunk of one quadtree, offset it to the coordinates of another quadtree and then merge the two structures fairly easily and quickly. Generally with rtrees this forces a rebuild. One potential application is a hunk of the world that moves around, toting it's contents with it. Another interesting side-effect is the dimensional porthole bit... you can have several spaces indexed by different qtrees that may at one time or another share some nodes. Where and when they intersect defines the porthole :) -Todd (who is obviously in need of some sleep) </PRE> <!--X-Body-of-Message-End--> <!--X-MsgBody-End--> <!--X-Follow-Ups--> <HR> <!--X-Follow-Ups-End--> <!--X-References--> <!--X-References-End--> <!--X-BotPNI--> <UL> <LI>Prev by Date: <STRONG><A HREF="msg00042.html">Re: Just a bit of musing</A></STRONG> </LI> <LI>Next by Date: <STRONG><A HREF="msg00044.html">Issues from the digests and Wout's list</A></STRONG> </LI> <LI>Prev by thread: <STRONG><A HREF="msg00041.html">q-tree stuff</A></STRONG> </LI> <LI>Next by thread: <STRONG><A HREF="msg00070.html">Re: q-tree stuff</A></STRONG> </LI> <LI>Index(es): <UL> <LI><A HREF="index.html#00043"><STRONG>Date</STRONG></A></LI> <LI><A HREF="thread.html#00043"><STRONG>Thread</STRONG></A></LI> </UL> </LI> </UL> <!--X-BotPNI-End--> <!--X-User-Footer--> <!--X-User-Footer-End--> <ul><li>Thread context: <BLOCKQUOTE><UL> <LI><STRONG>Re: Issues from the digests and Wout's list</STRONG>, <EM>(continued)</EM> <ul compact> <LI><strong><A NAME="00047" HREF="msg00047.html">Re: Issues from the digests and Wout's list</A></strong>, coder <a href="mailto:coder#ibm,net">coder#ibm,net</a>, Tue 04 Mar 1997, 13:29 GMT </LI> <LI><strong><A NAME="00148" HREF="msg00148.html">Re: Issues from the digests and Wout's list</A></strong>, coder <a href="mailto:coder#ibm,net">coder#ibm,net</a>, Thu 20 Mar 1997, 13:05 GMT </LI> <LI><strong><A NAME="00149" HREF="msg00149.html">Re: Issues from the digests and Wout's list</A></strong>, coder <a href="mailto:coder#ibm,net">coder#ibm,net</a>, Thu 20 Mar 1997, 13:21 GMT </LI> </ul> </LI> <LI><strong><A NAME="00041" HREF="msg00041.html">q-tree stuff</A></strong>, Chris Gray <a href="mailto:cg#ami-cg,GraySage.Edmonton.AB.CA">cg#ami-cg,GraySage.Edmonton.AB.CA</a>, Mon 03 Mar 1997, 04:19 GMT <UL> <li><Possible follow-up(s)><br> <LI><strong><A NAME="00043" HREF="msg00043.html">Re: q-tree stuff</A></strong>, Carter T Shock <a href="mailto:ctso#umiacs,umd.edu">ctso#umiacs,umd.edu</a>, Mon 03 Mar 1997, 14:05 GMT </LI> <LI><strong><A NAME="00070" HREF="msg00070.html">Re: q-tree stuff</A></strong>, coder <a href="mailto:coder#ibm,net">coder#ibm,net</a>, Sat 08 Mar 1997, 11:54 GMT </LI> </UL> </LI> <LI><strong><A NAME="00033" HREF="msg00033.html">Linear Quadtrees</A></strong>, Carter T Shock <a href="mailto:ctso#umiacs,umd.edu">ctso#umiacs,umd.edu</a>, Sun 02 Mar 1997, 20:35 GMT <LI><strong><A NAME="00018" HREF="msg00018.html">Quadtrees?</A></strong>, Wout Mertens <a href="mailto:Wout.Mertens#rug,ac.be">Wout.Mertens#rug,ac.be</a>, Fri 28 Feb 1997, 10:54 GMT <UL> <LI><strong><A NAME="00019" HREF="msg00019.html">Re: Quadtrees?</A></strong>, coder <a href="mailto:coder#ibm,net">coder#ibm,net</a>, Fri 28 Feb 1997, 17:33 GMT </LI> </UL> </LI> </UL></BLOCKQUOTE> </ul> <hr> <center> [ <a href="../">Other Periods</a> | <a href="../../">Other mailing lists</a> | <a href="/search.php3">Search</a> ] </center> <hr> </body> </html>