We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 379898e commit 0ecea40Copy full SHA for 0ecea40
1 file changed
js/secrets.js
@@ -56,20 +56,20 @@ for (var f in flowers) {
56
}
57
58
59
-function roseMath(v, k, t) {
+function roseMath(radius, v, k, t) {
60
v.x = radius * Math.cos(k * t) * Math.cos(t);
61
v.y = radius * Math.cos(k * t) * Math.sin(t);
62
return v;
63
64
65
-function makeFlowers() {
+function makeFlowers(radius) {
66
var flowers = [];
67
var resolution = 240; // every flower has 240 points
68
- for (var k = 4; k < 20; k++) {
+ for (var k = 4; k < 24; k++) {
69
var points = [];
70
for (var j = 0; j < resolution; j++) {
71
points[j] = new Two.Anchor();
72
- roseMath(points[j], k, Math.PI * 2 * j / resolution);
+ roseMath(radius, points[j], k, Math.PI * 2 * j / resolution);
73
74
// Create shape
75
var flower = new Two.Path(points, true, true);
0 commit comments