<?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__create_8h">
<title>/Users/bernard/b20/bsoft/include/model_create.h File Reference</title>
<indexterm><primary>/Users/bernard/b20/bsoft/include/model_create.h</primary></indexterm>
<para>

<para>Library routines used for model creation. </para>
 
</para>
<programlisting>#include &quot;rwmodel.h&quot;
#include &quot;symmetry.h&quot;
</programlisting><simplesect>
    <title>Functions    </title>
        <itemizedlist>
            <listitem><para><link linkend="_struct_bcomponent">Bcomponent</link> * <link linkend="_model__create_8h_1a11957a0a16807d5cd224489ccf35bb62">model_add_component</link> (<link linkend="_struct_bmodel">Bmodel</link> *<link linkend="_tcltk__bmodel_8cpp_1a828359eaa8de833b547ac96934f43841">model</link>, <link linkend="_class_bstring">Bstring</link> &amp;id, <link linkend="_class_bstring">Bstring</link> &amp;type, <link linkend="_class_vector3">Vector3</link>&lt; double &gt; loc)</para>

<para>Adds a component to a model. </para>
</listitem>
            <listitem><para><link linkend="_struct_bmodel">Bmodel</link> * <link linkend="_model__create_8h_1a02e8c1e364420fbebab88a100d7061f4">model_platonic</link> (<link linkend="_struct_bsymmetry">Bsymmetry</link> *sym, double radius)</para>

<para>Generates a platonic polyhedron. </para>
</listitem>
            <listitem><para><link linkend="_struct_bmodel">Bmodel</link> * <link linkend="_model__create_8h_1a272e4d8be805e4ef64725808cf67e8cb">model_helix</link> (double radius, double helix_rise, double helix_angle, long ncomp)</para>

<para>Generates a helix model. </para>
</listitem>
            <listitem><para><link linkend="_struct_bmodel">Bmodel</link> * <link linkend="_model__create_8h_1a187af23bccb40ed59050df615d34d00d">model_random</link> (long ncomp, double comp_radius, double max_radius)</para>

<para>Generates components at random non-overlapping locations and with random views. </para>
</listitem>
            <listitem><para><link linkend="_struct_bmodel">Bmodel</link> * <link linkend="_model__create_8h_1a4ed187b7a83ef116631e0f29a85afc58">model_random</link> (long ncomp, double comp_radius, <link linkend="_class_vector3">Vector3</link>&lt; double &gt; min, <link linkend="_class_vector3">Vector3</link>&lt; double &gt; max)</para>

<para>Generates components at random non-overlapping locations and with random views. </para>
</listitem>
            <listitem><para><link linkend="_struct_bmodel">Bmodel</link> * <link linkend="_model__create_8h_1ad086b1bffa529f3129d0708253035ff8">model_random_gaussian</link> (long ncomp, double std)</para>

<para>Generates components at random gaussian-distributed locations and with random views. </para>
</listitem>
            <listitem><para><link linkend="_struct_bmodel">Bmodel</link> * <link linkend="_model__create_8h_1ac73578dbd2fc58eb0be1b794ea3c9421">model_random_shell</link> (long ncomp, double radius)</para>

<para>Generates random components on a shell. </para>
</listitem>
            <listitem><para><link linkend="_struct_bmodel">Bmodel</link> * <link linkend="_model__create_8h_1ab0832ec7bab8f891194ff584327f23cc">model_random_shell</link> (long ncomp, double radius, double separation)</para>

<para>Generates random components on a shell. </para>
</listitem>
            <listitem><para><link linkend="_struct_bmodel">Bmodel</link> * <link linkend="_model__create_8h_1a44de2086e8cbd9defd044dc4c33ada91">model_create_shell</link> (long number, double radius, double <link linkend="__vector3_8h_1aa60745aa4e45acde64f733424e37dbb9">distance</link>)</para>

<para>Creates a sphere point model. </para>
</listitem>
            <listitem><para><link linkend="_struct_bmodel">Bmodel</link> * <link linkend="_model__create_8h_1a5639d0b7f85ff2209c5af8f43e1f5c8f">model_create_fibonacci_sphere</link> (long number, double radius)</para>

