Skip to main content

Timeline for Draw a Fibonacci Swoosh

Current License: CC BY-SA 4.0

9 events
when toggle format what by license comment
Apr 7, 2024 at 14:53 history edited z.. CC BY-SA 4.0
added 117 characters in body
Apr 7, 2024 at 4:54 comment added doubleunary Very nice! Tried to decrease recursion with a reduce() based Fibonacci but that did not help much. You can snip 9 bytes by replacing the second w(w,a1,,1) with z.
Apr 6, 2024 at 23:08 history edited z.. CC BY-SA 4.0
added 87 characters in body
Apr 6, 2024 at 22:57 comment added z.. @doubleunary, thanks! I implemented that suggestion (although we still need the , after the 1, or we get this instead of this) and fixed the line.
Apr 6, 2024 at 22:53 history edited z.. CC BY-SA 4.0
added 1417 characters in body
Apr 6, 2024 at 17:29 comment added doubleunary -14 bytes: =sort(sparkline(let(f,lambda(f,n,if(n<3,1,f(f,n-1)+f(f,n-2))),d,lambda(l,o,a,let(s,sequence(30*l+1,1),{s+o*30,sin(pi()*s/(30*l))*a*l})),w,lambda(w,k,o,a,if(k<3,d(1,o,a),{w(w,k-1,o,a);w(w,k-2,o+f(f,k-1),-a);d(f(f,k),o,a)})),w(w,A1,,1))))
Apr 6, 2024 at 17:25 comment added z.. ahh I see that makes sense! I've never used SPARKLINE before so I'm not very familiar with it. I'll look into it.
Apr 6, 2024 at 17:20 comment added doubleunary When sparkline() is used like this, it can only draw one continuous line. You could avoid the straight line by "tracking back" to the start position each time you finish a wave. See what happens if you swap the order of sort() and sparkline() and specify a low value for order.
Apr 6, 2024 at 16:51 history answered z.. CC BY-SA 4.0