Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pulga Physics docs #4973

Merged
merged 2 commits into from
Aug 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 24 additions & 9 deletions docs/nodes/pulga_physics/pulga_align_force.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
Pulga Align Force
=================

.. image:: https://github.com/nortikin/sverchok/assets/14288520/a14c8ff6-0b9e-4887-8b23-bbbf78453732
:target: https://github.com/nortikin/sverchok/assets/14288520/a14c8ff6-0b9e-4887-8b23-bbbf78453732

Functionality
-------------

Expand All @@ -17,22 +20,34 @@ The force magnitude will be: 1/(Distance to the power of Decay) * 1/(number of
Input
-----

**Strength**: Multiplier of the force, if multiple values are given the will be use as strength per particle.

**Decay**: How the force decays with distance.

**Max Distance**: Distance under the force will be applied.
- **Strength**: Multiplier of the force, if multiple values are given the will be use as strength per particle.
- **Decay**: How the force decays with distance.
- **Max Distance**: Distance under the force will be applied.

Options
-------

**Mode**: Algorithm used to calculate attractions. Offers 'Brute Force' and 'Kd-tree'
**Mode**: Algorithm used to calculate attractions. Offers '**Brute Force**' and '**Kd-tree**'

- Kd-tree: this is the fastest mode but in order to work it needs 'Scipy' and 'Cython' dependencies to be installed. In this mode the attraction continues even if the vertices are colliding
- **Kd-tree**: this is the fastest mode but in order to work it needs 'Scipy' and 'Cython' dependencies to be installed. In this mode the attraction continues even if the vertices are colliding

- Brute-Force: This mode is much slower but does not need any dependencies to work.
.. image:: https://github.com/nortikin/sverchok/assets/14288520/b87f2ad1-e8e3-4937-adab-6baa99c3bbc6
:target: https://github.com/nortikin/sverchok/assets/14288520/b87f2ad1-e8e3-4937-adab-6baa99c3bbc6

- **Brute-Force**: This mode is much slower but does not need any dependencies to work.

Examples
--------

.. image:: https://raw.githubusercontent.com/vicdoval/sverchok/docs_images/images_for_docs/pulga_physics/pulga_align_force/blender_sverchok_pulga_align_force_example_01.png
.. image:: https://github.com/nortikin/sverchok/assets/14288520/4308e392-2386-4146-a409-391ea2f780ee
:target: https://github.com/nortikin/sverchok/assets/14288520/4308e392-2386-4146-a409-391ea2f780ee

* Generator-> :doc:`Plane </nodes/generator/plane_mk3>`
* Number-> :doc:`Number Range </nodes/number/number_range>`
* List->List Main-> :doc:`List Join </nodes/list_main/join>`
* Viz-> :doc:`Viewer Draw </nodes/viz/viewer_draw_mk4>`
* Pulga Physics-> :doc:`Pulga Physics Solver </nodes/pulga_physics/pulga_physics_solver>`
* Pulga Physics-> :doc:`Pulga Random Force </nodes/pulga_physics/pulga_random_force>`

.. image:: https://github.com/nortikin/sverchok/assets/14288520/b761e016-aa50-405d-806a-1f3fdc9d158f
:target: https://github.com/nortikin/sverchok/assets/14288520/b761e016-aa50-405d-806a-1f3fdc9d158f
23 changes: 15 additions & 8 deletions docs/nodes/pulga_physics/pulga_angle_force.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
Pulga Angle Force
=================

.. image:: https://github.com/nortikin/sverchok/assets/14288520/1113aff9-3b2a-430d-8a13-0fc10e4e9516
:target: https://github.com/nortikin/sverchok/assets/14288520/1113aff9-3b2a-430d-8a13-0fc10e4e9516

Functionality
-------------

Expand All @@ -12,20 +15,24 @@ The node will apply a force to preserve the defined angles between edges or poly
Input
-----

**Edges**.

**Stiffness**: Strength of the angle force.

**Rest Angle**: Angle when the force will be 0. If 0 is the input value the rest angle will be calculated from the start position
- **Edges**.
- **Stiffness**: Strength of the angle force.
- **Rest Angle**: Angle when the force will be 0. If 0 is the input value the rest angle will be calculated from the start position

Options
-------

**Mode**: Chose between edges and polygons, note that with Polygon Mode only two faces per edge will be used.



Examples
--------

.. image:: https://raw.githubusercontent.com/vicdoval/sverchok/docs_images/images_for_docs/pulga_physics/pulga_angle_force/blender_sverchok_pulga_angle_force_example_01.png
.. image:: https://github.com/nortikin/sverchok/assets/14288520/532f2f65-b338-43d6-b5b5-9a9caf6fa687
:target: https://github.com/nortikin/sverchok/assets/14288520/532f2f65-b338-43d6-b5b5-9a9caf6fa687

* Generator-> :doc:`NGon </nodes/generator/ngon>`
* Generator-> :doc:`Line </nodes/generator/line_mk4>`
* List->List Main-> :doc:`List Join </nodes/list_main/join>`
* Viz-> :doc:`Viewer Draw </nodes/viz/viewer_draw_mk4>`
* Pulga Physics-> :doc:`Pulga Physics Solver </nodes/pulga_physics/pulga_physics_solver>`
* Pulga Physics-> :doc:`Pulga Random Force </nodes/pulga_physics/pulga_random_force>`
37 changes: 28 additions & 9 deletions docs/nodes/pulga_physics/pulga_attraction_force.rst
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
Pulga Attraction Force
======================

.. image:: https://github.com/nortikin/sverchok/assets/14288520/021f3670-9c2c-4380-8f18-8da7847c541b
:target: https://github.com/nortikin/sverchok/assets/14288520/021f3670-9c2c-4380-8f18-8da7847c541b

Functionality
-------------

.. image:: https://github.com/nortikin/sverchok/assets/14288520/625ed986-40aa-4f10-95b3-545c06bfc890
:target: https://github.com/nortikin/sverchok/assets/14288520/625ed986-40aa-4f10-95b3-545c06bfc890

* Pulga Physics-> :doc:`Pulga Physics Solver </nodes/pulga_physics/pulga_physics_solver>`
* Generator-> :doc:`Plane </nodes/generator/plane_mk3>`

This node creates a force to be applied with the Pulga Physics Solver node.

The force will be applied when de particles (vertices) are farer than the sum of particle radius.
Expand All @@ -12,27 +21,37 @@ The force direction will be the difference of the vertices location

The force magnitude will be: 1/(Distance to the power of Decay) * Masses product * Force Strength


Input
-----

**Strength**: Multiplier of the force, if multiple values are given the will be use as strength per particle.

**Decay**: How the force decays with distance (regular gravity will have a decay value of 2)

**Max Distance**: Distance under the force will be applied.
- **Strength**: Multiplier of the force, if multiple values are given the will be use as strength per particle.
- **Decay**: How the force decays with distance (regular gravity will have a decay value of 2)
- **Max Distance**: Distance under the force will be applied.

Options
-------

**Mode**: Algorithm used to calculate attractions. Offers 'Brute Force' and 'Kd-tree'
**Mode**: Algorithm used to calculate attractions. Offers '**Brute Force**' and '**Kd-tree**'

- Kd-tree: this is the fastest mode but in order to work it needs 'Scipy' and 'Cython' dependencies to be installed. In this mode the attraction continues even if the vertices are colliding
- **Kd-tree**: this is the fastest mode but in order to work it needs '**Scipy**' and '**Cython**' dependencies to be installed. In this mode the attraction continues even if the vertices are colliding

- Brute-Force: This mode is much slower but does not need any dependencies to work.
.. image:: https://github.com/nortikin/sverchok/assets/14288520/b87f2ad1-e8e3-4937-adab-6baa99c3bbc6
:target: https://github.com/nortikin/sverchok/assets/14288520/b87f2ad1-e8e3-4937-adab-6baa99c3bbc6

- **Brute-Force**: This mode is much slower but does not need any dependencies to work.

**Stop on Collision**: When enabled the attraction force will be disabled when particles are colliding, preventing overlapping.

Example
--------

.. image:: https://raw.githubusercontent.com/vicdoval/sverchok/docs_images/images_for_docs/pulga_physics/pulga_attraction_force/blender_sverchok_pulga_attraction_force_example_01.png
.. image:: https://github.com/nortikin/sverchok/assets/14288520/22362156-9033-437d-aed0-b67457ba1cff
:target: https://github.com/nortikin/sverchok/assets/14288520/22362156-9033-437d-aed0-b67457ba1cff

* Generator-> :doc:`Plane </nodes/generator/plane_mk3>`
* Generator-> :doc:`IcoSphere </nodes/generator/icosphere>`
* List->List Main-> :doc:`List Join </nodes/list_main/join>`
* Viz-> :doc:`Viewer Draw </nodes/viz/viewer_draw_mk4>`
* Pulga Physics-> :doc:`Pulga Physics Solver </nodes/pulga_physics/pulga_physics_solver>`
* Pulga Physics-> :doc:`Pulga Drag Force </nodes/pulga_physics/pulga_drag_force>`
89 changes: 73 additions & 16 deletions docs/nodes/pulga_physics/pulga_attractors_force_mk2.rst
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
Pulga Attractors Force
======================

.. image:: https://github.com/nortikin/sverchok/assets/14288520/969228cd-c56d-4d47-8d13-a37b31319285
:target: https://github.com/nortikin/sverchok/assets/14288520/969228cd-c56d-4d47-8d13-a37b31319285

Functionality
-------------

.. image:: https://github.com/nortikin/sverchok/assets/14288520/4980768f-580e-4220-8575-73c8f5c8611d
:target: https://github.com/nortikin/sverchok/assets/14288520/4980768f-580e-4220-8575-73c8f5c8611d

This node creates a force to be applied with the Pulga Physics Solver node.

Mode
Expand All @@ -16,57 +22,108 @@ Point

Points that will Attract/Repel the system particles (vertices)

.. image:: https://github.com/nortikin/sverchok/assets/14288520/06975305-e41f-4fa1-a13c-e5dfc4bb0928
:target: https://github.com/nortikin/sverchok/assets/14288520/06975305-e41f-4fa1-a13c-e5dfc4bb0928

Point Inputs
------------

**Location**: Position of the attractor points.
- **Location**: Position of the attractor points.
- **Max. Distance**: Distance under the force will be applied.

.. image:: https://github.com/nortikin/sverchok/assets/14288520/c214a6d0-b002-482b-ace2-da3c4231cae4
:target: https://github.com/nortikin/sverchok/assets/14288520/c214a6d0-b002-482b-ace2-da3c4231cae4

**Max. Distance**: Distance under the force will be applied.
- **Decay**: How the force will decay with distance. 0= no decay, 1= linear, 2= cubic, 4= quadratic...

**Decay**: How the force will decay with distance. 0= no decay, 1= linear, 2= cubic, 4= quadratic...
.. image:: https://github.com/nortikin/sverchok/assets/14288520/c032761e-a24a-4469-99c6-13681a480436
:target: https://github.com/nortikin/sverchok/assets/14288520/c032761e-a24a-4469-99c6-13681a480436

Line
-----

Lines that will Attract/Repel the system particles (vertices)

.. image:: https://github.com/nortikin/sverchok/assets/14288520/b6e13955-eb1c-4589-a3b2-2db0737b5f97
:target: https://github.com/nortikin/sverchok/assets/14288520/b6e13955-eb1c-4589-a3b2-2db0737b5f97

Line Inputs
-----------

**Location**: A point on the Line.

**Direction**: Direction of the Line.
- **Location**: A point on the Line.
- **Direction**: Direction of the Line.
- **Max. Distance**: Distance under the force will be applied.
- **Decay**: How the force will decay with distance. 0= no decay, 1= linear, 2= cubic, 4= quadratic...

**Max. Distance**: Distance under the force will be applied.
.. image:: https://github.com/nortikin/sverchok/assets/14288520/baebc767-fbdf-4260-b67c-17385f4ddda5
:target: https://github.com/nortikin/sverchok/assets/14288520/baebc767-fbdf-4260-b67c-17385f4ddda5

**Decay**: How the force will decay with distance. 0= no decay, 1= linear, 2= cubic, 4= quadratic...
.. image:: https://github.com/nortikin/sverchok/assets/14288520/8c607df0-407c-4480-b7fb-3574eaa35276
:target: https://github.com/nortikin/sverchok/assets/14288520/8c607df0-407c-4480-b7fb-3574eaa35276

Plane
-----

Plane that will Attract/Repel the system particles (vertices)

.. image:: https://github.com/nortikin/sverchok/assets/14288520/907216e2-d9c9-41d5-890c-1f43743dc4dc
:target: https://github.com/nortikin/sverchok/assets/14288520/907216e2-d9c9-41d5-890c-1f43743dc4dc

Plane Inputs
------------

**Location**: A point on the Line.
- **Location**: A point on the Line.
- **Normal**: Normal of the Plane.
- **Max. Distance**: Distance under the force will be applied.

.. image:: https://github.com/nortikin/sverchok/assets/14288520/ebdaa4ce-1e41-4da6-a2d1-c7f8ef4785ed
:target: https://github.com/nortikin/sverchok/assets/14288520/ebdaa4ce-1e41-4da6-a2d1-c7f8ef4785ed

**Normal**: Normal of the Plane.
- **Decay**: How the force will decay with distance. 0= no decay, 1= linear, 2= cubic, 4= quadratic...

**Max. Distance**: Distance under the force will be applied.
.. image:: https://github.com/nortikin/sverchok/assets/14288520/5d935bfa-0f4c-43c0-b2d7-32e30e5671a3
:target: https://github.com/nortikin/sverchok/assets/14288520/5d935bfa-0f4c-43c0-b2d7-32e30e5671a3

**Decay**: How the force will decay with distance. 0= no decay, 1= linear, 2= cubic, 4= quadratic...
Examples
--------

Trajectories of vertices repelled by vertice in zero coords:

.. image:: https://github.com/nortikin/sverchok/assets/14288520/e8199160-7bc8-4ffa-982a-cb8cfc0eee9d
:target: https://github.com/nortikin/sverchok/assets/14288520/e8199160-7bc8-4ffa-982a-cb8cfc0eee9d

* Generator-> :doc:`Plane </nodes/generator/plane_mk3>`
* Number-> :doc:`Number Range </nodes/number/number_range>`
* Vector-> :doc:`Vector In </nodes/vector/vector_in>`
* Matrix-> :doc:`Matrix In </nodes/matrix/matrix_in_mk4>`
* Viz-> :doc:`Viewer Draw </nodes/viz/viewer_draw_mk4>`
* Pulga Physics-> :doc:`Pulga Physics Solver </nodes/pulga_physics/pulga_physics_solver>`

Examples
--------

Trajectories of vertices repelled by three locations:
Trajectories of vertices repelled by 5 locations:

.. image:: https://raw.githubusercontent.com/vicdoval/sverchok/docs_images/images_for_docs/pulga_physics/pulga_attractors_force/blender_sverchok_pulga_attractors_force_example_01.png
.. image:: https://github.com/nortikin/sverchok/assets/14288520/1d51f0c2-ab86-4d67-9904-eafdf6e7500a
:target: https://github.com/nortikin/sverchok/assets/14288520/1d51f0c2-ab86-4d67-9904-eafdf6e7500a

* Generator-> :doc:`Segment </nodes/generator/segment>`
* Generator-> :doc:`NGon </nodes/generator/ngon>`
* Generator-> :doc:`Circle </nodes/generator/circle>`
* Number-> :doc:`Number Range </nodes/number/number_range>`
* Viz-> :doc:`Viewer Draw </nodes/viz/viewer_draw_mk4>`
* Pulga Physics-> :doc:`Pulga Physics Solver </nodes/pulga_physics/pulga_physics_solver>`

--------

Trajectories of vertices attracted by three locations:

.. image:: https://raw.githubusercontent.com/vicdoval/sverchok/docs_images/images_for_docs/pulga_physics/pulga_attractors_force/blender_sverchok_pulga_attractors_force_example_02.png
.. image:: https://github.com/nortikin/sverchok/assets/14288520/0fa1ce67-39b4-47f8-98c5-2a560d84f385
:target: https://github.com/nortikin/sverchok/assets/14288520/0fa1ce67-39b4-47f8-98c5-2a560d84f385

* Generator-> :doc:`Segment </nodes/generator/segment>`
* Generator-> :doc:`NGon </nodes/generator/ngon>`
* Generator-> :doc:`Circle </nodes/generator/circle>`
* Number-> :doc:`Number Range </nodes/number/number_range>`
* Viz-> :doc:`Viewer Draw </nodes/viz/viewer_draw_mk4>`
* Pulga Physics-> :doc:`Pulga Physics Solver </nodes/pulga_physics/pulga_physics_solver>`

Loading
Loading