<para>Creates a Fibonacci sphere point model. </para>
</listitem>
            <listitem><para><link linkend="_struct_bmodel">Bmodel</link> * <link linkend="_model__create_8h_1aee39e64eb5a8c1005afd2e04fd989c39">model_create_dodecahedron</link> (double radius, long divisions, double sphere_fraction)</para>

<para>Creates an dodecahedron point model. </para>
</listitem>
            <listitem><para><link linkend="_struct_bmodel">Bmodel</link> * <link linkend="_model__create_8h_1a115ab2ab30912f7675e491cb583a0dec">model_create_icosahedron</link> (double radius, long divisions, double sphere_fraction)</para>

<para>Creates an icosahedron point model. </para>
</listitem>
            <listitem><para><link linkend="_struct_bmodel">Bmodel</link> * <link linkend="_model__create_8h_1ab25bf70d4880be2a456ff9c1821f3e8c">model_create_circle</link> (double radius, double z, double <link linkend="__vector3_8h_1aa60745aa4e45acde64f733424e37dbb9">distance</link>)</para>

<para>Creates a circle with the given radius, height, and component separation. </para>
</listitem>
            <listitem><para><link linkend="_struct_bmodel">Bmodel</link> * <link linkend="_model__create_8h_1a3223a6e6ae1fa000b9bc39de3802b74b">model_create_ellipse</link> (<link linkend="_class_vector3">Vector3</link>&lt; double &gt; axes, double <link linkend="__vector3_8h_1aa60745aa4e45acde64f733424e37dbb9">distance</link>)</para>

<para>Creates an ellipse with given semiaxes and component separation. </para>
</listitem>
            <listitem><para><link linkend="_struct_bmodel">Bmodel</link> * <link linkend="_model__create_8h_1a10247ab8165281ebd477ad350fb0ec37">model_create_ellipsoid</link> (<link linkend="_class_vector3">Vector3</link>&lt; double &gt; axes, double <link linkend="__vector3_8h_1aa60745aa4e45acde64f733424e37dbb9">distance</link>)</para>

<para>Creates an ellipsoid with given semiaxes and component separation. </para>
</listitem>
            <listitem><para><link linkend="_struct_bmodel">Bmodel</link> * <link linkend="_model__create_8h_1a2609892e973b4f67720dd843c4cc519d">model_create_cylinder</link> (<link linkend="_class_vector3">Vector3</link>&lt; double &gt; direction, double radius, double <link linkend="__vector3_8h_1a7baf5ed670fcf9bcca9a3a400820e292">length</link>, double <link linkend="__vector3_8h_1aa60745aa4e45acde64f733424e37dbb9">distance</link>)</para>

<para>Creates a cylinder with the given radius, length, and component separation. </para>
</listitem>
            <listitem><para><link linkend="_struct_bmodel">Bmodel</link> * <link linkend="_model__create_8h_1a76fd82963142d0baf5093bbdcae2a42d">model_create_plane</link> (double <link linkend="__vector3_8h_1a7baf5ed670fcf9bcca9a3a400820e292">length</link>, double width, double z, double <link linkend="__vector3_8h_1aa60745aa4e45acde64f733424e37dbb9">distance</link>)</para>

<para>Creates a plane with the given length, width, height, and component separation. </para>
</listitem>
            <listitem><para><link linkend="_struct_bmodel">Bmodel</link> * <link linkend="_model__create_8h_1a2ef8118d25aacea48f68077fdad4a845">model_create_spindle</link> (<link linkend="_class_vector3">Vector3</link>&lt; double &gt; direction, double radius, double separation, double packing)</para>

<para>Creates a spindle packed inside a sphere. </para>
</listitem>
        </itemizedlist>
</simplesect>
<section>
<title>Detailed Description</title>

<para>Library routines used for model creation. </para>

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

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

<para>Created: 20090714 </para>

<para>Modified: 20180314 </para>
</formalpara>
</para>
</section>
<section>
<title>Function Documentation</title>
<anchor xml:id="_model__create_8h_1a11957a0a16807d5cd224489ccf35bb62"/>    <section>
    <title>model_add_component()</title>
<indexterm><primary>model_add_component</primary><secondary>model_create.h</secondary></indexterm>
<indexterm><primary>model_create.h</primary><secondary>model_add_component</secondary></indexterm>
<para><computeroutput><link linkend="_struct_bcomponent">Bcomponent</link>* model_add_component (<link linkend="_struct_bmodel">Bmodel</link> * model, <link linkend="_class_bstring">Bstring</link> &amp; id, <link linkend="_class_bstring">Bstring</link> &amp; type, <link linkend="_class_vector3">Vector3</link>&lt; double &gt; loc)</computeroutput></para><para>

