.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Rout 3pm" .TH Rout 3pm "2023-06-17" "perl v5.36.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" PDL::Graphics::TriD::Rout \- Helper routines for Three\-dimensional graphics .SH "DESCRIPTION" .IX Header "DESCRIPTION" This module is for miscellaneous PP-defined utility routines for the PDL::Graphics::TriD module. Currently, there are #line 39 \*(L"Rout.pm\*(R" .SH "FUNCTIONS" .IX Header "FUNCTIONS" .SS "combcoords" .IX Subsection "combcoords" .Vb 2 \& Signature: (x(); y(); z(); \& float [o]coords(tri=3);) .Ve .PP Combine three coordinates into a single ndarray. .PP Combine x, y and z to a single ndarray the first dimension of which is 3. This routine does dataflow automatically. .PP combcoords does not process bad values. It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays. .SS "repulse" .IX Subsection "repulse" .Vb 10 \& Signature: (coords(nc,np); \& [o]vecs(nc,np); \& int [t]links(np);; \& double boxsize; \& int dmult; \& double a; \& double b; \& double c; \& double d; \& ) .Ve .PP Repulsive potential for molecule-like constructs. .PP \&\f(CW\*(C`repulse\*(C'\fR 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::MathGraph. For definition of the potential, see the actual function. .PP repulse does not process bad values. It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays. .SS "attract" .IX Subsection "attract" .Vb 8 \& Signature: (coords(nc,np); \& int from(nl); \& int to(nl); \& strength(nl); \& [o]vecs(nc,np);; \& double m; \& double ms; \& ) .Ve .PP Attractive potential for molecule-like constructs. .PP \&\f(CW\*(C`attract\*(C'\fR 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::Graphics::TriD::MathGraph. For definition of the potential, see the actual function. .PP attract does not process bad values. It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays. .SS "vrmlcoordsvert" .IX Subsection "vrmlcoordsvert" .Vb 1 \& Signature: (vertices(n=3); char* space; PerlIO *fp) .Ve .PP info not available .PP vrmlcoordsvert does not process bad values. It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays. .SS "contour_segments" .IX Subsection "contour_segments" This is the interface for the pp routine contour_segments_internal \&\- it takes 3 ndarrays as input .PP \&\f(CW$c\fR is a contour value (or a list of contour values) .PP \&\f(CW$data\fR is an [m,n] array of values at each point .PP \&\f(CW$points\fR is a list of [3,m,n] points, it should be a grid monotonically increasing with m and n. .PP contour_segments returns a reference to a Perl array of line segments associated with each value of \f(CW$c\fR. It does not (yet) handle missing data values. .IP "Algorithm" 4 .IX Item "Algorithm" 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 intersection is found we look to the adjoining line segments for the other end(s) of the line segment(s). 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\-segment. 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. .SH "AUTHOR" .IX Header "AUTHOR" Copyright (C) 2000 James P. Edwards Copyright (C) 1997 Tuomas J. Lukka. All rights reserved. There is no warranty. You are allowed to redistribute this software / documentation under certain conditions. For details, see the file \s-1COPYING\s0 in the \s-1PDL\s0 distribution. If this file is separated from the \s-1PDL\s0 distribution, the copyright notice should be included in the file.