<?xml version='1.0' encoding='UTF-8' standalone='no'?>
<section xmlns="http://docbook.org/ns/docbook" version="5.0" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="_model__poly__spiral_8h">
<title>/Users/bernard/b20/bsoft/include/model_poly_spiral.h File Reference</title>
<indexterm><primary>/Users/bernard/b20/bsoft/include/model_poly_spiral.h</primary></indexterm>
<para>

<para>Functions to generate polyhedra using the spiral algorithm. </para>
 
</para>
<programlisting>#include &quot;rwmodel.h&quot;
</programlisting><simplesect>
    <title>Functions    </title>
        <itemizedlist>
            <listitem><para><link linkend="_struct_bmodel">Bmodel</link> * <link linkend="_model__poly__spiral_8h_1a94aa29f3818547ac22efeb38db444d37">model_poly_spiral</link> (<link linkend="_class_bstring">Bstring</link> &amp;seq, int valence, int requirements)</para>

<para>Generates a polyhedron using the spiral algorithm. </para>
</listitem>
            <listitem><para>int <link linkend="_model__poly__spiral_8h_1aadff1b321cd023456e809983b6551b24">model_polyhedron_check</link> (<link linkend="_struct_bmodel">Bmodel</link> *<link linkend="_tcltk__bmodel_8cpp_1a828359eaa8de833b547ac96934f43841">model</link>, int valence)</para>

<para>Checks a polyhedron for accuracy and completeness. </para>
</listitem>
            <listitem><para><link linkend="_struct_bmodel">Bmodel</link> * <link linkend="_model__poly__spiral_8h_1afdeba537907ce8e5ea7cc928a36de471">model_poly_gen_sequence</link> (<link linkend="_class_bstring">Bstring</link> &amp;seq, int valence, int enantiomorph, int requirements, int nm)</para>

<para>Generates a polyhedron using a given sequence. </para>
</listitem>
            <listitem><para><link linkend="_struct_bmodel">Bmodel</link> * <link linkend="_model__poly__spiral_8h_1aeeaaefb0b7ada6dd7e01c2870dab9de2">model_poly_gen_sequence</link> (<link linkend="_class_bstring">Bstring</link> &amp;seq, int valence, int enantiomorph, int requirements, int nm, double *table)</para>

<para>Generates a polyhedron using a given sequence. </para>
</listitem>
            <listitem><para><link linkend="_struct_bmodel">Bmodel</link> * <link linkend="_model__poly__spiral_8h_1a548f3b2e36ccb7364616744ab81c4102">model_poly_gen_permutations</link> (int vertices, int valence, int enantiomorph)</para>

<para>All polyhedra are generated for a given number of vertices. </para>
</listitem>
            <listitem><para><link linkend="_struct_bmodel">Bmodel</link> * <link linkend="_model__poly__spiral_8h_1a7589ef5933d56b2ba8968ad602abba4b">model_poly_gen_cone</link> (int tip, int body, int <link linkend="_string__util_8cpp_1ae1cd0165442272bf85dc2d9461080a30">base</link>, int valence, int enantiomorph, int requirements)</para>

<para>A cone tip with 5 pentagons and a base with 7 pentagons are use to generate polyhedra. </para>
</listitem>
            <listitem><para><link linkend="_struct_bmodel">Bmodel</link> * <link linkend="_model__poly__spiral_8h_1a8d89e4741005820fdfc93c054a681ac4">model_poly_gen_lozenge</link> (int ttop, int tbody, int valence, int enantiomorph, int requirements)</para>

<para>Two icosahedral tips are set up and polyhedra generated by rotating the 2 tips. </para>
</listitem>
            <listitem><para><link linkend="_struct_bmodel">Bmodel</link> * <link linkend="_model__poly__spiral_8h_1adcc2d57399dd17d61e43617e4ae3cb8e">model_poly_gen_coffin</link> (int ttop, int tbody, int tbase, int valence, int enantiomorph, int requirements)</para>

<para>An icosahedral tip and a 6-fold base is set up and polyhedra generated by rotating the tip and base. </para>
</listitem>
            <listitem><para><link linkend="_struct_bmodel">Bmodel</link> * <link linkend="_model__poly__spiral_8h_1a645b8d35eb949aa30e16e65e6058b633">model_poly_gen_coffin_loose</link> (int ttop, int tbody, int tbase, int valence, int enantiomorph, int requirements)</para>