<para>Adds a component to a model. </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>*model</entry>
                                <entry>
<para>model list. </para>
</entry>
                            </row>
                            <row>
                                <entry>&amp;id</entry>
                                <entry>
<para>model identifier. </para>
</entry>
                            </row>
                            <row>
                                <entry>&amp;type</entry>
                                <entry>
<para>component type. </para>
</entry>
                            </row>
                            <row>
                                <entry>loc</entry>
                                <entry>
<para>component location. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>Bcomponent* new component. <literallayout><computeroutput>The component is added to the model indicated by the ID, the type and
the location given.
</computeroutput></literallayout> </para>
</formalpara>
</para>
<para>
Definition at line 32 of file model_create.cpp.</para>
    </section><anchor xml:id="_model__create_8h_1ab25bf70d4880be2a456ff9c1821f3e8c"/>    <section>
    <title>model_create_circle()</title>
<indexterm><primary>model_create_circle</primary><secondary>model_create.h</secondary></indexterm>
<indexterm><primary>model_create.h</primary><secondary>model_create_circle</secondary></indexterm>
<para><computeroutput><link linkend="_struct_bmodel">Bmodel</link>* model_create_circle (double radius, double z, double distance)</computeroutput></para><para>

<para>Creates a circle with the given radius, height, and component separation. </para>
</para>

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

<para>Jonathan Luo </para>
</formalpara>

                <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>radius</entry>
                                <entry>
<para>radius length. </para>
</entry>
                            </row>
                            <row>
                                <entry>z</entry>
                                <entry>
<para>height. </para>
</entry>
                            </row>
                            <row>
                                <entry>distance</entry>
                                <entry>
<para>separation distance. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>Bmodel* new circle model. <literallayout><computeroutput>Find angle associated with separation distance using Law of Cosines.
</computeroutput></literallayout> </para>
</formalpara>
</para>
<para>
Definition at line 897 of file model_create.cpp.</para>
    </section><anchor xml:id="_model__create_8h_1a2609892e973b4f67720dd843c4cc519d"/>    <section>
    <title>model_create_cylinder()</title>
<indexterm><primary>model_create_cylinder</primary><secondary>model_create.h</secondary></indexterm>
<indexterm><primary>model_create.h</primary><secondary>model_create_cylinder</secondary></indexterm>
<para><computeroutput><link linkend="_struct_bmodel">Bmodel</link>* model_create_cylinder (<link linkend="_class_vector3">Vector3</link>&lt; double &gt; direction, double radius, double length, double distance)</computeroutput></para><para>

<para>Creates a cylinder with the given radius, length, and component separation. </para>
</para>

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

<para>Jonathan Luo </para>
</formalpara>

                <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>direction</entry>
                                <entry>
<para>cylinder axis direction </para>
</entry>
                            </row>
                            <row>
                                <entry>radius</entry>
                                <entry>
<para>radius length. </para>
</entry>
                            </row>
                            <row>
                                <entry>length</entry>
                                <entry>
<para>cylinder length. </para>
</entry>
                            </row>
                            <row>
                                <entry>distance</entry>
                                <entry>
<para>separation distance. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>Bmodel* new cylinder model. <literallayout><computeroutput>Find angle associated with separation distance using Law of Cosines.
</computeroutput></literallayout> </para>
</formalpara>
</para>
<para>
Definition at line 1101 of file model_create.cpp.</para>
    </section><anchor xml:id="_model__create_8h_1aee39e64eb5a8c1005afd2e04fd989c39"/>    <section>
    <title>model_create_dodecahedron()</title>
<indexterm><primary>model_create_dodecahedron</primary><secondary>model_create.h</secondary></indexterm>
<indexterm><primary>model_create.h</primary><secondary>model_create_dodecahedron</secondary></indexterm>
<para><computeroutput><link linkend="_struct_bmodel">Bmodel</link>* model_create_dodecahedron (double radius, long divisions, double sphere_fraction)</computeroutput></para><para>

<para>Creates an dodecahedron point model. </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>radius</entry>
                                <entry>
