mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-22 06:13:10 +02:00
removed triangle indexes
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
# shape_pentagram
|
# shape_pentagram
|
||||||
|
|
||||||
Returns shape points and triangle indexes of a pentagram. 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 pentagram. They can be used with xxx_extrude modules of dotSCAD. The shape points can be also used with the built-in polygon module.
|
||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
|
|
||||||
@@ -10,7 +10,7 @@ Returns shape points and triangle indexes of a pentagram. They can be used with
|
|||||||
|
|
||||||
include <shape_pentagram.scad>;
|
include <shape_pentagram.scad>;
|
||||||
|
|
||||||
polygon(shape_pentagram(5)[0]);
|
polygon(shape_pentagram(5));
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
@@ -22,15 +22,14 @@ Returns shape points and triangle indexes of a pentagram. They can be used with
|
|||||||
include <polysections.scad>;
|
include <polysections.scad>;
|
||||||
include <golden_spiral_extrude.scad>;
|
include <golden_spiral_extrude.scad>;
|
||||||
|
|
||||||
shape_pts_tris = shape_pentagram(2);
|
shape_pts = shape_pentagram(2);
|
||||||
|
|
||||||
golden_spiral_extrude(
|
golden_spiral_extrude(
|
||||||
shape_pts_tris[0],
|
shape_pts,
|
||||||
from = 5,
|
from = 5,
|
||||||
to = 10,
|
to = 10,
|
||||||
point_distance = 1,
|
point_distance = 1,
|
||||||
scale = 10,
|
scale = 10
|
||||||
triangles = shape_pts_tris[1]
|
|
||||||
);
|
);
|
||||||
|
|
||||||

|

|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
/**
|
/**
|
||||||
* shape_pentagram.scad
|
* shape_pentagram.scad
|
||||||
*
|
*
|
||||||
* Returns shape points and triangle indexes of a pentagram.
|
* Returns shape points of a pentagram.
|
||||||
* They can be used with xxx_extrude modules of dotSCAD.
|
* They can be used with xxx_extrude modules of dotSCAD.
|
||||||
* The shape points can be also used with the built-in polygon module.
|
* The shape points can be also used with the built-in polygon module.
|
||||||
*
|
*
|
||||||
@@ -14,23 +14,9 @@
|
|||||||
|
|
||||||
function shape_pentagram(r) =
|
function shape_pentagram(r) =
|
||||||
[
|
[
|
||||||
// shape points
|
[0, 1], [-0.224514, 0.309017],
|
||||||
[
|
[-0.951057, 0.309017], [-0.363271, -0.118034],
|
||||||
[0, 1], [-0.224514, 0.309017],
|
[-0.587785, -0.809017], [0, -0.381966],
|
||||||
[-0.951057, 0.309017], [-0.363271, -0.118034],
|
[0.587785, -0.809017], [0.363271, -0.118034],
|
||||||
[-0.587785, -0.809017], [0, -0.381966],
|
[0.951057, 0.309017], [0.224514, 0.309017]
|
||||||
[0.587785, -0.809017], [0.363271, -0.118034],
|
] * r;
|
||||||
[0.951057, 0.309017], [0.224514, 0.309017]
|
|
||||||
] * r,
|
|
||||||
// triangles
|
|
||||||
[
|
|
||||||
[0, 1, 9],
|
|
||||||
[2, 3, 1],
|
|
||||||
[4, 5, 3],
|
|
||||||
[6, 7, 5],
|
|
||||||
[8, 9, 7],
|
|
||||||
[1, 3, 5],
|
|
||||||
[1, 5, 7],
|
|
||||||
[1, 7, 9]
|
|
||||||
]
|
|
||||||
];
|
|
Reference in New Issue
Block a user