Skip to content

Commit

Permalink
Merge pull request #4922 from nortikin/update_menu_nodes_comments_33
Browse files Browse the repository at this point in the history
Updates curve menus 33
  • Loading branch information
satabol authored Jun 14, 2023
2 parents 5163f9f + a5e0fe3 commit f324e79
Show file tree
Hide file tree
Showing 33 changed files with 745 additions and 29 deletions.
27 changes: 26 additions & 1 deletion docs/nodes/curve/adaptive_plot.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
Adaptive Plot Curve
===================

.. image:: https://github.com/nortikin/sverchok/assets/14288520/b353ce32-325f-4db7-9fb8-2570d9dc8802
:target: https://github.com/nortikin/sverchok/assets/14288520/b353ce32-325f-4db7-9fb8-2570d9dc8802

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

Expand All @@ -27,6 +30,14 @@ The following algorithm is used:

For NURBS and NURBS-like curves, consider use of "Adaptive Plot NURBS Curve" node.

.. image:: https://github.com/nortikin/sverchok/assets/14288520/165d83b8-6fbf-47f1-95eb-432917ef6961
:target: https://github.com/nortikin/sverchok/assets/14288520/165d83b8-6fbf-47f1-95eb-432917ef6961

* Generator-> :doc:`Random Vector </nodes/generator/random_vector_mk3>`
* Curves-> :doc:`Cubic Spline </nodes/curve/cubic_spline>`
* Viz-> :doc:`Viewer Draw Curve </nodes/viz/viewer_draw_curve>`
* Viz-> :doc:`Viewer Draw </nodes/viz/viewer_draw_mk4>`

Inputs
------

Expand Down Expand Up @@ -59,20 +70,31 @@ This node has the following parameters:
* **By Curvature**. Use curve curvature value to distribute additional points
on the curve: places with greater curvature value will receive more points.
Checked by default.
* ** By Length**. Use segment lengths to distribute additional points on the
* **By Length**. Use segment lengths to distribute additional points on the
curve: segments with greater length will receive more points. Unchecked by
default.

.. image:: https://github.com/nortikin/sverchok/assets/14288520/96b290d1-2154-48be-a874-d90443a33ec7
:target: https://github.com/nortikin/sverchok/assets/14288520/96b290d1-2154-48be-a874-d90443a33ec7

* **Points Count**. This defines how number of points to be generated will be
defined. Possible options are:

* **Total Count**. Total number of points to be generated will be provided
in the **Count** input.

.. image:: https://github.com/nortikin/sverchok/assets/14288520/3e76982f-974e-4d28-9891-ede1463a2355
:target: https://github.com/nortikin/sverchok/assets/14288520/3e76982f-974e-4d28-9891-ede1463a2355

* **Per Segment**. Minimum and maximum number of points per initial
subdivision segment will be provided in **Min per segment**, **Max per
segment** inputs, correspondingly.

The default option is **Total Count**.

.. image:: https://github.com/nortikin/sverchok/assets/14288520/e5091c8d-0778-48e2-8d26-6bcdbdc03963
:target: https://github.com/nortikin/sverchok/assets/14288520/e5091c8d-0778-48e2-8d26-6bcdbdc03963

* **Random**. If checked, then additional points will be distributed randomly.
Otherwise, additional points will be distributed evenly inside each segment
of initial subdivision. Unchecked by default.
Expand All @@ -85,6 +107,9 @@ This node has the following parameters:
not have to change this value. Set the parameter to 0 (zero) to disable this
part of the algorithm.

.. image:: https://github.com/nortikin/sverchok/assets/14288520/92083c39-f8f5-46d1-8f9d-1b2e27ccd9e0
:target: https://github.com/nortikin/sverchok/assets/14288520/92083c39-f8f5-46d1-8f9d-1b2e27ccd9e0

Outputs
-------

Expand Down
21 changes: 20 additions & 1 deletion docs/nodes/curve/apply_field_to_curve.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
Apply Field to Curve
====================