<para>An icosahedral tip and a 6-fold base is set up and polyhedra generated by permuting the tip and base. </para>
</listitem>
            <listitem><para><link linkend="_struct_bmodel">Bmodel</link> * <link linkend="_model__poly__spiral_8h_1a6ab5cfc15f5a2082f2f422082e33a4f0">model_poly_gen_coffin_jiggle</link> (int ttop, int tbody, int tbase, int valence, int enantiomorph, int requirements)</para>

<para>An icosahedral tip and a 6-fold base is set up and polyhedra generated by moving pentagons around. </para>
</listitem>
            <listitem><para><link linkend="_struct_bmodel">Bmodel</link> * <link linkend="_model__poly__spiral_8h_1a3174c70b3be17eda9534bf23ed422ace">model_poly_gen_3part</link> (<link linkend="_class_bstring">Bstring</link> stip, <link linkend="_class_bstring">Bstring</link> sbody, <link linkend="_class_bstring">Bstring</link> sbase, int valence, int enantiomorph, int requirements)</para>

<para>Generates several polyhedra by permuting the first and last parts of a three-part sequence. </para>
</listitem>
            <listitem><para><link linkend="_struct_bmodel">Bmodel</link> * <link linkend="_model__poly__spiral_8h_1a3e83c3ea74392e28fba92c4f2a73decb">model_poly_gen_move_pentagons</link> (<link linkend="_class_bstring">Bstring</link> &amp;seq, int valence, int enantiomorph, int requirements)</para>

<para>Generates many polyhedrons using a given sequence and moving pentagons around. </para>
</listitem>
        </itemizedlist>
</simplesect>
<section>
<title>Detailed Description</title>

<para>Functions to generate polyhedra using the spiral algorithm. </para>

<para><formalpara><title>Author: </title>

<para>Bernard Heymann </para>
</formalpara>
<formalpara><title>Date: </title>

<para>Created: 20071127 </para>

<para>Modified: 20080414 </para>
</formalpara>
</para>
</section>
<section>
<title>Function Documentation</title>
<anchor xml:id="_model__poly__spiral_8h_1a3174c70b3be17eda9534bf23ed422ace"/>    <section>
    <title>model_poly_gen_3part()</title>
<indexterm><primary>model_poly_gen_3part</primary><secondary>model_poly_spiral.h</secondary></indexterm>
<indexterm><primary>model_poly_spiral.h</primary><secondary>model_poly_gen_3part</secondary></indexterm>
<para><computeroutput><link linkend="_struct_bmodel">Bmodel</link>* model_poly_gen_3part (<link linkend="_class_bstring">Bstring</link> stip, <link linkend="_class_bstring">Bstring</link> sbody, <link linkend="_class_bstring">Bstring</link> sbase, int valence, int enantiomorph, int requirements)</computeroutput></para><para>

<para>Generates several polyhedra by permuting the first and last parts of a three-part sequence. </para>
</para>

<para><literallayout><computeroutput>A recursive algorithm is used to generate several models by shifting the 
positions of pentagons in a sequence. 
</computeroutput></literallayout></para>

<para>
                <formalpara>
                    <title>
Parameters                    </title>
                    <para>
                    <table frame="all">
                        <tgroup cols="2" align="left" colsep="1" rowsep="1">
                        <colspec colwidth="1*"/>
                        <colspec colwidth="4*"/>
                        <tbody>
                            <row>
                                <entry>stip</entry>
                                <entry>
<para>tip sequence (permuted). </para>
</entry>
                            </row>
                            <row>
                                <entry>sbody</entry>
                                <entry>
<para>body sequence (all hexagons). </para>
</entry>
                            </row>
                            <row>
                                <entry>sbase</entry>
                                <entry>
<para>base/end sequence (permuted). </para>
</entry>
                            </row>
                            <row>
                                <entry>valence</entry>
                                <entry>
<para>vertex valence. </para>
</entry>
                            </row>
                            <row>
                                <entry>enantiomorph</entry>
                                <entry>
<para>flag to generate enantiomorphs. </para>
</entry>
                            </row>
                            <row>
                                <entry>requirements</entry>
                                <entry>
