.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "gallery/extra/structure_shift.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_structure_shift.py: Effect of translation ===================== .. GENERATED FROM PYTHON SOURCE LINES 5-20 .. code-block:: Python from FiberFusing.profile import Profile, StructureType profile = Profile() profile.add_structure( structure_type=StructureType.LINEAR, number_of_fibers=3, fusion_degree=0.3, fiber_radius=62.5e-6 ) profile.plot(show_cores=True, show_centers=True) .. image-sg:: /gallery/extra/images/sphx_glr_structure_shift_001.png :alt: structure shift :srcset: /gallery/extra/images/sphx_glr_structure_shift_001.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out .. code-block:: none
.. GENERATED FROM PYTHON SOURCE LINES 21-25 .. code-block:: Python shift = (0, 0) profile = profile.translate(shift) profile.plot() .. image-sg:: /gallery/extra/images/sphx_glr_structure_shift_002.png :alt: structure shift :srcset: /gallery/extra/images/sphx_glr_structure_shift_002.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out .. code-block:: none
.. GENERATED FROM PYTHON SOURCE LINES 26-29 .. code-block:: Python shift = (20e-6, 0) profile = profile.translate(shift) profile.plot() .. image-sg:: /gallery/extra/images/sphx_glr_structure_shift_003.png :alt: structure shift :srcset: /gallery/extra/images/sphx_glr_structure_shift_003.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out .. code-block:: none
.. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 2.353 seconds) .. _sphx_glr_download_gallery_extra_structure_shift.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: structure_shift.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: structure_shift.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: structure_shift.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_