.. image:: https://github.com/nortikin/sverchok/assets/14288520/50fc1d2e-0da6-41d9-add9-82905240a4a4
:target: https://github.com/nortikin/sverchok/assets/14288520/50fc1d2e-0da6-41d9-add9-82905240a4a4

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

Expand Down Expand Up @@ -72,12 +75,28 @@ Example of usage
Several Line curves modified by Noise vector field:

.. image:: https://user-images.githubusercontent.com/284644/77443601-fd816500-6e0c-11ea-9ed2-0516eba95951.png
:target: https://user-images.githubusercontent.com/284644/77443601-fd816500-6e0c-11ea-9ed2-0516eba95951.png

* Generator-> :doc:`NGon </nodes/generator/ngon>`
* Curves->Curve Primitives-> :doc:`Line (Curve) </nodes/curve/line>`
* Curves-> :doc:`Evaluate Curve </nodes/curve/eval_curve>`
* Fields-> :doc:`Noise Vector Field </nodes/field/noise_vfield>`
* Viz-> :doc:`Viewer Draw </nodes/viz/viewer_draw_mk4>`

Apply Attractor field to control points of a NURBS curve. Control polygon of a resulting curve is indicated with red:

.. image:: https://user-images.githubusercontent.com/284644/90950162-8c4fe780-e468-11ea-9fa2-8d133fa07c58.png
:target: https://user-images.githubusercontent.com/284644/90950162-8c4fe780-e468-11ea-9fa2-8d133fa07c58.png

* Curves-> :doc:`Interpolate NURBS Curve </nodes/curve/interpolate_nurbs_curve>`
* Curves-> :doc:`Evaluate Curve </nodes/curve/eval_curve>`
* Curves->Curve NURBS-> :doc:`Deconstruct Curve </nodes/curve/deconstruct_curve>`
* Fields-> :doc:`Attractor Field </nodes/field/attractor_field_mk2>`
* Vector-> :doc:`Vector sort </nodes/vector/vertices_sort>`
* Viz-> :doc:`Viewer Draw </nodes/viz/viewer_draw_mk4>`
* Scene-> :doc:`Objects In Lite </nodes/scene/objects_in_lite>`

If we apply the same curve to all points of curve (disable "Use control points" mode), we will have different curve:

.. image:: https://user-images.githubusercontent.com/284644/90950165-9245c880-e468-11ea-8439-0b450ae58010.png

:target: https://user-images.githubusercontent.com/284644/90950165-9245c880-e468-11ea-8439-0b450ae58010.png
55 changes: 55 additions & 0 deletions docs/nodes/curve/catmull_rom.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
Catmull-Rom Spline
==================

.. image:: https://github.com/nortikin/sverchok/assets/14288520/90d6160e-18f2-4d97-a2d5-be0b0f8e0ee5
:target: https://github.com/nortikin/sverchok/assets/14288520/90d6160e-18f2-4d97-a2d5-be0b0f8e0ee5

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

Expand Down Expand Up @@ -33,13 +36,28 @@ This node supports two variants of Catmull-Rom spline:
in places where control points are far from one another, and more flat where
control points are near. This usually gives the feeling of curve being more
"natural".

.. image:: https://github.com/nortikin/sverchok/assets/14288520/7d0bb73b-9e8e-4518-be7a-0f7e830a4141
:target: https://github.com/nortikin/sverchok/assets/14288520/7d0bb73b-9e8e-4518-be7a-0f7e830a4141

* Generator->Generatots Extended-> :doc:`Spiral </nodes/generators_extended/spiral_mk2>`
* Viz-> :doc:`Viewer Draw </nodes/viz/viewer_draw_mk4>`
* Viz-> :doc:`Viewer Draw Curve </nodes/viz/viewer_draw_curve>`

* Uniform spline. In this implementation, each spline segment is assigned with
equal span of T parameter. As effect, it is possible that the curve will be
unexpectedly more "curvy" when successive control points are near one
another. But this implementation has an option to control the degree of curve
"smoothness" by additional "tension" parameter. It is also possible to
specify tension value for each curve segment.