<para>polyhedron requirements. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>Bmodel* new model, NULL if generation failed. </para>
</formalpara>
</para>
<para>
Definition at line 814 of file model_poly_spiral.cpp.</para>
    </section><anchor xml:id="_model__poly__spiral_8h_1adcc2d57399dd17d61e43617e4ae3cb8e"/>    <section>
    <title>model_poly_gen_coffin()</title>
<indexterm><primary>model_poly_gen_coffin</primary><secondary>model_poly_spiral.h</secondary></indexterm>
<indexterm><primary>model_poly_spiral.h</primary><secondary>model_poly_gen_coffin</secondary></indexterm>
<para><computeroutput><link linkend="_struct_bmodel">Bmodel</link>* model_poly_gen_coffin (int ttop, int tbody, int tbase, int valence, int enantiomorph, int requirements)</computeroutput></para><para>

<para>An icosahedral tip and a 6-fold base is set up and polyhedra generated by rotating the tip and base. </para>
</para>

<para>
                <formalpara>
                    <title>
Parameters                    </title>
                    <para>
                    <table frame="all">
                        <tgroup cols="2" align="left" colsep="1" rowsep="1">
                        <colspec colwidth="1*"/>
                        <colspec colwidth="4*"/>
                        <tbody>
                            <row>
                                <entry>ttop</entry>
                                <entry>
<para>number of polygons between pentagons in the tip. </para>
</entry>
                            </row>
                            <row>
                                <entry>tbody</entry>
                                <entry>
<para>number of body rings. </para>
</entry>
                            </row>
                            <row>
                                <entry>tbase</entry>
                                <entry>
<para>number of polygons between pentagons in the base </para>
</entry>
                            </row>
                            <row>
                                <entry>valence</entry>
                                <entry>
<para>vertex valence. </para>
</entry>
                            </row>
                            <row>
                                <entry>enantiomorph</entry>
                                <entry>
<para>flag to generate enantiomorphs. </para>
</entry>
                            </row>
                            <row>
                                <entry>requirements</entry>
                                <entry>
<para>polyhedron requirements. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>Bmodel* new model, NULL if generation failed. </para>
</formalpara>
</para>
<para>
Definition at line 665 of file model_poly_spiral.cpp.</para>
    </section><anchor xml:id="_model__poly__spiral_8h_1a6ab5cfc15f5a2082f2f422082e33a4f0"/>    <section>
    <title>model_poly_gen_coffin_jiggle()</title>
<indexterm><primary>model_poly_gen_coffin_jiggle</primary><secondary>model_poly_spiral.h</secondary></indexterm>
<indexterm><primary>model_poly_spiral.h</primary><secondary>model_poly_gen_coffin_jiggle</secondary></indexterm>
<para><computeroutput><link linkend="_struct_bmodel">Bmodel</link>* model_poly_gen_coffin_jiggle (int ttop, int tbody, int tbase, int valence, int enantiomorph, int requirements)</computeroutput></para><para>

<para>An icosahedral tip and a 6-fold base is set up and polyhedra generated by moving pentagons around. </para>
</para>

<para>
                <formalpara>
                    <title>
Parameters                    </title>
                    <para>
                    <table frame="all">
                        <tgroup cols="2" align="left" colsep="1" rowsep="1">
                        <colspec colwidth="1*"/>
                        <colspec colwidth="4*"/>
                        <tbody>
                            <row>
                                <entry>ttop</entry>
                                <entry>
<para>number of polygons between pentagons in the tip. </para>
</entry>
                            </row>
                            <row>
                                <entry>tbody</entry>
                                <entry>
<para>number of body rings. </para>
</entry>
                            </row>
                            <row>
                                <entry>tbase</entry>
                                <entry>
<para>number of polygons between pentagons in the base </para>
</entry>
                            </row>
                            <row>
                                <entry>valence</entry>
                                <entry>
<para>vertex valence. </para>
</entry>
                            </row>
                            <row>
                                <entry>enantiomorph</entry>
                                <entry>
<para>flag to generate enantiomorphs. </para>
</entry>
                            </row>
                            <row>
                                <entry>requirements</entry>
                                <entry>
<para>polyhedron requirements. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>Bmodel* new model, NULL if generation failed. </para>
</formalpara>
</para>
<para>
Definition at line 770 of file model_poly_spiral.cpp.</para>
    </section><anchor xml:id="_model__poly__spiral_8h_1a645b8d35eb949aa30e16e65e6058b633"/>    <section>
    <title>model_poly_gen_coffin_loose()</title>
