in reply to Re^3: 3D module
in thread 3D module
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: 3D module
by BrowserUk (Patriarch) on Jan 25, 2006 at 00:22 UTC | |
Now you've explained what you are trying to do, which if I've understood you, is a 3D version of Equidistant Letter Sequences (ELS), I am rather baffled as to why you think that you need a matrix of the huge proportions that you indicated. The way the ELS work in 2D space is to form a 2D grid from the 304805 letters such that x*y is equal to (or slightly greater) than 304805. Not 304805 **2 = 93 billion (and definitely not (304805*2+1)**2 = 371 billion which would be the 2d equivalent of the -304805 < (x=y=z)< 304805 you indicated you are looking for?). Eg. The 3D equivalent of the ELS would be to print the characters as (for example) 60 lines of 80 characters on 64 pages (80x60x64=307200) and then search the 3D space. Building an matrix of these dimensions takes less that 10 MB using standard Perl nested arrays. However, the fastest way to search for patterns in the text in 3D space would be to leave the text as a single long string and use the regex engine to do the work. For example, to search for a particular word along the Z-axis, you might use a regex like
You can't actually use math within a quantifier brackets, but that's just to show how the math would be used. Generating regexes to search the
When each of these regexes is applied to the single long string, it will efficiently search the entire 3D matrix of the set dimensions and locate any occurrences of the specified word along the indicated direction. All that is required is record the positions at which any matches occur for each word. It's then just a looping over the chosen search terms and the sets of dimensions. Given a reasonable minimum word length, there are surprisingly few 3D dimensions sets that make sense to search. Depending upon the number of words you choose to look for and a reasonably fast machine, it shouldn't take more than a few hours to do. The hardest problem will be deciding which matches are "in close proximity". This is where some kind of 3D visualisation would be useful, and displaying an 80x60x64 or 40x30x255 matrix will be rather easier (and less expensive) than the behemoth you were talking about :) Generating jpg with just the matched words, using an x/y offset and colour (shade) or perhaps font size to indicate Z-axis depth would be fairly easy to program and interpret. A nice rotatable, zoomable 3D plot would be even better, but quite difficult to program. All that would be left then is to trying to ascribe meaning to those groupings found--but that's your task :) Good luck. Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
| [reply] [d/l] [select] |
| |
|
Re^5: 3D module
by moklevat (Priest) on Jan 24, 2006 at 20:46 UTC | |
PDL can manage objects of about 500x500x500 with <1GB of RAM using doubles for coordinates. If plain dots won't work for you, I'm not certain how you would go about rendering suitable glyphs. If you're willing to go outside perl you may also find some benefit from systems like OpenDX, or R with RGL. Good luck with the project. | [reply] |