<para>sphere radius. </para>
</entry>
                            </row>
                            <row>
                                <entry>divisions</entry>
                                <entry>
<para>number of divisions from a base dodecahedron. </para>
</entry>
                            </row>
                            <row>
                                <entry>sphere_fraction</entry>
                                <entry>
<para>spherical fraction: 0=dodecahedral, 1=spherical. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>Bmodel* new sphere model. </para>
</formalpara>
</para>
<para>
Definition at line 675 of file model_create.cpp.</para>
    </section><anchor xml:id="_model__create_8h_1a3223a6e6ae1fa000b9bc39de3802b74b"/>    <section>
    <title>model_create_ellipse()</title>
<indexterm><primary>model_create_ellipse</primary><secondary>model_create.h</secondary></indexterm>
<indexterm><primary>model_create.h</primary><secondary>model_create_ellipse</secondary></indexterm>
<para><computeroutput><link linkend="_struct_bmodel">Bmodel</link>* model_create_ellipse (<link linkend="_class_vector3">Vector3</link>&lt; double &gt; axes, double distance)</computeroutput></para><para>

<para>Creates an ellipse with given semiaxes and component separation. </para>
</para>

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

<para>Jonathan Luo </para>
</formalpara>

                <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>axes</entry>
                                <entry>
<para>ellipse axis x and y lengths and z height </para>
</entry>
                            </row>
                            <row>
                                <entry>distance</entry>
                                <entry>
<para>separation distance </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>Bmodel* new ellipse model. </para>
</formalpara>
</para>
<para>
Definition at line 947 of file model_create.cpp.</para>
    </section><anchor xml:id="_model__create_8h_1a10247ab8165281ebd477ad350fb0ec37"/>    <section>
    <title>model_create_ellipsoid()</title>
<indexterm><primary>model_create_ellipsoid</primary><secondary>model_create.h</secondary></indexterm>
<indexterm><primary>model_create.h</primary><secondary>model_create_ellipsoid</secondary></indexterm>
<para><computeroutput><link linkend="_struct_bmodel">Bmodel</link>* model_create_ellipsoid (<link linkend="_class_vector3">Vector3</link>&lt; double &gt; axes, double distance)</computeroutput></para><para>

<para>Creates an ellipsoid with given semiaxes and component separation. </para>
</para>

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

<para>Jonathan Luo </para>
</formalpara>

                <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>axes</entry>
                                <entry>
<para>ellipsoid axis lengths </para>
</entry>
                            </row>
                            <row>
                                <entry>distance</entry>
                                <entry>
<para>separation distance </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>Bmodel* new ellipsoid model. </para>
</formalpara>
</para>
<para>
Definition at line 1011 of file model_create.cpp.</para>
    </section><anchor xml:id="_model__create_8h_1a5639d0b7f85ff2209c5af8f43e1f5c8f"/>    <section>
    <title>model_create_fibonacci_sphere()</title>
<indexterm><primary>model_create_fibonacci_sphere</primary><secondary>model_create.h</secondary></indexterm>
<indexterm><primary>model_create.h</primary><secondary>model_create_fibonacci_sphere</secondary></indexterm>
<para><computeroutput><link linkend="_struct_bmodel">Bmodel</link>* model_create_fibonacci_sphere (long number, double radius)</computeroutput></para><para>

<para>Creates a Fibonacci sphere point model. </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>number</entry>
                                <entry>
<para>number of points. </para>
</entry>
                            </row>
                            <row>
                                <entry>radius</entry>
                                <entry>
<para>sphere radius. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>Bmodel* new sphere model. <literallayout><computeroutput>.
</computeroutput></literallayout> </para>
</formalpara>
</para>
<para>
Definition at line 569 of file model_create.cpp.</para>
    </section><anchor xml:id="_model__create_8h_1a115ab2ab30912f7675e491cb583a0dec"/>    <section>
    <title>model_create_icosahedron()</title>
<indexterm><primary>model_create_icosahedron</primary><secondary>model_create.h</secondary></indexterm>
<indexterm><primary>model_create.h</primary><secondary>model_create_icosahedron</secondary></indexterm>
<para><computeroutput><link linkend="_struct_bmodel">Bmodel</link>* model_create_icosahedron (double radius, long divisions, double sphere_fraction)</computeroutput></para><para>

<para>Creates an icosahedron point model. </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>radius</entry>
                                <entry>
