Hi
i am a new user of pdl ,i have tried to run the color code listed in 
http://search.cpan.org/~chm/PDL-2.4.7/Graphics/Graphics2D.pm
and i have posted recently a message to perlmonk, finally i have found that i 
need the file imag2d.pdl, i can't find the file in my perl folder nor in the 
PDL-2.4.7.tar.gz source , but i found it in the PDL-2.4.6.tar.gz source, i have 
downloaded a newer file from 
http://sourceforge.net/tracker/?func=detail&atid=300612&aid=2925007&group_id=612
 is it planned to include the file in a future package ?. 
this is my last successfull code to display the color code found in 
Graphics2D.pm
its image like a redish dusk sky over a green ground (an art painting)
http://img46.imageshack.us/img46/7928/imag2d.png
this is working well on ms windows if putting the file imag2d.pdl in the same 
folder of the code

 

use PDL;
use PGPLOT;
use PDL::Graphics2D; #imports imag2d() and twiddle()
use PDL::AutoLoader;
our @PDLLIB;
push @PDLLIB, '.';

#my $winopt = {Device => '/GW', WindowWidth => 7, Aspect => 1}; 
#my $w = PDL::Graphics2D->new('PGPLOT'); 
  $a = sequence(64,48,3);  # make test RGB image
  $a = $a->mv(2,0);        # color must be dim(0) with size [0..4]
  $a /= $a->max;           # pixel values in [0.0,1.0]
  $a = sin(10*$a);
  imag2d($a); 
  
on ms windows this code working well, on linux mint i get error :
Your vendor has not defined OpenGL macro GLUT_ACTION_ON_WINDOW_CLOSE, used at 
(eval 36) line 415. what is this meaning . on linux i have'nt plplot installed 
yet.
also in the synopsis of the PDL::Graphics2D there is:
$win = PDL::Graphics2D->new(<Interface>, <Options>);
i have commented it above because if i uncomment it i will get two windows the 
first for the plot and the second an empty window covering with persistence the 
plot window, so how to use exactly 
$win = PDL::Graphics2D->new(<Interface>, <Options>);
to display the plot to the screen, 
at last thanks very much for the wonderfull PDL module, especially the 3D 
features with PDL::Graphics::TriD 
best wishes
eros
                                          
_______________________________________________
Perldl mailing list
[email protected]
http://mailman.jach.hawaii.edu/mailman/listinfo/perldl

Reply via email to