<indexterm><primary>model_poly_gen_coffin_loose</primary><secondary>model_poly_spiral.h</secondary></indexterm>
<indexterm><primary>model_poly_spiral.h</primary><secondary>model_poly_gen_coffin_loose</secondary></indexterm>
<para><computeroutput><link linkend="_struct_bmodel">Bmodel</link>* model_poly_gen_coffin_loose (int ttop, int tbody, int tbase, int valence, int enantiomorph, int requirements)</computeroutput></para><para>

<para>An icosahedral tip and a 6-fold base is set up and polyhedra generated by permuting the tip and base. </para>
</para>

<para>
                <formalpara>
                    <title>
Parameters                    </title>
                    <para>
                    <table frame="all">
                        <tgroup cols="2" align="left" colsep="1" rowsep="1">
                        <colspec colwidth="1*"/>
                        <colspec colwidth="4*"/>
                        <tbody>
                            <row>
                                <entry>ttop</entry>
                                <entry>
<para>number of polygons between pentagons in the tip. </para>
</entry>
                            </row>
                            <row>
                                <entry>tbody</entry>
                                <entry>
<para>number of body rings. </para>
</entry>
                            </row>
                            <row>
                                <entry>tbase</entry>
                                <entry>
<para>number of polygons between pentagons in the base </para>
</entry>
                            </row>
                            <row>
                                <entry>valence</entry>
                                <entry>
<para>vertex valence. </para>
</entry>
                            </row>
                            <row>
                                <entry>enantiomorph</entry>
                                <entry>
<para>flag to generate enantiomorphs. </para>
</entry>
                            </row>
                            <row>
                                <entry>requirements</entry>
                                <entry>
<para>polyhedron requirements. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>Bmodel* new model, NULL if generation failed. </para>
</formalpara>
</para>
<para>
Definition at line 732 of file model_poly_spiral.cpp.</para>
    </section><anchor xml:id="_model__poly__spiral_8h_1a7589ef5933d56b2ba8968ad602abba4b"/>    <section>
    <title>model_poly_gen_cone()</title>
<indexterm><primary>model_poly_gen_cone</primary><secondary>model_poly_spiral.h</secondary></indexterm>
<indexterm><primary>model_poly_spiral.h</primary><secondary>model_poly_gen_cone</secondary></indexterm>
<para><computeroutput><link linkend="_struct_bmodel">Bmodel</link>* model_poly_gen_cone (int tip, int body, int base, int valence, int enantiomorph, int requirements)</computeroutput></para><para>

<para>A cone tip with 5 pentagons and a base with 7 pentagons are use to generate polyhedra. </para>
</para>

<para>
                <formalpara>
                    <title>
Parameters                    </title>
                    <para>
                    <table frame="all">
                        <tgroup cols="2" align="left" colsep="1" rowsep="1">
                        <colspec colwidth="1*"/>
                        <colspec colwidth="4*"/>
                        <tbody>
                            <row>
                                <entry>tip</entry>
                                <entry>
<para>number of vertices in the tip. </para>
</entry>
                            </row>
                            <row>
                                <entry>body</entry>
                                <entry>
<para>number of vertices in the body. </para>
</entry>
                            </row>
                            <row>
                                <entry>base</entry>
                                <entry>
<para>number of vertices in the base. </para>
</entry>
                            </row>
                            <row>
                                <entry>valence</entry>
                                <entry>
<para>vertex valence. </para>
</entry>
                            </row>
                            <row>
                                <entry>enantiomorph</entry>
                                <entry>
<para>flag to generate enantiomorphs. </para>
</entry>
                            </row>
                            <row>
                                <entry>requirements</entry>
                                <entry>
<para>polyhedron requirements. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>Bmodel* new model, NULL if generation failed. </para>
</formalpara>
</para>
<para>
Definition at line 557 of file model_poly_spiral.cpp.</para>
    </section><anchor xml:id="_model__poly__spiral_8h_1a8d89e4741005820fdfc93c054a681ac4"/>    <section>
    <title>model_poly_gen_lozenge()</title>