.. image:: https://github.com/nortikin/sverchok/assets/14288520/75f64eec-b2dd-4742-aa06-abac69d27243
:target: https://github.com/nortikin/sverchok/assets/14288520/75f64eec-b2dd-4742-aa06-abac69d27243

* Generator->Generatots Extended-> :doc:`Spiral </nodes/generators_extended/spiral_mk2>`
* Viz-> :doc:`Viewer Draw </nodes/viz/viewer_draw_mk4>`
* Viz-> :doc:`Viewer Draw Curve </nodes/viz/viewer_draw_curve>`

.. _Wikipedia: https://en.wikipedia.org/wiki/Centripetal_Catmull%E2%80%93Rom_spline

Inputs
Expand All @@ -56,6 +74,9 @@ This node has the following inputs:
segment of the curve (i.e. for each pair of successive points). The default
value is 1.0.

.. image:: https://github.com/nortikin/sverchok/assets/14288520/d338ff7b-f65a-46e2-8fb8-5646ab1b98eb
:target: https://github.com/nortikin/sverchok/assets/14288520/d338ff7b-f65a-46e2-8fb8-5646ab1b98eb

Parameters
----------

Expand All @@ -65,6 +86,10 @@ This node has the following parameters:
* **Spline Type**. Allows to select one of Catmull-Rom spline implementations
(see descriptions above). The available options are **Non-uniform** and
**Uniform (with tension)**. The default option is **Non-uniform**.

.. image:: https://github.com/nortikin/sverchok/assets/14288520/d338ff7b-f65a-46e2-8fb8-5646ab1b98eb
:target: https://github.com/nortikin/sverchok/assets/14288520/d338ff7b-f65a-46e2-8fb8-5646ab1b98eb

* **Metric**. This parameter is available only if **Spline Type** is set to
**Non-uniform**. Defines the metric used to assign T parameter spans to each
segment of the curve. The available values are:
Expand All @@ -81,6 +106,9 @@ This node has the following parameters:
Points (this makes a uniform spline with tension set to 1). The default
option is Euclidean.

.. image:: https://github.com/nortikin/sverchok/assets/14288520/06f36f4f-31e8-4c70-8de6-29839e869edd
:target: https://github.com/nortikin/sverchok/assets/14288520/06f36f4f-31e8-4c70-8de6-29839e869edd

Outputs
-------

Expand All @@ -96,29 +124,56 @@ Simplest example:
.. image:: https://user-images.githubusercontent.com/284644/210108720-cb3ef5df-1745-4c19-8625-73f74a445c3d.png
:target: https://user-images.githubusercontent.com/284644/210108720-cb3ef5df-1745-4c19-8625-73f74a445c3d.png

* Viz-> :doc:`Viewer Draw Curve </nodes/viz/viewer_draw_curve>`
* Scene-> :doc:`Get Objects Data </nodes/scene/get_objects_data>`

Uniform (yellow) vs non-uniform (green) spline:

.. image:: https://user-images.githubusercontent.com/284644/210095223-04cb8658-522e-4458-8668-280a810d5b56.png
:target: https://user-images.githubusercontent.com/284644/210095223-04cb8658-522e-4458-8668-280a810d5b56.png

* Viz-> :doc:`Viewer Draw </nodes/viz/viewer_draw_mk4>`
* Viz-> :doc:`Viewer Draw Curve </nodes/viz/viewer_draw_curve>`
* Scene-> :doc:`Get Objects Data </nodes/scene/get_objects_data>`

Non-uniform splines with Euclidean metric (yellow) and with centripetal metric (green):

.. image:: https://user-images.githubusercontent.com/284644/210095289-11843fed-a915-4030-8391-b81735f1375b.png
:target: https://user-images.githubusercontent.com/284644/210095289-11843fed-a915-4030-8391-b81735f1375b.png

* Viz-> :doc:`Viewer Draw </nodes/viz/viewer_draw_mk4>`
* Viz-> :doc:`Viewer Draw Curve </nodes/viz/viewer_draw_curve>`
* Scene-> :doc:`Get Objects Data </nodes/scene/get_objects_data>`

