add tie shape

This commit is contained in:
yuanchuan 2017-05-29 15:35:25 +08:00
parent 986abe32af
commit 6c7b0e5bf8
4 changed files with 17 additions and 3 deletions

View File

@ -228,6 +228,13 @@ function astroid() {
return hypocycloid(4);
}
function tie() {
return polygon(theta => [
cos(theta),
sin(theta * 2) / 2
])
}
var shapes = Object.freeze({
circle: circle,
@ -241,7 +248,8 @@ var shapes = Object.freeze({
cross: cross,
clover: clover,
hypocycloid: hypocycloid,
astroid: astroid
astroid: astroid,
tie: tie
});
function index(x, y, count) {

2
css-doodle.min.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -93,3 +93,9 @@ export function hypocycloid(k = 3) {
export function astroid() {
return hypocycloid(4);
}
export function tie() {
return polygon(theta => [
cos(theta), sin(theta * 2) / 2
]);
}