http://www.perlmonks.org?node_id=255555

halley has asked for the wisdom of the Perl Monks concerning the following question:

I searched CPAN and found no such module. I then wrote a module which defines the vertices, edges and faces for a variety of commonly useful polyhedra, such as cubes and rhombic dodecahedra.

The basic data for my module came from someone else's site, http://www.rwgrayprojects.com/Lynn/Coordinates/coord01.html, and I've gotten his permission to publish a Perl module based on it. My home node image was made with Perl + SDL::OpenGL + Math::Polyhedra at work.

I'm proposing the Math::Polyhedra name, unless someone gives me a good reason otherwise. The code is almost done; I just need to finish up the faces() function and touch up the POD.

Future expansions would be to support a few other figures, but all of the ones currently supported are defined by phi, the Golden Ratio.

--
[ e d @ h a l l e y . c c ]

Replies are listed 'Best First'.
Re: proposed module: Math::Polyhedra
by claes (Acolyte) on May 05, 2003 at 14:22 UTC
    If what the module provides is geometry information, I think Math::Geometry::Models::Polyhedra would be a better name, since this opens up the possibility to provide additional models and a common API via a possible Math::Geometry::Models class (ofcourse, this could be achived anyways but it simply looks nicer)

    /Claes

Re: proposed module: Math::Polyhedra
by hardburn (Abbot) on May 05, 2003 at 14:00 UTC

    Perl Monks isn't really the place for suggesting name space issues. There's a pseudo-mailing list for that.

    But in any case, the more unique modules on CPAN, the better. This isn't really a problem space I deal with a lot, but its generally a good thing to have new modules.

    ----
    I wanted to explore how Perl's closures can be manipulated, and ended up creating an object system by accident.
    -- Schemer

    Note: All code is untested, unless otherwise stated

      Is this a general consensus? If yes, I find it a pity. I don't mind having that kind of posts here. Often, the authors will supply code examples or discuss fringe issues, thus eliciting useful comments from the community. I find it a good idea for prospective CPAN authors to seek wisdom here. Of course, that is a supplement, not a subsitute for writing to modules at perl.org.

        I sent the same message to modules@perl.org as per the usual PAUSE procedure. Since the CPAN search was turning up nothing for what I thought would be a well-traveled space, I wanted to mention it here at the same time for a wider range of discussion. The modules email list isn't a discussion community, it's a write-only system.

        As an aside, search.cpan.org seems to find the Image::Info pod page for the search terms 'polyhedra' or 'polyhedron', though neither word appears there. It doesn't even give a search-results page with a link, it just dives into that unrelated pod. Who can say why?

        I'd hate to find out that CPAN's search merely skipped finding an existing Math::Geometry::Phi::Defined::3D::Shapes or something. Keep CPAN beautiful.

        --
        [ e d @ h a l l e y . c c ]

        Oh, of course. I only wanted to point out that using the modules non-list is the main point for dicussing name space stuff. I highly encourage module authors to discuss their modules.

        ----
        I wanted to explore how Perl's closures can be manipulated, and ended up creating an object system by accident.
        -- Schemer

        Note: All code is untested, unless otherwise stated

Re: proposed module: Math::Polyhedra
by tall_man (Parson) on May 05, 2003 at 14:21 UTC
    Some interesting mathematic work with polyhedra can be done by treating them as planar graphs. A module extension that worked with Graph would be good.