Non-uniform (Euclidean) Catmull-Rom spline (yellow) vs Cubic spline (blue):

.. image:: https://user-images.githubusercontent.com/284644/210095458-840ee62f-36bc-41ec-8f25-728392fdaedf.png
:target: https://user-images.githubusercontent.com/284644/210095458-840ee62f-36bc-41ec-8f25-728392fdaedf.png

* Viz-> :doc:`Viewer Draw </nodes/viz/viewer_draw_mk4>`
* Viz-> :doc:`Viewer Draw Curve </nodes/viz/viewer_draw_curve>`
* Scene-> :doc:`Get Objects Data </nodes/scene/get_objects_data>`

Uniform splines with different tension values: from 0.2 (almost black lines) to 2.0 (white line):

.. image:: https://user-images.githubusercontent.com/284644/210087921-a8cebbca-2235-4d82-9e11-f08794d8227c.png
:target: https://user-images.githubusercontent.com/284644/210087921-a8cebbca-2235-4d82-9e11-f08794d8227c.png

* Number-> :doc:`Number Range </nodes/number/number_range>`
* Number-> :doc:`Map Range </nodes/number/range_map>`
* Curves-> :doc:`Evaluate Curve </nodes/curve/eval_curve>`
* List->List Struct-> :doc:`List Levels </nodes/list_struct/levels>`
* Color-> :doc:`Color In </nodes/color/color_in_mk1>`
* Viz-> :doc:`Viewer Draw </nodes/viz/viewer_draw_mk4>`
* Scene-> :doc:`Get Objects Data </nodes/scene/get_objects_data>`

Here the curvature comb is used to illustrate that the curvature of Catmull-Rom
splines can change very fast and sudden:

.. image:: https://user-images.githubusercontent.com/284644/210087923-fc329968-375a-440e-b661-ee107a85e326.png
:target: https://user-images.githubusercontent.com/284644/210087923-fc329968-375a-440e-b661-ee107a85e326.png

* Viz-> :doc:`Viewer Draw </nodes/viz/viewer_draw_mk4>`
* Viz-> :doc:`Viewer Draw Curve </nodes/viz/viewer_draw_curve>`
* Scene-> :doc:`Get Objects Data </nodes/scene/get_objects_data>`

23 changes: 22 additions & 1 deletion docs/nodes/curve/curvature.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
Curve Curvature
===============

.. image:: https://github.com/nortikin/sverchok/assets/14288520/50a1d9b3-0c0a-4b23-b890-a18c0bd1872e
:target: https://github.com/nortikin/sverchok/assets/14288520/50a1d9b3-0c0a-4b23-b890-a18c0bd1872e

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

Expand All @@ -10,6 +13,16 @@ osculating circle.

.. _curvature: https://en.wikipedia.org/wiki/Curvature#Space_curves

.. image:: https://github.com/nortikin/sverchok/assets/14288520/157422c9-d794-4a63-82c9-77dd6d954071
:target: https://github.com/nortikin/sverchok/assets/14288520/157422c9-d794-4a63-82c9-77dd6d954071

* Generator-> :doc:`Segment </nodes/generator/segment>`
* Curves-> :doc:`Evaluate Curve </nodes/curve/eval_curve>`
* Number-> :doc:`Number Range </nodes/number/number_range>`
* List->List Struct-> :doc:`List Levels </nodes/list_struct/levels>`
* Viz-> :doc:`Viewer Draw </nodes/viz/viewer_draw_mk4>`
* Scene-> :doc:`Bezier Input </nodes/exchange/bezier_in>`

Inputs
------

Expand Down Expand Up @@ -38,4 +51,12 @@ Example of usage
Calculate and display curvature at several points of some random curve:

.. image:: https://user-images.githubusercontent.com/284644/78502370-470d7080-777a-11ea-9ee7-648946c89ab5.png

:target: https://user-images.githubusercontent.com/284644/78502370-470d7080-777a-11ea-9ee7-648946c89ab5.png

