From d90b0c20fcdcc89f9e3fa092969858b0a0ebd407 Mon Sep 17 00:00:00 2001 From: Justin Lin Date: Mon, 4 Apr 2022 16:31:44 +0800 Subject: [PATCH] update doc --- docs/lib3x-sf_thickenT.md | 31 ++++++++++++++----------------- 1 file changed, 14 insertions(+), 17 deletions(-) diff --git a/docs/lib3x-sf_thickenT.md b/docs/lib3x-sf_thickenT.md index f9538912..09e1e512 100644 --- a/docs/lib3x-sf_thickenT.md +++ b/docs/lib3x-sf_thickenT.md @@ -14,22 +14,20 @@ It thickens a surface with triangular mesh. use ; radius = 100; - width = 2; thickness = .2; a_step = 10; r_step = 0.2; - function f(x, y) = (pow(y,2)/pow(2, 2))-(pow(x,2)/pow(2, 2)); + function f(x, y) = (y^2 - x^2) / 4; points = [ - for(a = [a_step:a_step:360]) - for(r = [r_step:r_step:2]) - let( - x = round(r * cos(a) * 100) / 100, - y = round(r * sin(a) * 100) / 100 - ) - [x, y, f(x, y)] + for(a = [a_step:a_step:360], r = [r_step:r_step:2]) + let( + x = round(r * cos(a) * 100) / 100, + y = round(r * sin(a) * 100) / 100 + ) + [x, y, f(x, y)] ]; sf_thickenT(points, thickness); @@ -44,14 +42,13 @@ It thickens a surface with triangular mesh. thickness = .2; points = [ - for(u = [0:u_step:360]) - for(v = [-1:v_step:1]) - let( - x = (1 + v / 2 * cos(u / 2)) * cos(u), - y = (1 + v / 2 * cos(u / 2)) * sin(u), - z = v / 2 * sin(u / 2) - ) - [x, y, z] + for(u = [0:u_step:360], v = [-1:v_step:1]) + let( + x = (1 + v / 2 * cos(u / 2)) * cos(u), + y = (1 + v / 2 * cos(u / 2)) * sin(u), + z = v / 2 * sin(u / 2) + ) + [x, y, z] ]; triangles = tri_delaunay([