Alternatively, join us on Discord.

+-Recent Topics

The Recamán Sequence (Code Golf)

Started by Juju, June 15, 2018, 01:55:44 am

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Juju

June 15, 2018, 01:55:44 am Last Edit: June 16, 2018, 07:54:49 pm by Juju
The Recamán Sequence is probably one of the most fascinating sequences in maths. It looks good, it sounds good too. Full explanation in the video below.

https://www.youtube.com/watch?v=FGC5TdIiT9U

The image featured in this video in particular, it looks pretty cool so I reproduced it in about 335 277 274 bytes.

Code (svg) Select
<svg xmlns="http://www.w3.org/2000/svg"><path id="p" stroke="#000" fill="none"/><script>/*<![CDATA[*/q=[];a="M2,325";for(s=i=0;i<65;)c=s-++i<=0||!!~q.indexOf(s-i),q.push(s+=j=i*c*2-i),a+="a1,1 0 0,"+(i%2^c)+" "+j+"0,0";document.all[1].setAttribute("d",a)//]]></script></svg>

Check this out!


Can you do better?
Read Zarmina!
YUKI-CHAAAANNNN
In the beginning there was walrii. In the end there will be walrii. All hail our supreme leader :walrii: --Snektron



if you wanna throw money at me and/or CodeWalrus monthly it's here

_iPhoenix_

Your code does not work for me (latest version of chrome, Mac); what browser are you using?
Please spam here: https://legend-of-iphoenix.github.io/spam/

"walruses are better than tuxedo chickens, all hail the great :walrii:" ~ me
Evolution of my avatar:

Juju

I use Vivaldi for Mac. So pretty much the same as you. And it works for me... weird. What did you do?
Read Zarmina!
YUKI-CHAAAANNNN
In the beginning there was walrii. In the end there will be walrii. All hail our supreme leader :walrii: --Snektron



if you wanna throw money at me and/or CodeWalrus monthly it's here

Powered by EzPortal