<indexterm><primary>model_poly_gen_lozenge</primary><secondary>model_poly_spiral.h</secondary></indexterm>
<indexterm><primary>model_poly_spiral.h</primary><secondary>model_poly_gen_lozenge</secondary></indexterm>
<para><computeroutput><link linkend="_struct_bmodel">Bmodel</link>* model_poly_gen_lozenge (int ttop, int tbody, int valence, int enantiomorph, int requirements)</computeroutput></para><para>

<para>Two icosahedral tips are set up and polyhedra generated by rotating the 2 tips. </para>
</para>

<para>
                <formalpara>
                    <title>
Parameters                    </title>
                    <para>
                    <table frame="all">
                        <tgroup cols="2" align="left" colsep="1" rowsep="1">
                        <colspec colwidth="1*"/>
                        <colspec colwidth="4*"/>
                        <tbody>
                            <row>
                                <entry>ttop</entry>
                                <entry>
<para>number of polygons between pentagons in the tip. </para>
</entry>
                            </row>
                            <row>
                                <entry>tbody</entry>
                                <entry>
<para>number of body rings. </para>
</entry>
                            </row>
                            <row>
                                <entry>valence</entry>
                                <entry>
<para>vertex valence. </para>
</entry>
                            </row>
                            <row>
                                <entry>enantiomorph</entry>
                                <entry>
<para>flag to generate enantiomorphs. </para>
</entry>
                            </row>
                            <row>
                                <entry>requirements</entry>
                                <entry>
<para>polyhedron requirements. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>Bmodel* new model, NULL if generation failed. </para>
</formalpara>
</para>
<para>
Definition at line 598 of file model_poly_spiral.cpp.</para>
    </section><anchor xml:id="_model__poly__spiral_8h_1a3e83c3ea74392e28fba92c4f2a73decb"/>    <section>
    <title>model_poly_gen_move_pentagons()</title>
<indexterm><primary>model_poly_gen_move_pentagons</primary><secondary>model_poly_spiral.h</secondary></indexterm>
<indexterm><primary>model_poly_spiral.h</primary><secondary>model_poly_gen_move_pentagons</secondary></indexterm>
<para><computeroutput><link linkend="_struct_bmodel">Bmodel</link>* model_poly_gen_move_pentagons (<link linkend="_class_bstring">Bstring</link> &amp; seq, int valence, int enantiomorph, int requirements)</computeroutput></para><para>

<para>Generates many polyhedrons using a given sequence and moving pentagons around. </para>
</para>

<para><literallayout><computeroutput>A recursive algorithm is used to generate several models by shifting the 
positions of pentagons in a sequence. 
</computeroutput></literallayout></para>

<para>
                <formalpara>
                    <title>
Parameters                    </title>
                    <para>
                    <table frame="all">
                        <tgroup cols="2" align="left" colsep="1" rowsep="1">
                        <colspec colwidth="1*"/>
                        <colspec colwidth="4*"/>
                        <tbody>
                            <row>
                                <entry>&amp;seq</entry>
                                <entry>
<para>polygon sequence. </para>
</entry>
                            </row>
                            <row>
                                <entry>valence</entry>
                                <entry>
<para>vertex valence. </para>
</entry>
                            </row>
                            <row>
                                <entry>enantiomorph</entry>
                                <entry>
<para>flag to generate enantiomorphs. </para>
</entry>
                            </row>
                            <row>
                                <entry>requirements</entry>
                                <entry>
<para>polyhedron requirements. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>Bmodel* new model, NULL if generation failed. </para>
</formalpara>
</para>
<para>
Definition at line 915 of file model_poly_spiral.cpp.</para>
    </section><anchor xml:id="_model__poly__spiral_8h_1a548f3b2e36ccb7364616744ab81c4102"/>    <section>
    <title>model_poly_gen_permutations()</title>
<indexterm><primary>model_poly_gen_permutations</primary><secondary>model_poly_spiral.h</secondary></indexterm>
<indexterm><primary>model_poly_spiral.h</primary><secondary>model_poly_gen_permutations</secondary></indexterm>
<para><computeroutput><link linkend="_struct_bmodel">Bmodel</link>* model_poly_gen_permutations (int vertices, int valence, int enantiomorph)</computeroutput></para><para>

<para>All polyhedra are generated for a given number of vertices. </para>
</para>

<para>
                <formalpara>
                    <title>
