.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "gallery/extra/randomize_core.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code. .. rst-class:: sphx-glr-example-title .. _sphx_glr_gallery_extra_randomize_core.py: Effect of core randomization ============================ .. GENERATED FROM PYTHON SOURCE LINES 5-18 .. code-block:: Python from FiberFusing.profile import Profile, StructureType profile = Profile() profile.add_structure( structure_type=StructureType.LINEAR, number_of_fibers=2, fusion_degree=0.3, fiber_radius=62.5e-6 ) .. rst-class:: sphx-glr-script-out .. code-block:: none INFO:root:Created connection between fibers at Point(position=(-5.1516504294495424e-05, 4.558190329562452e-21), instance=None, index=None) and Point(position=(5.151650429449557e-05, -7.67017328574664e-21), instance=None, index=None) INFO:root:Computing the optimal structure geometry INFO:root:Configured connection: shift=0.039, topology=concave INFO:root:Configured connection: shift=0.064, topology=concave INFO:root:Configured connection: shift=0.024, topology=concave INFO:root:Configured connection: shift=0.015, topology=concave INFO:root:Configured connection: shift=0.009, topology=concave INFO:root:Configured connection: shift=0.006, topology=concave INFO:root:Configured connection: shift=0.004, topology=concave INFO:root:Configured connection: shift=0.002, topology=concave INFO:root:Configured connection: shift=0.001, topology=concave INFO:root:Configured connection: shift=0.001, topology=concave INFO:root:Configured connection: shift=0.001, topology=concave INFO:root:Configured connection: shift=0.000, topology=concave INFO:root:Configured connection: shift=0.000, topology=concave INFO:root:Configured connection: shift=0.000, topology=concave INFO:root:Configured connection: shift=0.000, topology=concave INFO:root:Configured connection: shift=0.000, topology=concave INFO:root:Configured connection: shift=0.000, topology=concave INFO:root:Configured connection: shift=0.000, topology=concave INFO:root:Configured connection: shift=0.000, topology=concave INFO:root:Configured connection: shift=0.000, topology=concave INFO:root:Configured connection: shift=0.000, topology=concave INFO:root:Configured connection: shift=0.000, topology=concave INFO:root:Configured connection: shift=0.000, topology=concave INFO:root:Configured connection: shift=0.000, topology=concave INFO:root:Configured connection: shift=0.000, topology=concave INFO:root:Configured connection: shift=0.000, topology=concave INFO:root:Configured connection: shift=0.000, topology=concave INFO:root:Configured connection: shift=0.000, topology=concave INFO:root:Configured connection: shift=0.000, topology=concave INFO:root:Configured connection: shift=0.000, topology=concave INFO:root:Configured connection: shift=0.000, topology=concave INFO:root:Configured connection: shift=0.000, topology=concave INFO:root:Configured connection: shift=0.000, topology=concave INFO:root:Configured connection: shift=0.000, topology=concave INFO:root:Configured connection: shift=0.000, topology=concave INFO:root:Configured connection: shift=0.000, topology=concave INFO:root:Configured connection: shift=0.000, topology=concave INFO:root:Configured connection: shift=0.000, topology=concave INFO:root:Configured connection: shift=0.000, topology=concave INFO:root:Computing the optimal core positions INFO:root:Starting core position optimization... INFO:root:Optimization successful: cost=9.11e-17 .. GENERATED FROM PYTHON SOURCE LINES 19-23 .. code-block:: Python factor = 0 profile.randomize_core_positions(random_factor=factor) profile.plot(show_centers=True, show_cores=True) .. image-sg:: /gallery/extra/images/sphx_glr_randomize_core_001.png :alt: randomize core :srcset: /gallery/extra/images/sphx_glr_randomize_core_001.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out .. code-block:: none
.. GENERATED FROM PYTHON SOURCE LINES 24-28 .. code-block:: Python factor = 10e-6 profile.randomize_core_positions(random_factor=factor) profile.plot(show_centers=True, show_cores=True) .. image-sg:: /gallery/extra/images/sphx_glr_randomize_core_002.png :alt: randomize core :srcset: /gallery/extra/images/sphx_glr_randomize_core_002.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out .. code-block:: none INFO:root:Randomizing core positions.
.. GENERATED FROM PYTHON SOURCE LINES 29-32 .. code-block:: Python factor = 10e-6 profile.randomize_core_positions(random_factor=factor) profile.plot(show_centers=True, show_cores=True) .. image-sg:: /gallery/extra/images/sphx_glr_randomize_core_003.png :alt: randomize core :srcset: /gallery/extra/images/sphx_glr_randomize_core_003.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out .. code-block:: none INFO:root:Randomizing core positions.
.. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 1.668 seconds) .. _sphx_glr_download_gallery_extra_randomize_core.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: randomize_core.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: randomize_core.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: randomize_core.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_