"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "Graphics/TriD/TriD.pm" between
PDL-2.078.tar.gz and PDL-2.079.tar.gz

About: PDL (Perl Data Language) aims to turn perl into an efficient numerical language for scientific computing (similar to IDL and MatLab).

TriD.pm  (PDL-2.078):TriD.pm  (PDL-2.079)
skipping to change at line 167 skipping to change at line 167
imag3d([$zcoords]); imag3d([$zcoords]);
you don't need to start thinking about where to plot the points: you don't need to start thinking about where to plot the points:
points3d([SURF2D,$zcoords]); points3d([SURF2D,$zcoords]);
will do exactly the same. will do exactly the same.
=head2 Wrapping your head around 3d surface specifications =head2 Wrapping your head around 3d surface specifications
Let's begin by thnking about how you might make a 2d data plot. Let's begin by thinking about how you might make a 2d data plot.
If you sampled your data at regular intervals, you would have If you sampled your data at regular intervals, you would have
a time serires y(t) = (y0, y1, y2, ...). You could plot y vs t a time serires y(t) = (y0, y1, y2, ...). You could plot y vs t
by computing t0 = 0, t1 = dt, t2 = 2 * dt, and then plotting by computing t0 = 0, t1 = dt, t2 = 2 * dt, and then plotting
(t0, y0), (t1, y1), etc. (t0, y0), (t1, y1), etc.
Next suppose that you measured x(t) and y(t). You can still Next suppose that you measured x(t) and y(t). You can still
plot y vs t, but you can also plot y vs x by plotting (x0, y0), plot y vs t, but you can also plot y vs x by plotting (x0, y0),
(x1, y1), etc. The x-values don't have to increase monotonically: (x1, y1), etc. The x-values don't have to increase monotonically:
they could back-track on each other, for example, like the they could back-track on each other, for example, like the
latitude and longitude of a boat on a lake. If you use plplot, latitude and longitude of a boat on a lake. If you use plplot,
skipping to change at line 358 skipping to change at line 358
See module documentation for more information on See module documentation for more information on
contexts and options contexts and options
=head2 lattice3d =head2 lattice3d
=for ref =for ref
alias for mesh3d alias for mesh3d
=item trigrid3d
Show a triangular mesh, giving C<$vertices> and C<$faceidx> which is
a series of triplets of indices into the vertices, each describing
one triangle. The order of points matters for the shading - the normal
vector points towards the clockface if the points go clockwise.
Options: C<Smooth> (on by default), C<Lines> (off by default),
C<ShowNormals> (off by default, useful for debugging).
Implemented by C<PDL::Graphics::TriD::STrigrid_S>.
=item trigrid3d_ns
Like L</trigrid3d>, but without shading or normals.
Implemented by C<PDL::Graphics::TriD::STrigrid>.
=head2 points3d =head2 points3d
=for ref =for ref
3D points plot, defined by a variety of contexts 3D points plot, defined by a variety of contexts
Implemented by C<PDL::Graphics::TriD::Points>. Implemented by C<PDL::Graphics::TriD::Points>.
=for usage =for usage
skipping to change at line 553 skipping to change at line 571
These functions are not exported, partly because they are not fully These functions are not exported, partly because they are not fully
implemented. implemented.
=over =over
=item contour3d =item contour3d
Implemented by C<PDL::Graphics::TriD::Contours>. Implemented by C<PDL::Graphics::TriD::Contours>.
=item STrigrid_S_imag3d
Implemented by C<PDL::Graphics::TriD::STrigrid_S>.
=item STrigrid_imag3d
Implemented by C<PDL::Graphics::TriD::STrigrid>.
=back =back
=head1 CONCEPTS =head1 CONCEPTS
The key concepts (object types) of TriD are explained in the following: The key concepts (object types) of TriD are explained in the following:
=head2 Object =head2 Object
In this 3D abstraction, everything that you can "draw" In this 3D abstraction, everything that you can "draw"
without using indices is an Object. That is, if you have a surface, without using indices is an Object. That is, if you have a surface,
skipping to change at line 684 skipping to change at line 694
# ' # '
package PDL::Graphics::TriD; package PDL::Graphics::TriD;
use strict; use strict;
use warnings; use warnings;
use PDL::Exporter; use PDL::Exporter;
use PDL::Core ''; # barf use PDL::Core ''; # barf
our @ISA = qw/PDL::Exporter/; our @ISA = qw/PDL::Exporter/;
our @EXPORT_OK = qw/imag3d_ns imag3d line3d mesh3d lattice3d points3d our @EXPORT_OK = qw/imag3d_ns imag3d line3d mesh3d lattice3d points3d
trigrid3d trigrid3d_ns
spheres3d describe3d imagrgb imagrgb3d hold3d release3d spheres3d describe3d imagrgb imagrgb3d hold3d release3d
keeptwiddling3d nokeeptwiddling3d close3d keeptwiddling3d nokeeptwiddling3d close3d
twiddle3d grabpic3d tridsettings/; twiddle3d grabpic3d tridsettings/;
our %EXPORT_TAGS = (Func=>\@EXPORT_OK); our %EXPORT_TAGS = (Func=>\@EXPORT_OK);
our $verbose; our $verbose;
use PDL::Graphics::TriD::Object; use PDL::Graphics::TriD::Object;
use PDL::Graphics::TriD::Window; use PDL::Graphics::TriD::Window;
use PDL::Graphics::TriD::ViewPort; use PDL::Graphics::TriD::ViewPort;
use PDL::Graphics::TriD::Graph; use PDL::Graphics::TriD::Graph;
skipping to change at line 883 skipping to change at line 894
*imag3d_ns=*imag3d_ns=\&PDL::imag3d_ns; *imag3d_ns=*imag3d_ns=\&PDL::imag3d_ns;
sub PDL::imag3d_ns { &checkargs; sub PDL::imag3d_ns { &checkargs;
graph_object(PDL::Graphics::TriD::SLattice->new(@_)); graph_object(PDL::Graphics::TriD::SLattice->new(@_));
} }
*imag3d=*imag3d=\&PDL::imag3d; *imag3d=*imag3d=\&PDL::imag3d;
sub PDL::imag3d { &checkargs; sub PDL::imag3d { &checkargs;
graph_object(PDL::Graphics::TriD::SLattice_S->new(@_)); graph_object(PDL::Graphics::TriD::SLattice_S->new(@_));
} }
#################################################################### *trigrid3d=*trigrid3d=\&PDL::trigrid3d;
################ JNK 15mar11 added section start ################### sub PDL::trigrid3d { &checkargs;
*STrigrid_S_imag3d=*STrigrid_S_imag3d=\&PDL::STrigrid_S_imag3d;
sub PDL::STrigrid_S_imag3d { &checkargs;
graph_object(PDL::Graphics::TriD::STrigrid_S->new(@_)); } graph_object(PDL::Graphics::TriD::STrigrid_S->new(@_)); }
*STrigrid_imag3d=*STrigrid_imag3d=\&PDL::STrigrid_imag3d; *trigrid3d_ns=*trigrid3d_ns=\&PDL::trigrid3d_ns;
sub PDL::STrigrid_imag3d { &checkargs; sub PDL::trigrid3d_ns { &checkargs;
graph_object(PDL::Graphics::TriD::STrigrid->new(@_)); } graph_object(PDL::Graphics::TriD::STrigrid->new(@_)); }
################ JNK 15mar11 added section finis ###################
####################################################################
*mesh3d=*mesh3d=\&PDL::mesh3d; *mesh3d=*mesh3d=\&PDL::mesh3d;
*lattice3d=*lattice3d=\&PDL::mesh3d; *lattice3d=*lattice3d=\&PDL::mesh3d;
*PDL::lattice3d=*PDL::lattice3d=\&PDL::mesh3d; *PDL::lattice3d=*PDL::lattice3d=\&PDL::mesh3d;
sub PDL::mesh3d { &checkargs; sub PDL::mesh3d { &checkargs;
graph_object(PDL::Graphics::TriD::Lattice->new(@_)); graph_object(PDL::Graphics::TriD::Lattice->new(@_));
} }
*points3d=*points3d=\&PDL::points3d; *points3d=*points3d=\&PDL::points3d;
sub PDL::points3d { &checkargs; sub PDL::points3d { &checkargs;
 End of changes. 7 change blocks. 
17 lines changed or deleted 24 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)