in reply to 3D module

I would suggest that you look into PDL, the Perl Data Language. There are some screenshots to whet your appetite. One very nice feature of PDL is that it has an interactive shell and some built-in demos for working through problems.

Here is a very simple example that displays a 3D plot of four points with 4 different colors in an X window. You can click and drag in the window to change the view.
#!/usr/bin/perl use strict; use PDL; use PDL::Graphics::TriD; my $coordinates = pdl [[10,10,0], [0,10,0], [1,1,1], [-10,-10,-10]]; my $colors = pdl [[50,50,50], [50,0,50], [50,50,0], [0,0,50]]; points3d $coordinates, $colors, {PointSize=>2};
update:Removed unnecessary keeptwiddling3d() loop.

Replies are listed 'Best First'.
Re^2: 3D module
by thenetfreaker (Friar) on Jan 23, 2006 at 21:54 UTC
    Hello,
    i found it and SDL as nice approaches, bust as BrowserUk mentioned that it "... would require your computer to have approximately 226 PetaBytes of RAM."; because as i found out - "SDL_Init 65535", which means that it wouldn't even work for 100*100*100.
    What considering PDL, i did a( maybe that's the problem) few testing which resulted not better.
    Even on Windows platform, i serched for an app like Paint-Brush( because of its lurge x,y coordinates( something like 300,000*300,000)) but 3D, and found nothing.
    I even hoped Macromeria products could evantually become handy for me, but than i found out how pourly coordinated they are.

    If anyone can think of a comprihancive way to present such a Matrix,
    please inform me.

    P.S.: If anyone is inerested in what on Earth am i creating, i would more than glad to tell that i'm working on a matrix representation of the (Jewish) Torah (which has 304805 letters), and i what to "paint" each letter in a spesific colour, and so when i'll look-for a spesific word i'm more than sure that i'll see its (coloureful 3D) image among the letters ( when as if conecting the matching letters by lines - like drawing on stars).

      It's an interesting idea, but even if you had the memory to hold it, you would need a 10,160 (80x127 grid) of the highest resolution LCD displays to be able to display a single slice through it. And that would be roughly 38 meters square!

      At $8,000 a throw, that comes to around US$80 million. You might get a bulk purchase discount, but I doubt it would really help :)

      On a more serious note, given that you are going to be unable to display the whole thing, or even a significant chunk of it in one go, it would be best to look at taking a different tack. Rather than building the whole thing and then displaying bits of it, you could build the bit you can display only, and then as you scroll around, you delete the bits that are leaving the screen and draw the new bits on the other side (top/bottom etc.). This is basically how those mega-world video games work.

      That said, I am having great difficulty in tryng to visualise what it is you are attempting to display. Maybe you could try and explain using a limited alphabet (a-e?) and some ascii art?


      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.
      A reply falls below the community's threshold of quality. You may see it by logging in.