<para>sphere radius. </para>
</entry>
                            </row>
                            <row>
                                <entry>divisions</entry>
                                <entry>
<para>number of divisions from a base icosahedron. </para>
</entry>
                            </row>
                            <row>
                                <entry>sphere_fraction</entry>
                                <entry>
<para>spherical fraction: 0=dodecahedral, 1=spherical. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>Bmodel* new sphere model. </para>
</formalpara>
</para>
<para>
Definition at line 732 of file model_create.cpp.</para>
    </section><anchor xml:id="_model__create_8h_1a76fd82963142d0baf5093bbdcae2a42d"/>    <section>
    <title>model_create_plane()</title>
<indexterm><primary>model_create_plane</primary><secondary>model_create.h</secondary></indexterm>
<indexterm><primary>model_create.h</primary><secondary>model_create_plane</secondary></indexterm>
<para><computeroutput><link linkend="_struct_bmodel">Bmodel</link>* model_create_plane (double length, double width, double z, double distance)</computeroutput></para><para>

<para>Creates a plane with the given length, width, height, and component separation. </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>length</entry>
                                <entry>
<para>dimension in x. </para>
</entry>
                            </row>
                            <row>
                                <entry>width</entry>
                                <entry>
<para>dimension in y. </para>
</entry>
                            </row>
                            <row>
                                <entry>z</entry>
                                <entry>
<para>height. </para>
</entry>
                            </row>
                            <row>
                                <entry>distance</entry>
                                <entry>
<para>separation distance. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>Bmodel* new circle model. <literallayout><computeroutput>The components are placed in a hexagonal arrangement to simulate the
most commonly expected close packingx.
</computeroutput></literallayout> </para>
</formalpara>
</para>
<para>
Definition at line 1170 of file model_create.cpp.</para>
    </section><anchor xml:id="_model__create_8h_1a44de2086e8cbd9defd044dc4c33ada91"/>    <section>
    <title>model_create_shell()</title>
<indexterm><primary>model_create_shell</primary><secondary>model_create.h</secondary></indexterm>
<indexterm><primary>model_create.h</primary><secondary>model_create_shell</secondary></indexterm>
<para><computeroutput><link linkend="_struct_bmodel">Bmodel</link>* model_create_shell (long number, double radius, double distance)</computeroutput></para><para>

<para>Creates a sphere point model. </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>number</entry>
                                <entry>
<para>number of points. </para>
</entry>
                            </row>
                            <row>
                                <entry>radius</entry>
                                <entry>
<para>sphere radius. </para>
</entry>
                            </row>
                            <row>
                                <entry>distance</entry>
                                <entry>
<para>distance between points. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>Bmodel* new sphere model. <literallayout><computeroutput>Two of the three arguments need to be given (the other zero).
If all three arguments are given, only the radius and distance is used.
</computeroutput></literallayout> </para>
</formalpara>
</para>
<para>
Definition at line 472 of file model_create.cpp.</para>
    </section><anchor xml:id="_model__create_8h_1a2ef8118d25aacea48f68077fdad4a845"/>    <section>
    <title>model_create_spindle()</title>
<indexterm><primary>model_create_spindle</primary><secondary>model_create.h</secondary></indexterm>
<indexterm><primary>model_create.h</primary><secondary>model_create_spindle</secondary></indexterm>
<para><computeroutput><link linkend="_struct_bmodel">Bmodel</link>* model_create_spindle (<link linkend="_class_vector3">Vector3</link>&lt; double &gt; direction, double radius, double separation, double packing)</computeroutput></para><para>

<para>Creates a spindle packed inside a sphere. </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>direction</entry>
                                <entry>
<para>spindle axis direction </para>
</entry>
                            </row>
                            <row>
                                <entry>radius</entry>
                                <entry>
<para>sphere radius. </para>
</entry>
                            </row>
                            <row>
                                <entry>separation</entry>
                                <entry>
<para>separation distance between successive components. </para>
</entry>
                            </row>
                            <row>
                                <entry>packing</entry>
                                <entry>
<para>distance between spindle strands. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>Bmodel* new spindle model.</para>
</formalpara>
The spindle starts at the minimum Z-pole of the sphere, winding up along the spherical wall to the other pole, and back down inside the first shell. The process is repeated until the whole sphere is packed. </para>
<para>
Definition at line 1229 of file model_create.cpp.</para>
    </section><anchor xml:id="_model__create_8h_1a272e4d8be805e4ef64725808cf67e8cb"/>    <section>
    <title>model_helix()</title>