Parameters                    </title>
                    <para>
                    <table frame="all">
                        <tgroup cols="2" align="left" colsep="1" rowsep="1">
                        <colspec colwidth="1*"/>
                        <colspec colwidth="4*"/>
                        <tbody>
                            <row>
                                <entry>vertices</entry>
                                <entry>
<para>number of vertices. </para>
</entry>
                            </row>
                            <row>
                                <entry>valence</entry>
                                <entry>
<para>vertex valence. </para>
</entry>
                            </row>
                            <row>
                                <entry>enantiomorph</entry>
                                <entry>
<para>flag to generate enantiomorphs. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>Bmodel* new model, NULL if generation failed. </para>
</formalpara>
</para>
<para>
Definition at line 494 of file model_poly_spiral.cpp.</para>
    </section><anchor xml:id="_model__poly__spiral_8h_1afdeba537907ce8e5ea7cc928a36de471"/>    <section>
    <title>model_poly_gen_sequence()<computeroutput>[1/2]</computeroutput></title>
<indexterm><primary>model_poly_gen_sequence</primary><secondary>model_poly_spiral.h</secondary></indexterm>
<indexterm><primary>model_poly_spiral.h</primary><secondary>model_poly_gen_sequence</secondary></indexterm>
<para><computeroutput><link linkend="_struct_bmodel">Bmodel</link>* model_poly_gen_sequence (<link linkend="_class_bstring">Bstring</link> &amp; seq, int valence, int enantiomorph, int requirements, int nm)</computeroutput></para><para>

<para>Generates a polyhedron using a given sequence. </para>
</para>

<para><literallayout><computeroutput>A single model is generated based on the sequence. 
</computeroutput></literallayout></para>

<para>
                <formalpara>
                    <title>
Parameters                    </title>
                    <para>
                    <table frame="all">
                        <tgroup cols="2" align="left" colsep="1" rowsep="1">
                        <colspec colwidth="1*"/>
                        <colspec colwidth="4*"/>
                        <tbody>
                            <row>
                                <entry>&amp;seq</entry>
                                <entry>
<para>polygon sequence. </para>
</entry>
                            </row>
                            <row>
                                <entry>valence</entry>
                                <entry>
<para>vertex valence. </para>
</entry>
                            </row>
                            <row>
                                <entry>enantiomorph</entry>
                                <entry>
<para>flag to generate enantiomorphs. </para>
</entry>
                            </row>
                            <row>
                                <entry>requirements</entry>
                                <entry>
<para>polyhedron requirements. </para>
</entry>
                            </row>
                            <row>
                                <entry>nm</entry>
                                <entry>
<para>current number of models (before creating this one). </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>Bmodel* new model, NULL if generation failed. </para>
</formalpara>
</para>
<para>
Definition at line 399 of file model_poly_spiral.cpp.</para>
    </section><anchor xml:id="_model__poly__spiral_8h_1aeeaaefb0b7ada6dd7e01c2870dab9de2"/>    <section>
    <title>model_poly_gen_sequence()<computeroutput>[2/2]</computeroutput></title>
<indexterm><primary>model_poly_gen_sequence</primary><secondary>model_poly_spiral.h</secondary></indexterm>
<indexterm><primary>model_poly_spiral.h</primary><secondary>model_poly_gen_sequence</secondary></indexterm>
<para><computeroutput><link linkend="_struct_bmodel">Bmodel</link>* model_poly_gen_sequence (<link linkend="_class_bstring">Bstring</link> &amp; seq, int valence, int enantiomorph, int requirements, int nm, double * table)</computeroutput></para><para>

<para>Generates a polyhedron using a given sequence. </para>
</para>

<para><literallayout><computeroutput>A single model is generated based on the sequence. 
A table is used to keep track of sets of eigenvalues of previous models
to avoid generating redundant models. 
</computeroutput></literallayout></para>

<para>
                <formalpara>
                    <title>
Parameters                    </title>
                    <para>
                    <table frame="all">
                        <tgroup cols="2" align="left" colsep="1" rowsep="1">
                        <colspec colwidth="1*"/>
                        <colspec colwidth="4*"/>
                        <tbody>
                            <row>
                                <entry>&amp;seq</entry>
                                <entry>
<para>polygon sequence. </para>
</entry>
                            </row>
                            <row>
                                <entry>valence</entry>
                                <entry>
