PDL::Graphics::TriD::Rout
Rout(t)        User Contributed Perl Documentation        Rout(t)



NAME
        PDL::Graphics::TriD::Rout - Helper routines for Three-dimensional graphics


DESCRIPTION
       This module is for miscellaneous PP-defined utility rou-
       tines for the PDL::Graphics::TriD module. Currently, there
       are

FUNCTIONS
       combcoords

         Signature: (x(); y(); z();
                       float [o]coords(tri=3);)

       Combine three coordinates into a single piddle.

       Combine x, y and z to a single piddle the first dimension
       of which is 3. This routine does dataflow automatically.

       repulse

         Signature: (coords(nc,np);
                        [o]vecs(nc,np);
                        int [t]links(s);;
                       double boxsize;
                       int dmult;
                       double a;
                       double b;
                       double c;
                       double d;
               )

       Repulsive potential for molecule-like constructs.

       "repulse" uses a hash table of cubes to quickly calculate
       a repulsive force that vanishes at infinity for many
       objects. For use by the module PDL::Graphics::TriD::Math-
       Graph.  For definition of the potential, see the actual
       function.

       attract

         Signature: (coords(nc,np);
                       int from(m);
                       int to(o);
                       strength(h);
                       [o]vecs(nc,np);;
                       double m;
                       double ms;
               )

       Attractive potential for molecule-like constructs.

       "attract" is used to calculate an attractive force for
       many objects, of which some attract each other (in a way
       like molecular bonds).  For use by the module PDL::Graph-
       ics::TriD::MathGraph.  For definition of the potential,
       see the actual function.




       vrmlcoordsvert

         Signature: (vertices(n=3); char* space; char* fd)

       info not available

       contour_segments

       This is the interface for the pp routine contour_seg-
       ments_internal - it takes 3 piddles as input

       $c is a contour value (or a list of contour values)

       $data is an [m,n] array of values at each point

       $points is a list of [3,m,n] points, it should be a grid
       monotonically increasing with m and n.

       contour_segments returns a reference to a Perl array of
       line segments associated with each value of $c.  It does
       not (yet) handle missing data values.

       Algorthym
           The data array represents samples of some field
           observed on the surface described by points.  For each
           contour value we look for intersections on the line
           segments joining points of the data.  When an inter-
           section is found we look to the adjoining line seg-
           ments for the other end(d) of the line segment(t).  So
           suppose we find an intersection on an x-segment.  We
           first look down to the left y-segment, then to the
           right y-segment and finally across to the next x-seg-
           ment.  Once we find one in a box (two on a point) we
           can quit because there can only be one.  After we are
           done with a given x-segment, we look to the leftover
           possibilities for the adjoining y-segment.  Thus the
           contours are built as a collection of line segments
           rather than a set of closed polygons.

AUTHOR
       Copyright (C) 2000 James P. Edwards Copyright (C) 1997
       Tuomas J. Lukka.  All rights reserved. There is no war-
       ranty. You are allowed to redistribute this software /
       documentation under certain conditions. For details, see
       the file COPYING in the PDL distribution. If this file is
       separated from the PDL distribution, the copyright notice
       should be included in the file.



perl v5.6.1                 2002-04-08                    Rout(t)