* Generator-> :doc:`Random Vector </nodes/generator/random_vector_mk3>`
* Curves-> :doc:`Cubic Spline </nodes/curve/cubic_spline>`
* Curves-> :doc:`Curve Domain </nodes/curve/curve_range>`
* Curves-> :doc:`Evaluate Curve </nodes/curve/eval_curve>`
* Number-> :doc:`Number Range </nodes/number/number_range>`
* Viz-> :doc:`Viewer Index+ </nodes/viz/viewer_idx28>`
* Viz-> :doc:`Viewer Draw </nodes/viz/viewer_draw_mk4>`
36 changes: 35 additions & 1 deletion docs/nodes/curve/curve_length.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
Curve Length
============

.. image:: https://github.com/nortikin/sverchok/assets/14288520/e3daf084-d9ee-43ac-9d99-c66d55fa6018
:target: https://github.com/nortikin/sverchok/assets/14288520/e3daf084-d9ee-43ac-9d99-c66d55fa6018

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

Expand All @@ -12,6 +15,14 @@ straight segments and summing their lengths. The more segments you subdivide
the curve in, the more precise the length will be, but the more time it will
take to calculate. So the node gives you control on the number of subdivisions.

.. image:: https://github.com/nortikin/sverchok/assets/14288520/829ea5a2-39bf-452c-abe4-c855bbd65672
:target: https://github.com/nortikin/sverchok/assets/14288520/829ea5a2-39bf-452c-abe4-c855bbd65672

* Curves-> :doc:`Extend Curve </nodes/curve/extend_curve>`
* Viz-> :doc:`Viewer Draw Curve </nodes/viz/viewer_draw_curve>`
* Text-> :doc:`Stethoscope </nodes/text/stethoscope_v28>`
* Scene-> :doc:`Bezier Input </nodes/exchange/bezier_in>`

Inputs
------

Expand Down Expand Up @@ -57,12 +68,35 @@ Examples of usage
The length of a unit circle is 2*pi:

.. image:: https://user-images.githubusercontent.com/284644/77850952-6b53d500-71ef-11ea-80fe-07815a5c7e1d.png
:target: https://user-images.githubusercontent.com/284644/77850952-6b53d500-71ef-11ea-80fe-07815a5c7e1d.png

* Curves-> :doc:`Circle (Curve) </nodes/curve/curve_circle>`
* Curves-> :doc:`Evaluate Curve </nodes/curve/eval_curve>`
* Viz-> :doc:`Viewer Draw </nodes/viz/viewer_draw_mk4>`
* Text-> :doc:`Stethoscope </nodes/text/stethoscope_v28>`

Calculate length of some smooth curve:

.. image:: https://user-images.githubusercontent.com/284644/77849699-01cfc880-71e7-11ea-97b2-9229e0f9c630.png
:target: https://user-images.githubusercontent.com/284644/77849699-01cfc880-71e7-11ea-97b2-9229e0f9c630.png

* Curves-> :doc:`Cubic Spline </nodes/curve/cubic_spline>`
* Curves-> :doc:`Evaluate Curve </nodes/curve/eval_curve>`
* Vector-> :doc:`Vector sort </nodes/vector/vertices_sort>`
* Viz-> :doc:`Viewer Draw </nodes/viz/viewer_draw_mk4>`
* Text-> :doc:`Stethoscope </nodes/text/stethoscope_v28>`
* Scene-> :doc:`Objects In Lite </nodes/scene/objects_in_lite>`

Take some points on the curve (with even steps in T) and calculate length from the beginning of the curve to each point:

.. image:: https://user-images.githubusercontent.com/284644/77849701-0300f580-71e7-11ea-89a7-197f7778da71.png

:target: https://user-images.githubusercontent.com/284644/77849701-0300f580-71e7-11ea-89a7-197f7778da71.png