<para>vertex valence. </para>
</entry>
                            </row>
                            <row>
                                <entry>enantiomorph</entry>
                                <entry>
<para>flag to generate enantiomorphs. </para>
</entry>
                            </row>
                            <row>
                                <entry>requirements</entry>
                                <entry>
<para>polyhedron requirements. </para>
</entry>
                            </row>
                            <row>
                                <entry>nm</entry>
                                <entry>
<para>current number of models (before creating this one). </para>
</entry>
                            </row>
                            <row>
                                <entry>*table</entry>
                                <entry>
<para>table for sets of eigenvalues. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>Bmodel* new model, NULL if generation failed. </para>
</formalpara>
</para>
<para>
Definition at line 419 of file model_poly_spiral.cpp.</para>
    </section><anchor xml:id="_model__poly__spiral_8h_1a94aa29f3818547ac22efeb38db444d37"/>    <section>
    <title>model_poly_spiral()</title>
<indexterm><primary>model_poly_spiral</primary><secondary>model_poly_spiral.h</secondary></indexterm>
<indexterm><primary>model_poly_spiral.h</primary><secondary>model_poly_spiral</secondary></indexterm>
<para><computeroutput><link linkend="_struct_bmodel">Bmodel</link>* model_poly_spiral (<link linkend="_class_bstring">Bstring</link> &amp; seq, int valence, int requirements)</computeroutput></para><para>

<para>Generates a polyhedron using the spiral algorithm. </para>
</para>

<para><literallayout><computeroutput>Polygons are added based on the given sequence.
The success of the algorithm is checked using the indicated requirements:
    0       only a polyhedron consistency check is done
    1       the exact number of vertices must be obtained
    2       only a polyhedron with isolated pentagons is accepted
The generation fails when an incorrect number of vertices are added
or some of the vertices have incorrect valency. 
</computeroutput></literallayout></para>

<para>
                <formalpara>
                    <title>
Parameters                    </title>
                    <para>
                    <table frame="all">
                        <tgroup cols="2" align="left" colsep="1" rowsep="1">
                        <colspec colwidth="1*"/>
                        <colspec colwidth="4*"/>
                        <tbody>
                            <row>
                                <entry>&amp;seq</entry>
                                <entry>
<para>polygon sequence. </para>
</entry>
                            </row>
                            <row>
                                <entry>valence</entry>
                                <entry>
<para>vertex valence. </para>
</entry>
                            </row>
                            <row>
                                <entry>requirements</entry>
                                <entry>
<para>polyhedron requirements. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>Bmodel* new model, NULL if generation failed. </para>
</formalpara>
</para>
<para>
Definition at line 274 of file model_poly_spiral.cpp.</para>
    </section><anchor xml:id="_model__poly__spiral_8h_1aadff1b321cd023456e809983b6551b24"/>    <section>
    <title>model_polyhedron_check()</title>
<indexterm><primary>model_polyhedron_check</primary><secondary>model_poly_spiral.h</secondary></indexterm>
<indexterm><primary>model_poly_spiral.h</primary><secondary>model_polyhedron_check</secondary></indexterm>
<para><computeroutput>int model_polyhedron_check (<link linkend="_struct_bmodel">Bmodel</link> * model, int valence)</computeroutput></para><para>

<para>Checks a polyhedron for accuracy and completeness. </para>
</para>

<para><literallayout><computeroutput>Every component must have the required number of links = valence.
Every component must have the required number of polygons = valence.
The polyhedron must adhere to Euler&apos;s formula:
    components + polygons - links = 2
</computeroutput></literallayout></para>

<para>
                <formalpara>
                    <title>
Parameters                    </title>
                    <para>
                    <table frame="all">
                        <tgroup cols="2" align="left" colsep="1" rowsep="1">
                        <colspec colwidth="1*"/>
                        <colspec colwidth="4*"/>
                        <tbody>
                            <row>
                                <entry>*model</entry>
                                <entry>
<para>model structure. </para>
</entry>
                            </row>
                            <row>
                                <entry>valence</entry>
                                <entry>
<para>vertex valence. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>int number of failed conditions. </para>
</formalpara>
</para>
<para>
Definition at line 336 of file model_poly_spiral.cpp.</para>
</section>
</section>
</section>
