mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-04-13 02:31:58 +02:00
removed triangle indexes
This commit is contained in:
parent
062ef1f20c
commit
b0a1b93b0f
@ -1,6 +1,6 @@
|
||||
# shape_superformula
|
||||
|
||||
Returns shape points and triangle indexes of a [Superformula](https://en.wikipedia.org/wiki/Superformula) shape. They can be used with xxx_extrude modules of dotSCAD. The shape points can be also used with the built-in polygon module.
|
||||
Returns shape points of a [Superformula](https://en.wikipedia.org/wiki/Superformula) shape. They can be used with xxx_extrude modules of dotSCAD. The shape points can be also used with the built-in polygon module.
|
||||
|
||||
## Parameters
|
||||
|
||||
@ -13,22 +13,22 @@ Returns shape points and triangle indexes of a [Superformula](https://en.wikiped
|
||||
|
||||
phi_step = 0.05;
|
||||
|
||||
polygon(shape_superformula(phi_step, 3, 3, 4.5, 10, 10)[0]);
|
||||
polygon(shape_superformula(phi_step, 3, 3, 4.5, 10, 10));
|
||||
translate([3, 0])
|
||||
polygon(shape_superformula(phi_step, 4, 4, 12, 15, 15)[0]);
|
||||
polygon(shape_superformula(phi_step, 4, 4, 12, 15, 15));
|
||||
translate([6, 0])
|
||||
polygon(shape_superformula(phi_step, 7, 7, 10, 6, 6)[0]);
|
||||
polygon(shape_superformula(phi_step, 7, 7, 10, 6, 6));
|
||||
translate([9, 0])
|
||||
polygon(shape_superformula(phi_step, 5, 5, 4, 4, 4)[0]);
|
||||
polygon(shape_superformula(phi_step, 5, 5, 4, 4, 4));
|
||||
|
||||
translate([0, -4])
|
||||
scale(0.8) polygon(shape_superformula(phi_step, 5, 5, 2, 7, 7)[0]);
|
||||
scale(0.8) polygon(shape_superformula(phi_step, 5, 5, 2, 7, 7));
|
||||
translate([3, -4])
|
||||
scale(0.25) polygon(shape_superformula(phi_step, 5, 5, 2, 13, 13)[0]);
|
||||
scale(0.25) polygon(shape_superformula(phi_step, 5, 5, 2, 13, 13));
|
||||
translate([6, -4])
|
||||
polygon(shape_superformula(phi_step, 4, 4, 1, 1, 1)[0]);
|
||||
polygon(shape_superformula(phi_step, 4, 4, 1, 1, 1));
|
||||
translate([9, -4])
|
||||
scale(0.3) polygon(shape_superformula(phi_step, 4, 4, 1, 7, 8)[0]);
|
||||
scale(0.3) polygon(shape_superformula(phi_step, 4, 4, 1, 7, 8));
|
||||
|
||||

|
||||
|
||||
@ -46,15 +46,14 @@ Returns shape points and triangle indexes of a [Superformula](https://en.wikiped
|
||||
n = 0.5;
|
||||
n3 = 16;
|
||||
|
||||
shape_pts_tris = shape_superformula(phi_step, m, m, n, n, n3);
|
||||
shape_pts = shape_superformula(phi_step, m, m, n, n, n3);
|
||||
|
||||
golden_spiral_extrude(
|
||||
shape_pts_tris[0],
|
||||
shape_pts,
|
||||
from = 5,
|
||||
to = 10,
|
||||
point_distance = 2,
|
||||
scale = 10,
|
||||
triangles = shape_pts_tris[1]
|
||||
scale = 10
|
||||
);
|
||||
|
||||

|
||||
|
@ -14,7 +14,6 @@
|
||||
|
||||
include <__private__/__ra_to_xy.scad>;
|
||||
include <__private__/__to_degree.scad>;
|
||||
include <__private__/__triangles_radial.scad>;
|
||||
|
||||
function _superformula_r(angle, m1, m2, n1, n2 = 1, n3 = 1, a = 1, b = 1) =
|
||||
pow(
|
||||
@ -34,11 +33,6 @@ function shape_superformula(phi_step, m1, m2, n1, n2 = 1, n3 = 1, a = 1, b = 1)
|
||||
)
|
||||
__ra_to_xy(r, angle)
|
||||
],
|
||||
shape_pts = concat([[0, 0]], pts, [pts[0]]),
|
||||
triangles = __triangles_radial(shape_pts)
|
||||
shape_pts = concat([[0, 0]], pts, [pts[0]])
|
||||
|
||||
)
|
||||
[
|
||||
shape_pts,
|
||||
triangles
|
||||
];
|
||||
) shape_pts;
|
Loading…
x
Reference in New Issue
Block a user