<indexterm><primary>model_helix</primary><secondary>model_create.h</secondary></indexterm>
<indexterm><primary>model_create.h</primary><secondary>model_helix</secondary></indexterm>
<para><computeroutput><link linkend="_struct_bmodel">Bmodel</link>* model_helix (double radius, double helix_rise, double helix_angle, long ncomp)</computeroutput></para><para>

<para>Generates a helix model. </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>radius</entry>
                                <entry>
<para>distance of each vertex from helical axis. </para>
</entry>
                            </row>
                            <row>
                                <entry>helix_rise</entry>
                                <entry>
<para>helical rise. </para>
</entry>
                            </row>
                            <row>
                                <entry>helix_angle</entry>
                                <entry>
<para>helical rotation angle. </para>
</entry>
                            </row>
                            <row>
                                <entry>ncomp</entry>
                                <entry>
<para>number of components. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>Bmodel* new model. </para>
</formalpara>
</para>
<para>
Definition at line 153 of file model_create.cpp.</para>
    </section><anchor xml:id="_model__create_8h_1a02e8c1e364420fbebab88a100d7061f4"/>    <section>
    <title>model_platonic()</title>
<indexterm><primary>model_platonic</primary><secondary>model_create.h</secondary></indexterm>
<indexterm><primary>model_create.h</primary><secondary>model_platonic</secondary></indexterm>
<para><computeroutput><link linkend="_struct_bmodel">Bmodel</link>* model_platonic (<link linkend="_struct_bsymmetry">Bsymmetry</link> * sym, double radius)</computeroutput></para><para>

<para>Generates a platonic polyhedron. </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>*sym</entry>
                                <entry>
<para>symmetry. </para>
</entry>
                            </row>
                            <row>
                                <entry>radius</entry>
                                <entry>
<para>distance of each vertex from origin. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>Bmodel* new model. <literallayout><computeroutput>Polyhedral components are generated on symmetry axes.
Symmetry designations supported:
    T-3     tetrahedron.
    O-2     truncated octahedron.
    O-3     cube.
    O-4     octahedron.
    I-2     truncated icosahedron.
    I-3     dodecahedron.
    I-5     icosahedron.
</computeroutput></literallayout> </para>
</formalpara>
</para>
<para>
Definition at line 82 of file model_create.cpp.</para>
    </section><anchor xml:id="_model__create_8h_1a187af23bccb40ed59050df615d34d00d"/>    <section>
    <title>model_random()<computeroutput>[1/2]</computeroutput></title>
<indexterm><primary>model_random</primary><secondary>model_create.h</secondary></indexterm>
<indexterm><primary>model_create.h</primary><secondary>model_random</secondary></indexterm>
<para><computeroutput><link linkend="_struct_bmodel">Bmodel</link>* model_random (long ncomp, double comp_radius, double max_radius)</computeroutput></para><para>

<para>Generates components at random non-overlapping locations and with random views. </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>ncomp</entry>
                                <entry>
<para>number of components. </para>
</entry>
                            </row>
                            <row>
                                <entry>comp_radius</entry>
                                <entry>
<para>component radius. </para>
</entry>
                            </row>
                            <row>
                                <entry>max_radius</entry>
                                <entry>
<para>maximum radius of components. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>Bmodel* new model. <literallayout><computeroutput>If a new component overlaps within an existing component, as defined
by the component radius, new random coordinates are generated for it.
</computeroutput></literallayout> </para>
</formalpara>
</para>
<para>
Definition at line 201 of file model_create.cpp.</para>
    </section><anchor xml:id="_model__create_8h_1a4ed187b7a83ef116631e0f29a85afc58"/>    <section>
    <title>model_random()<computeroutput>[2/2]</computeroutput></title>
<indexterm><primary>model_random</primary><secondary>model_create.h</secondary></indexterm>
<indexterm><primary>model_create.h</primary><secondary>model_random</secondary></indexterm>
<para><computeroutput><link linkend="_struct_bmodel">Bmodel</link>* model_random (long ncomp, double comp_radius, <link linkend="_class_vector3">Vector3</link>&lt; double &gt; min, <link linkend="_class_vector3">Vector3</link>&lt; double &gt; max)</computeroutput></para><para>

