line3d.pl (PDL-2.076) | : | line3d.pl (PDL-2.077) | ||
---|---|---|---|---|
#!/usr/bin/perl | #!/usr/bin/perl | |||
# | # | |||
# This program is a simple diagnostic example to | # This program is a simple diagnostic example to | |||
# check if TriD line3d is working | # check if TriD line3d is working | |||
# | # | |||
use PDL; | use PDL; | |||
use PDL::NiceSlice; | use PDL::NiceSlice; | |||
use PDL::Graphics::TriD; | use PDL::Graphics::TriD; | |||
# $PDL::debug_trid=1; | ||||
$PDL::Graphics::TriD::verbose //= 0; | $PDL::Graphics::TriD::verbose //= 0; | |||
$size = 25; | $size = 25; | |||
$cz = (xvals zeroes $size+1) / $size; # interval 0..1 | $cz = (xvals zeroes $size+1) / $size; # interval 0..1 | |||
$cx = sin($cz*12.6); # Corkscrew | $cx = sin($cz*12.6); # Corkscrew | |||
$cy = cos($cz*12.6); | $cy = cos($cz*12.6); | |||
line3d [$cx,$cy,$cz]; # Draw a line | line3d [$cx,$cy,$cz]; # Draw a line | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 0 lines changed or added |