From 426c1ff990b6e115b73602ddba8c5ec2f9794bdd Mon Sep 17 00:00:00 2001 From: kiruma524 <71787194+kiruma524@users.noreply.github.com> Date: Fri, 6 Aug 2021 10:43:13 +0300 Subject: [PATCH 01/15] Update docs/tutorial.md Co-authored-by: Iaroslav Postovalov <38042667+CommanderTvis@users.noreply.github.com> --- docs/tutorial.md | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/docs/tutorial.md b/docs/tutorial.md index d70d306d..924b62c5 100644 --- a/docs/tutorial.md +++ b/docs/tutorial.md @@ -244,18 +244,19 @@ Let's make classic parallelepiped. Now, let's make a custom hexagon. ```kotlin - hexagon( - Point3D(5, 30, 5), - Point3D(24, 30, 8), - Point3D(20, 30, -10), - Point3D(5, 30, -7), - Point3D(8, 16, 0), - Point3D(12, 16, 0), - Point3D(10, 16, -5), - Point3D(6.5, 12, -3), - name = "custom_hexagon"){ - color("brown") - } +hexagon( + Point3D(5, 30, 5), + Point3D(24, 30, 8), + Point3D(20, 30, -10), + Point3D(5, 30, -7), + Point3D(8, 16, 0), + Point3D(12, 16, 0), + Point3D(10, 16, -5), + Point3D(6.5, 12, -3), + name = "custom_hexagon" +) { + color("brown") +} ``` ![](../docs/images/custom-hexagon.png) ### 3) Cone @@ -370,4 +371,3 @@ tube(50, 40, 20, 0f, PI, name = "fragmented tube"){ `extruded` is set by two values: `shape`, and `layer`. * `shape` is a value of `List` type. It' s just a list of all points of the solid. *`shape` has to consist of not less than two points!* * `layer` is `MutableList` types variable. (here is a sentence with description of the work of this function). *The amount of `layer`-s has to be more than one* - From b3ecc2136e0eb922f4953339c6c53152ddcf6b25 Mon Sep 17 00:00:00 2001 From: kiruma524 <71787194+kiruma524@users.noreply.github.com> Date: Fri, 6 Aug 2021 10:43:20 +0300 Subject: [PATCH 02/15] Update docs/tutorial.md Co-authored-by: Iaroslav Postovalov <38042667+CommanderTvis@users.noreply.github.com> --- docs/tutorial.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/tutorial.md b/docs/tutorial.md index 924b62c5..83da43d9 100644 --- a/docs/tutorial.md +++ b/docs/tutorial.md @@ -1,6 +1,6 @@ # Tutorial -#### The main goal of this tutorial is to show main capabilities of the visualization instrument. +#### The main goal of this tutorial is to show the main capabilities of the visualization instrument. The simple visualization can be made with function `main`. (this part will be supplemented) ```kotlin From 2c2b7a5fa2ec555a388d33414ff72a264bde163c Mon Sep 17 00:00:00 2001 From: kiruma524 <71787194+kiruma524@users.noreply.github.com> Date: Fri, 6 Aug 2021 10:43:34 +0300 Subject: [PATCH 03/15] Update docs/tutorial.md Co-authored-by: Iaroslav Postovalov <38042667+CommanderTvis@users.noreply.github.com> --- docs/tutorial.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/tutorial.md b/docs/tutorial.md index 83da43d9..aeef2aa1 100644 --- a/docs/tutorial.md +++ b/docs/tutorial.md @@ -120,7 +120,7 @@ fun main(){ Now, let's see which solids can be visualized: ### 1) PolyLine -It's scarcely a solid, but it can be visualized, so we mention it. +It's scarcely a solid, but it can be visualized, so we mention it. `polyline` build lines, obviously. Let's take a look at it's work. `polyline` requires two values - `points`, and `name`: From d5c0afd8c0f641a68870777081c75af0858d9403 Mon Sep 17 00:00:00 2001 From: kiruma524 <71787194+kiruma524@users.noreply.github.com> Date: Fri, 6 Aug 2021 10:43:51 +0300 Subject: [PATCH 04/15] Update docs/tutorial.md Co-authored-by: Iaroslav Postovalov <38042667+CommanderTvis@users.noreply.github.com> --- docs/tutorial.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/tutorial.md b/docs/tutorial.md index aeef2aa1..dfb5f65f 100644 --- a/docs/tutorial.md +++ b/docs/tutorial.md @@ -369,5 +369,5 @@ tube(50, 40, 20, 0f, PI, name = "fragmented tube"){ ### 7) Extruded `extruded` is set by two values: `shape`, and `layer`. -* `shape` is a value of `List` type. It' s just a list of all points of the solid. *`shape` has to consist of not less than two points!* +* `shape` is a value of `List` type. It's just a list of all points of the solid. *`shape` has to consist of not less than two points!* * `layer` is `MutableList` types variable. (here is a sentence with description of the work of this function). *The amount of `layer`-s has to be more than one* From 6d7356f08c7d0601d401ba50b5dc6a79c6f05ac0 Mon Sep 17 00:00:00 2001 From: kiruma524 <71787194+kiruma524@users.noreply.github.com> Date: Fri, 6 Aug 2021 10:43:57 +0300 Subject: [PATCH 05/15] Update docs/tutorial.md Co-authored-by: Iaroslav Postovalov <38042667+CommanderTvis@users.noreply.github.com> --- docs/tutorial.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/tutorial.md b/docs/tutorial.md index dfb5f65f..97d4a00e 100644 --- a/docs/tutorial.md +++ b/docs/tutorial.md @@ -187,7 +187,7 @@ For final trial, let's create `box` with bigger `x` value. color("black") } ``` -Predictably, only `x-axis` rib bigger than other ribs. +Predictably, only the `x-axis` rib is bigger than other ribs. ![](../docs/images/wide-box.png) From 689071d0da4a0ee647bac17b7febdcbed9df7841 Mon Sep 17 00:00:00 2001 From: kiruma524 <71787194+kiruma524@users.noreply.github.com> Date: Fri, 6 Aug 2021 10:44:28 +0300 Subject: [PATCH 06/15] Update docs/tutorial.md Co-authored-by: Iaroslav Postovalov <38042667+CommanderTvis@users.noreply.github.com> --- docs/tutorial.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/tutorial.md b/docs/tutorial.md index 97d4a00e..0052f3e9 100644 --- a/docs/tutorial.md +++ b/docs/tutorial.md @@ -196,7 +196,7 @@ Predictably, only the `x-axis` rib is bigger than other ribs. It takes in two values: `radius`, and `name`. We bring you to mind that `name` is a general value for all solids, so do not wonder, since all solids need their own identifier. -As for `radius`, it has `Float` type, and, as you can guess, it sets radius of the sphere, which will be created. +As for `radius`, it has `Float` type, and, as you can guess, it sets the radius of the sphere which will be created. ```kotlin sphere(50, name = "sphere") { x = 0 From 1d7776807183aa9ac8a05f665d4619f297754601 Mon Sep 17 00:00:00 2001 From: kiruma524 <71787194+kiruma524@users.noreply.github.com> Date: Fri, 6 Aug 2021 10:44:38 +0300 Subject: [PATCH 07/15] Update docs/tutorial.md Co-authored-by: Iaroslav Postovalov <38042667+CommanderTvis@users.noreply.github.com> --- docs/tutorial.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/tutorial.md b/docs/tutorial.md index 0052f3e9..e8b8a5b0 100644 --- a/docs/tutorial.md +++ b/docs/tutorial.md @@ -262,7 +262,7 @@ hexagon( ### 3) Cone It takes in six values: `bottomRadius`, `height`, `upperRadius`, `startAngle`, `angle`, and `name`. -Obviously, `bottomRadius` is responsible for radius of a bottom base, and `height` sets height of a cone along the `z-axis`. +Obviously, `bottomRadius` is responsible for the radius of a bottom base, and `height` sets the height of a cone along the `z-axis`. As it takes such values as `upperRadius`, `startAngle`, `angle`, `cone` can build not only usual cones, but also cone segments. Initially, `upperRadius` will have `0.0` value, `startAngle` - `0f`, `angle` - `PI2`, so if you don't set them, you'll get just a simple cone. From f71130ea0bd700a8dd139ba491d85dd346f1f11e Mon Sep 17 00:00:00 2001 From: kiruma524 <71787194+kiruma524@users.noreply.github.com> Date: Fri, 6 Aug 2021 10:44:44 +0300 Subject: [PATCH 08/15] Update docs/tutorial.md Co-authored-by: Iaroslav Postovalov <38042667+CommanderTvis@users.noreply.github.com> --- docs/tutorial.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/tutorial.md b/docs/tutorial.md index e8b8a5b0..ba302ff9 100644 --- a/docs/tutorial.md +++ b/docs/tutorial.md @@ -370,4 +370,4 @@ tube(50, 40, 20, 0f, PI, name = "fragmented tube"){ `extruded` is set by two values: `shape`, and `layer`. * `shape` is a value of `List` type. It's just a list of all points of the solid. *`shape` has to consist of not less than two points!* -* `layer` is `MutableList` types variable. (here is a sentence with description of the work of this function). *The amount of `layer`-s has to be more than one* +* `layer` is `MutableList` types variable. (here is a sentence with a description of the work of this function). *The amount of `layer`-s has to be more than one* From 133de264c11020be5733408a8072ff7fa2225836 Mon Sep 17 00:00:00 2001 From: kiruma524 <71787194+kiruma524@users.noreply.github.com> Date: Fri, 6 Aug 2021 10:48:26 +0300 Subject: [PATCH 09/15] Update docs/tutorial.md Co-authored-by: Iaroslav Postovalov <38042667+CommanderTvis@users.noreply.github.com> --- docs/tutorial.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/tutorial.md b/docs/tutorial.md index ba302ff9..3bdab769 100644 --- a/docs/tutorial.md +++ b/docs/tutorial.md @@ -222,7 +222,7 @@ It is solid which has six edges. It is set by eight values: `node1`,..., `node8` ![](../docs/images/scheme.png) -As hexagon takes in specific points, we understand that this solid cannot be moved, it fixed in space, and it can't make pivots. +As the hexagon takes in specific points, we understand that this solid cannot be moved, it is fixed in space, and it can't make pivots. Let's make classic parallelepiped. ```kotlin From cb057db93bb3a7306a0a345342da14efd6c5728e Mon Sep 17 00:00:00 2001 From: kiruma524 <71787194+kiruma524@users.noreply.github.com> Date: Fri, 6 Aug 2021 10:48:38 +0300 Subject: [PATCH 10/15] Update docs/tutorial.md Co-authored-by: Iaroslav Postovalov <38042667+CommanderTvis@users.noreply.github.com> --- docs/tutorial.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/tutorial.md b/docs/tutorial.md index 3bdab769..f2c13af0 100644 --- a/docs/tutorial.md +++ b/docs/tutorial.md @@ -42,7 +42,7 @@ fun main(){ *Basic properties:* 1. `opacity` - It is set in `float`. It takes on values from 0 to 1, which represent percents of solid opacity. It's initial value is 1. 2. `color` - It can be specified as `Int`, `String`, or as three `Ubytes`, which represent color in `rgb`. Elementally, the solid will have `green` color. -3. `rotation` - it's the point, which set rotations along axes. Initially, the value is `Point3D(0, 0, 0)`. Changing `x` coordinate of the point, you make pivot around `x axis`. The same for other coordinates: changing `y` - pivot around `y axis`, changing `z` - pivot around `z axis`. +3. `rotation` - it's the point, which sets rotations along axes. Initially, the value is `Point3D(0, 0, 0)`. Changing `x` coordinate of the point, you make pivot around `x axis`. The same for other coordinates: changing `y` - pivot around `y axis`, changing `z` - pivot around `z axis`. 4. position, which is given by values `x`, `y`, `z`. Initial values are `x = 0`, `y = 0`, `z = 0`. The coordinate system is Cartesian. It's elemental position is this - vertical `y` axis and horizontal `Oxz` plane. Let's see how properties are set in solids. From 2d6be6629a6f88f59f70ef988410cd43fe6ee735 Mon Sep 17 00:00:00 2001 From: kiruma524 <71787194+kiruma524@users.noreply.github.com> Date: Fri, 6 Aug 2021 10:48:56 +0300 Subject: [PATCH 11/15] Update docs/tutorial.md Co-authored-by: Iaroslav Postovalov <38042667+CommanderTvis@users.noreply.github.com> --- docs/tutorial.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/tutorial.md b/docs/tutorial.md index f2c13af0..fbe064c2 100644 --- a/docs/tutorial.md +++ b/docs/tutorial.md @@ -114,7 +114,7 @@ fun main(){ ![](../docs/images/two-boxes-1.png) ![](../docs/images/two-boxes-2.png) -***There is plenty of other properties, especially of those, which you can create by yourself. Here we mention just small part.*** +***There is plenty of other properties, especially those, which you can create by yourself. Here we mention just a small part.*** ## Basic Solids Now, let's see which solids can be visualized: From 9c6d646b53cac8037c714c523e69b336eed0c0d0 Mon Sep 17 00:00:00 2001 From: kiruma524 <71787194+kiruma524@users.noreply.github.com> Date: Fri, 6 Aug 2021 10:49:11 +0300 Subject: [PATCH 12/15] Update docs/tutorial.md Co-authored-by: Iaroslav Postovalov <38042667+CommanderTvis@users.noreply.github.com> --- docs/tutorial.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/tutorial.md b/docs/tutorial.md index fbe064c2..3ce8848e 100644 --- a/docs/tutorial.md +++ b/docs/tutorial.md @@ -125,7 +125,7 @@ It's scarcely a solid, but it can be visualized, so we mention it. `polyline` requires two values - `points`, and `name`: * `points` is a `vararg` with `Point3D` type. It takes pairs of points, which you want to connect. -* `name` is an identifier of *any solid*, but in this case it is an identifier of `polyline`. +* `name` is an identifier of *any solid*; but in this case, it is an identifier of `polyline`. It's type is `String`. **This value can be required by any solid; you can set it, you can not to set it, but without you won't be able to control solid, since it won't be inherited.** From 16c3144b45a767a58784a6865c12751fc9b1d99b Mon Sep 17 00:00:00 2001 From: kiruma524 <71787194+kiruma524@users.noreply.github.com> Date: Fri, 6 Aug 2021 10:49:21 +0300 Subject: [PATCH 13/15] Update docs/tutorial.md Co-authored-by: Iaroslav Postovalov <38042667+CommanderTvis@users.noreply.github.com> --- docs/tutorial.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/tutorial.md b/docs/tutorial.md index 3ce8848e..d21286a9 100644 --- a/docs/tutorial.md +++ b/docs/tutorial.md @@ -173,7 +173,7 @@ Now, let's make `box` with bigger `y` value. color("black") } ``` -As you can see, only rib of `y-axis` differs from other ribs. +As you can see, only the rib of `y-axis` differs from other ribs. ![](../docs/images/high-box.png) From 84e0211b54ec1f420c989879e1dda1db03747a9e Mon Sep 17 00:00:00 2001 From: kiruma524 <71787194+kiruma524@users.noreply.github.com> Date: Fri, 6 Aug 2021 10:49:37 +0300 Subject: [PATCH 14/15] Update docs/tutorial.md Co-authored-by: Iaroslav Postovalov <38042667+CommanderTvis@users.noreply.github.com> --- docs/tutorial.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/tutorial.md b/docs/tutorial.md index d21286a9..02344e2f 100644 --- a/docs/tutorial.md +++ b/docs/tutorial.md @@ -177,7 +177,7 @@ As you can see, only the rib of `y-axis` differs from other ribs. ![](../docs/images/high-box.png) -For final trial, let's create `box` with bigger `x` value. +For a final trial, let's create a `box` with a bigger `x` value. ```kotlin box(65, 40, 40, name = "wide box") { From 99c6d0e14ce3c8515db4e1f248c0c8768ed0eee9 Mon Sep 17 00:00:00 2001 From: kiruma524 <71787194+kiruma524@users.noreply.github.com> Date: Fri, 6 Aug 2021 10:56:44 +0300 Subject: [PATCH 15/15] Update tutorial.md --- docs/tutorial.md | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/docs/tutorial.md b/docs/tutorial.md index 02344e2f..8989bd49 100644 --- a/docs/tutorial.md +++ b/docs/tutorial.md @@ -40,10 +40,10 @@ fun main(){ **We will analyze which basic properties solids have using `box` solid.** *Basic properties:* -1. `opacity` - It is set in `float`. It takes on values from 0 to 1, which represent percents of solid opacity. It's initial value is 1. -2. `color` - It can be specified as `Int`, `String`, or as three `Ubytes`, which represent color in `rgb`. Elementally, the solid will have `green` color. -3. `rotation` - it's the point, which sets rotations along axes. Initially, the value is `Point3D(0, 0, 0)`. Changing `x` coordinate of the point, you make pivot around `x axis`. The same for other coordinates: changing `y` - pivot around `y axis`, changing `z` - pivot around `z axis`. -4. position, which is given by values `x`, `y`, `z`. Initial values are `x = 0`, `y = 0`, `z = 0`. The coordinate system is Cartesian. It's elemental position is this - vertical `y` axis and horizontal `Oxz` plane. +1. `opacity` — It is set in `float`. It takes on values from 0 to 1, which represent percents of solid opacity. It's initial value is 1. +2. `color` — It can be specified as `Int`, `String`, or as three `Ubytes`, which represent color in `rgb`. Elementally, the solid will have `green` color. +3. `rotation` — it's the point, which sets rotations along axes. Initially, the value is `Point3D(0, 0, 0)`. Changing `x` coordinate of the point, you make pivot around `x axis`. The same for other coordinates: changing `y` — pivot around `y axis`, changing `z` — pivot around `z axis`. +4. position, which is given by values `x`, `y`, `z`. Initial values are `x = 0`, `y = 0`, `z = 0`. The coordinate system is Cartesian. It's elemental position is this — vertical `y` axis and horizontal `Oxz` plane. Let's see how properties are set in solids. The `small box` will have elemental values of properties. If you don't set properties, it will have the same `position`, `color`, `rotation`, and `opacity` values. @@ -123,7 +123,7 @@ Now, let's see which solids can be visualized: It's scarcely a solid, but it can be visualized, so we mention it. `polyline` build lines, obviously. Let's take a look at it's work. -`polyline` requires two values - `points`, and `name`: +`polyline` requires two values — `points`, and `name`: * `points` is a `vararg` with `Point3D` type. It takes pairs of points, which you want to connect. * `name` is an identifier of *any solid*; but in this case, it is an identifier of `polyline`. It's type is `String`. **This value can be required by any solid; @@ -148,15 +148,15 @@ polyline(Point3D(30, 20, 10), Point3D(30, -100, 30), Point3D(30, -100, 30), Poin ### 2) Box First thing which has to be mentioned is that `box` takes four values: `box(x, y, z, name)` -* `x` - x-axis length of the `box` -* `y` - y-axis length of the `box` -* `z` - z-axis length of the `box` +* `x` — x-axis length of the `box` +* `y` — y-axis length of the `box` +* `z` — z-axis length of the `box` These values have `Float` type. *`x`, `y`, and `z` are necessary values, which cannot be ignored. You have to set them.* -* `name` - `box`'es identifier. You've already met it. +* `name` — `box`'es identifier. You've already met it. Let's create just usual `box` with equal ribs. @@ -264,9 +264,9 @@ It takes in six values: `bottomRadius`, `height`, `upperRadius`, `startAngle`, ` Obviously, `bottomRadius` is responsible for the radius of a bottom base, and `height` sets the height of a cone along the `z-axis`. -As it takes such values as `upperRadius`, `startAngle`, `angle`, `cone` can build not only usual cones, but also cone segments. Initially, `upperRadius` will have `0.0` value, `startAngle` - `0f`, `angle` - `PI2`, so if you don't set them, you'll get just a simple cone. +As it takes such values as `upperRadius`, `startAngle`, `angle`, `cone` can build not only usual cones, but also cone segments. Initially, `upperRadius` will have `0.0` value, `startAngle` — `0f`, `angle` — `PI2`, so if you don't set them, you'll get just a simple cone. -Setting `upperRadius`, you make a frustum cone, since it sets a radius of the upper base of a cone. Set `startAngle`, and `angle` let to cut off segments by planes perpendicular to the base. `startAngle` - an angle, starting with which segment will be left, `angle` - an angle of cone, which will be set from `startAngle`. +Setting `upperRadius`, you make a frustum cone, since it sets a radius of the upper base of a cone. Set `startAngle`, and `angle` let to cut off segments by planes perpendicular to the base. `startAngle` — an angle, starting with which segment will be left, `angle` — an angle of cone, which will be set from `startAngle`. Let's build a classic cone: ```kotlin @@ -307,7 +307,7 @@ cone(60, 100, 20, PI*3/4, angle = PI/3, name = "cone") { This solid is set by seven values:`bottomOuterRadius`, `bottomInnerRadius`, `height`, `topOuterRadius`, `topInnerRadius`, `startAngle`, and `angle`. In addition to `height`, `startAngle`, and `angle`, which work as they work in `cone`, there are some new values. -`bottomOuterRadius`, and `bottomInnerRadius` set properties of the bottom circle, `topOuterRadius`, `topInnerRadius` - of the upper circle. They have no initial value, so that means they have to be set. +`bottomOuterRadius`, and `bottomInnerRadius` set properties of the bottom circle, `topOuterRadius`, `topInnerRadius` — of the upper circle. They have no initial value, so that means they have to be set. Generally, `cone`, and `coneSurface` buildings work in the same way, it's possible to make `coneSurface`'s fragments as in `cone`