<para>Generates components at random non-overlapping locations and with random views. </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>ncomp</entry>
                                <entry>
<para>number of components. </para>
</entry>
                            </row>
                            <row>
                                <entry>comp_radius</entry>
                                <entry>
<para>component radius. </para>
</entry>
                            </row>
                            <row>
                                <entry>min</entry>
                                <entry>
<para>minimum bounds. </para>
</entry>
                            </row>
                            <row>
                                <entry>max</entry>
                                <entry>
<para>maximum bounds. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>Bmodel* new model. <literallayout><computeroutput>If a new component overlaps within an existing component, as defined
by the component radius, new random coordinates are generated for it.
</computeroutput></literallayout> </para>
</formalpara>
</para>
<para>
Definition at line 260 of file model_create.cpp.</para>
    </section><anchor xml:id="_model__create_8h_1ad086b1bffa529f3129d0708253035ff8"/>    <section>
    <title>model_random_gaussian()</title>
<indexterm><primary>model_random_gaussian</primary><secondary>model_create.h</secondary></indexterm>
<indexterm><primary>model_create.h</primary><secondary>model_random_gaussian</secondary></indexterm>
<para><computeroutput><link linkend="_struct_bmodel">Bmodel</link>* model_random_gaussian (long ncomp, double std)</computeroutput></para><para>

<para>Generates components at random gaussian-distributed locations and with random views. </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>ncomp</entry>
                                <entry>
<para>number of components. </para>
</entry>
                            </row>
                            <row>
                                <entry>std</entry>
                                <entry>
<para>standard deviation of gaussian distribution. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>Bmodel* new model. <literallayout><computeroutput>Overlapping components are generated.
</computeroutput></literallayout> </para>
</formalpara>
</para>
<para>
Definition at line 318 of file model_create.cpp.</para>
    </section><anchor xml:id="_model__create_8h_1ac73578dbd2fc58eb0be1b794ea3c9421"/>    <section>
    <title>model_random_shell()<computeroutput>[1/2]</computeroutput></title>
<indexterm><primary>model_random_shell</primary><secondary>model_create.h</secondary></indexterm>
<indexterm><primary>model_create.h</primary><secondary>model_random_shell</secondary></indexterm>
<para><computeroutput><link linkend="_struct_bmodel">Bmodel</link>* model_random_shell (long ncomp, double radius)</computeroutput></para><para>

<para>Generates random components on a shell. </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>ncomp</entry>
                                <entry>
<para>number of components. </para>
</entry>
                            </row>
                            <row>
                                <entry>radius</entry>
                                <entry>
<para>shell radius. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>Bmodel* new model. <literallayout><computeroutput>Overlapping components are generated.
</computeroutput></literallayout> </para>
</formalpara>
</para>
<para>
Definition at line 361 of file model_create.cpp.</para>
    </section><anchor xml:id="_model__create_8h_1ab0832ec7bab8f891194ff584327f23cc"/>    <section>
    <title>model_random_shell()<computeroutput>[2/2]</computeroutput></title>
<indexterm><primary>model_random_shell</primary><secondary>model_create.h</secondary></indexterm>
<indexterm><primary>model_create.h</primary><secondary>model_random_shell</secondary></indexterm>
<para><computeroutput><link linkend="_struct_bmodel">Bmodel</link>* model_random_shell (long ncomp, double radius, double separation)</computeroutput></para><para>

<para>Generates random components on a shell. </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>ncomp</entry>
                                <entry>
<para>number of components. </para>
</entry>
                            </row>
                            <row>
                                <entry>radius</entry>
                                <entry>
<para>shell radius. </para>
</entry>
                            </row>
                            <row>
                                <entry>separation</entry>
                                <entry>
<para>minimum vertex separation distance. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>Bmodel* new model. <literallayout><computeroutput>The vertices are created with a desired separation, which means that
if too many vertices are requested with too large separation, the 
function may never return. The following must therefore be true:
    n*(d/r)^2 &lt; 8
where
    n: number of vertices
    d: minimum separation distance
    r: polyhedron radius
If this not true, the number of vertices is decreased.
</computeroutput></literallayout> </para>
</formalpara>
</para>
<para>
Definition at line 415 of file model_create.cpp.</para>
</section>
</section>
</section>
