File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -40,5 +40,6 @@ Makefile.PL
4040MANIFEST This list of files
4141MANIFEST.SKIP
4242t/arcball.t
43+ t/graph.t
4344t/objects.t
4445t/quaternion.t
Original file line number Diff line number Diff line change 1+ use strict;
2+ use warnings;
3+ use Test::More;
4+ use PDL;
5+ use PDL::Graphics::TriD::Graph;
6+ use Test::PDL;
7+
8+ my $euclid = PDL::Graphics::TriD::EuclidAxes-> new;
9+ $euclid -> add_scale(my $points = float(' 0 0 0; 2 1 1' ), my $inds = [0..2]);
10+ $euclid -> finish_scale;
11+ is_deeply $euclid -> {AxisLabelsObj }{Strings }, [qw(
12+ -0.100 0.450 1.000 1.550 2.100
13+ -0.050 0.225 0.500 0.775 1.050
14+ -0.050 0.225 0.500 0.775 1.050
15+ ) ]
16+ or diag explain $euclid -> {AxisLabelsObj }{Strings };
17+ is_pdl $euclid -> transform($points -> zeroes, $points , $inds ), float('
18+ 0.045454 0.045454 0.045454; 0.954545 0.954545 0.954545
19+ ' );
20+
21+ my $cyl = PDL::Graphics::TriD::CylindricalEquidistantAxes-> new;
22+ $cyl -> add_scale(my $points2 = float(' -80 -80 800; 80 80 900' ), $inds );
23+ $cyl -> finish_scale;
24+ is_pdl $cyl -> transform($points2 -> zeroes, $points2 , $inds ), float('
25+ 0.413176 0 0.101756; 0.586824 1 0.050878
26+ ' );
27+
28+ done_testing;
You can’t perform that action at this time.
0 commit comments