1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-11 17:24:20 +02:00

update doc

This commit is contained in:
Justin Lin
2021-02-09 15:40:22 +08:00
parent 6bc697983b
commit 313c440be9
5 changed files with 3 additions and 31 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 112 KiB

View File

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 25 KiB

View File

Before

Width:  |  Height:  |  Size: 48 KiB

After

Width:  |  Height:  |  Size: 48 KiB

View File

Before

Width:  |  Height:  |  Size: 118 KiB

After

Width:  |  Height:  |  Size: 118 KiB

View File

@@ -7,7 +7,6 @@ Given a list of points `[x, y, f(x, y)]` where `f(x, y)` is a mathematics functi
- `points` : A list of points `[x, y, f(x, y)]`. See examples below. - `points` : A list of points `[x, y, f(x, y)]`. See examples below.
- `thickness` : The face or line thickness. - `thickness` : The face or line thickness.
- `style` : The style of the graph. It accepts `"FACES"`, `"LINES"`, `"HULL_FACES"` and `"HULL_LINES"`. The default value is `"FACES"` which simply takes `f(x, y) - thickness` for each point to build a bottom. It may cause thickness problems when slopes is high. The `"HULL_FACES"` value can solve the problem but is slow. When assigning `"LINES"`, it uses lines to connect points. The `"HULL_LINES"` is very very slow; however, the model might look smoother if you have a small `$fn`. - `style` : The style of the graph. It accepts `"FACES"`, `"LINES"`, `"HULL_FACES"` and `"HULL_LINES"`. The default value is `"FACES"` which simply takes `f(x, y) - thickness` for each point to build a bottom. It may cause thickness problems when slopes is high. The `"HULL_FACES"` value can solve the problem but is slow. When assigning `"LINES"`, it uses lines to connect points. The `"HULL_LINES"` is very very slow; however, the model might look smoother if you have a small `$fn`.
- `slicing` : Given a rectangle, we have two ways to slice it into two triangles. Using this parameter to determine the way you want. It accepts `"SLASH"` (default) and `"BACK_SLASH"`.
- `$fa`, `$fs`, `$fn` : Used by the `circle` or `sphere` module internally. It affects the speed of rending. For example, a large `$fn` may be very slow when rending. Check [the circle module](https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Using_the_2D_Subsystem#circle) or [the sphere module](https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Primitive_Solids#sphere) for more details. - `$fa`, `$fs`, `$fn` : Used by the `circle` or `sphere` module internally. It affects the speed of rending. For example, a large `$fn` may be very slow when rending. Check [the circle module](https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Using_the_2D_Subsystem#circle) or [the sphere module](https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Primitive_Solids#sphere) for more details.
## Examples ## Examples
@@ -25,7 +24,7 @@ Given a list of points `[x, y, f(x, y)]` where `f(x, y)` is a mathematics functi
function_grapher(points, thickness); function_grapher(points, thickness);
![function_grapher](images/lib2x-function_grapher-1.JPG) ![function_grapher](images/lib3x-function_grapher-1.JPG)
use <function_grapher.scad>; use <function_grapher.scad>;
@@ -50,7 +49,7 @@ Given a list of points `[x, y, f(x, y)]` where `f(x, y)` is a mathematics functi
function_grapher(points, thickness); function_grapher(points, thickness);
![function_grapher](images/lib2x-function_grapher-2.JPG) ![function_grapher](images/lib3x-function_grapher-2.JPG)
use <function_grapher.scad>; use <function_grapher.scad>;
@@ -76,31 +75,4 @@ Given a list of points `[x, y, f(x, y)]` where `f(x, y)` is a mathematics functi
function_grapher(points, thickness, style); function_grapher(points, thickness, style);
![function_grapher](images/lib2x-function_grapher-3.JPG) ![function_grapher](images/lib3x-function_grapher-3.JPG)
use <function_grapher.scad>;
function f(x, y) =
30 * (
cos(sqrt(pow(x, 2) + pow(y, 2))) +
cos(3 * sqrt(pow(x, 2) + pow(y, 2)))
);
thickness = 2;
min_value = -200;
max_value = 200;
resolution = 10;
style = "LINES";
slicing = "BACK_SLASH";
points = [
for(y = [min_value:resolution:max_value])
[
for(x = [min_value:resolution:max_value])
[x, y, f(x, y)]
]
];
function_grapher(points, thickness, style, slicing);
![function_grapher](images/lib2x-function_grapher-4.JPG)