Hi, it sounds like PDL's PDL::Graphics::TriD module will display it. It also does a Polar coordinate system. You might want to ask on the PDL maillist. You will find some real experts there who can assist in setting up your piddles. The secret is in understanding the piddles. :-)

In the meantime, here are a couple of simple TriD examples. More examples, including how to do animation is at TriD_Tutorial

A polar coordinate system example:

#!/usr/bin/perl use warnings; use PDL; use PDL::Graphics::TriD; # POLAR2D A 2-D polar coordinate system. [$piddle] is interpreted as t +he z coordi # nate over theta and r (theta = the first dimension of +the piddle). $size = 25; $x = ( xvals zeroes $size+ 1, $size + 1 );# / $size; print "$x\n"; print join ' ',dims $x; print "\n"; $y = ( yvals zeroes $size+ 1, $size + 1 );# / $size; #$z = 0.5 + 0.5 * ( sin( $x * 6.3 ) * sin( $y * 6.3 ) )**3; # Bumps $z= $x * 10; $r = $x; $g = $y; $b = $z; # The reason for the [] around $x,$y,$z: # 1. You can give all the coordinates and colors in one piddle. $c = ( zeroes 3, $size + 1 ) / $size; $coords = sin( ( 3 + 3 * xvals $c) * yvals $c); $colors = $coords; print "hit q to continue\n"; # 2. You can use defaults inside the brackets: lattice3d [ $z ], [ $r ]; # Note: no $x, $y, and $r is greyscale print "hit q to continue\n"; # 3. You can plot in certain other systems as defaults imag3d_ns [ POLAR2D, $z ], [ $r, $g, $b ]; # Draw the familiar # bumpy surface in polar # coordinates

A conventional 3d cartesian example using easy-to-see spheres

#!/usr/bin/perl use warnings; use strict; use PDL; use PDL::Graphics::TriD; keeptwiddling3d(); my $piddle = pdl( [ [1,1,1],[2,2,2],[3,3,3],[4,4,4],[5,5,5],[6,6,6],[7 +,7,7],[8,8,8], [1,0,1] ] ); spheres3d $piddle ;

I'm not really a human, but I play one on earth.
Old Perl Programmer Haiku ................... flash japh

In reply to Re: Polar Co-Ordinates: Rotating a 3D cartesian point around a fixed axis? by zentara
in thread Polar Co-Ordinates: Rotating a 3D cartesian point around a fixed axis? by fraizerangus

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.