1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-07 15:26:39 +02:00

update doc

This commit is contained in:
Justin Lin
2022-04-04 16:31:44 +08:00
parent 438e9cfd93
commit d90b0c20fc

View File

@@ -14,22 +14,20 @@ It thickens a surface with triangular mesh.
use <surface/sf_thickenT.scad>; use <surface/sf_thickenT.scad>;
radius = 100; radius = 100;
width = 2;
thickness = .2; thickness = .2;
a_step = 10; a_step = 10;
r_step = 0.2; 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 = [ points = [
for(a = [a_step:a_step:360]) for(a = [a_step:a_step:360], r = [r_step:r_step:2])
for(r = [r_step:r_step:2]) let(
let( x = round(r * cos(a) * 100) / 100,
x = round(r * cos(a) * 100) / 100, y = round(r * sin(a) * 100) / 100
y = round(r * sin(a) * 100) / 100 )
) [x, y, f(x, y)]
[x, y, f(x, y)]
]; ];
sf_thickenT(points, thickness); sf_thickenT(points, thickness);
@@ -44,14 +42,13 @@ It thickens a surface with triangular mesh.
thickness = .2; thickness = .2;
points = [ points = [
for(u = [0:u_step:360]) for(u = [0:u_step:360], v = [-1:v_step:1])
for(v = [-1:v_step:1]) let(
let( x = (1 + v / 2 * cos(u / 2)) * cos(u),
x = (1 + v / 2 * cos(u / 2)) * cos(u), y = (1 + v / 2 * cos(u / 2)) * sin(u),
y = (1 + v / 2 * cos(u / 2)) * sin(u), z = v / 2 * sin(u / 2)
z = v / 2 * sin(u / 2) )
) [x, y, z]
[x, y, z]
]; ];
triangles = tri_delaunay([ triangles = tri_delaunay([