* Number-> :doc:`Number Range </nodes/number/number_range>`
* Vector-> :doc:`Vector sort </nodes/vector/vertices_sort>`
* Curves-> :doc:`Cubic Spline </nodes/curve/cubic_spline>`
* Curves-> :doc:`Curve Domain </nodes/curve/curve_range>`
* Curves-> :doc:`Evaluate Curve </nodes/curve/eval_curve>`
* Viz-> :doc:`Viewer Draw </nodes/viz/viewer_draw_mk4>`
* Viz-> :doc:`Viewer Index+ </nodes/viz/viewer_idx28>`
* Scene-> :doc:`Objects In Lite </nodes/scene/objects_in_lite>`
34 changes: 33 additions & 1 deletion docs/nodes/curve/curve_on_surface.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
Curve on Surface
================

.. image:: https://github.com/nortikin/sverchok/assets/14288520/93b89074-7f66-4b38-a67b-49ba6ae1cbdd
:target: https://github.com/nortikin/sverchok/assets/14288520/93b89074-7f66-4b38-a67b-49ba6ae1cbdd

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

Expand All @@ -10,6 +13,14 @@ placed in 2D space of U and V parameters, and generates another curve by
evaluating the surface at U/V coordinates generated by the first curve. One may
say that this node draws the curve on the surface.

.. image:: https://github.com/nortikin/sverchok/assets/14288520/2ca06ed4-ed55-4d0f-b2d5-af6faa5136f1
:target: https://github.com/nortikin/sverchok/assets/14288520/2ca06ed4-ed55-4d0f-b2d5-af6faa5136f1

* Generator-> :doc:`Random Vector </nodes/generator/random_vector_mk3>`
* Curves-> :doc:`Cubic Spline </nodes/curve/cubic_spline>`
* Viz-> :doc:`Viewer Draw Curve </nodes/viz/viewer_draw_curve>`
* Viz-> :doc:`Viewer Draw Surface </nodes/viz/viewer_draw_surface>`

Inputs
------

Expand Down Expand Up @@ -41,8 +52,29 @@ Examples of usage
Generate some surface and draw a circle on it:

.. image:: https://user-images.githubusercontent.com/284644/78508319-5ce15c80-779f-11ea-92a8-48e9ea65450c.png
:target: https://user-images.githubusercontent.com/284644/78508319-5ce15c80-779f-11ea-92a8-48e9ea65450c.png

* Generator-> :doc:`NGon </nodes/generator/ngon>`
* Curves-> :doc:`Cubic Spline </nodes/curve/cubic_spline>`
* Curves-> :doc:`Circle (Curve) </nodes/curve/curve_circle>`
* Curves-> :doc:`Evaluate Curve </nodes/curve/eval_curve>`
* Surfaces-> :doc:`Extrude Curve Along Vector </nodes/surface/extrude_vector>`
* Surface-> :doc:`Evaluate Surface </nodes/surface/evaluate_surface>`
* Matrix-> :doc:`Matrix In </nodes/matrix/matrix_in_mk4>`
* Viz-> :doc:`Viewer Draw </nodes/viz/viewer_draw_mk4>`

It is possible to use such a curve, for example, to place cubes along it:

.. image:: https://user-images.githubusercontent.com/284644/78508386-f6a90980-779f-11ea-9156-edd05500a0f8.png

:target: https://user-images.githubusercontent.com/284644/78508386-f6a90980-779f-11ea-9156-edd05500a0f8.png

* Generator-> :doc:`NGon </nodes/generator/ngon>`
* Generator-> :doc:`Box </nodes/generator/box_mk2>`
* Curves-> :doc:`Circle (Curve) </nodes/curve/curve_circle>`
* Curves-> :doc:`Cubic Spline </nodes/curve/cubic_spline>`
* Curves-> :doc:`Curve Zero-Twist Frame </nodes/curve/zero_twist_frame>`
* Surfaces-> :doc:`Extrude Curve Along Vector </nodes/surface/extrude_vector>`
* Surface-> :doc:`Evaluate Surface </nodes/surface/evaluate_surface>`
* Number-> :doc:`Number Range </nodes/number/number_range>`
* Matrix-> :doc:`Matrix In </nodes/matrix/matrix_in_mk4>`
* Viz-> :doc:`Viewer Draw </nodes/viz/viewer_draw_mk4>`
Loading

0 comments on commit f324e79

Please sign in to comment.