Skip to main content

New answers tagged

2 votes

Finding Chord Segments with Integer Length

Charcoal, 75 bytes ≔⊕NθFθFιF⌕AX…¹θ²ΣX⊕⟦κι⟧²⊞υ⊕⟦κιλ⟧FυFυ¿∧⁼⌈ι⌈κ‹ικF…ι²Eօ겋⁺λμθ⭆¹⟦↔⁻λμ⁺λμ⌈ι Try it online! Link is to verbose version of code. Explanation: ...
Neil's user avatar
  • 185k
3 votes

Finding Chord Segments with Integer Length

Ruby, 126 bytes ->s{(t=*1..s).product(t,t).map{|i|r,x,y=i x==y||!(x*x+y*y<q=r*r)||(q-x*x)**0.5%1+(n=x+j=(q-y*y)**0.5)%1>0||n>s||p([j-x,n,r])}} Try it ...
Level River St's user avatar
4 votes

Finding Chord Segments with Integer Length

Python3, 256 bytes ...
Ajax1234's user avatar
  • 9,189
4 votes

Finding Chord Segments with Integer Length

JavaScript (V8), 121 bytes A naive solution that prints the triplets m n r. ...
Arnauld's user avatar
  • 207k
0 votes

A single pixel moving in a circular path

Setanta, 166 165 bytes Setanta has a function to sleep for a certain interval but no function to get the current time, so the time required for one revolution might be slightly greater than 60 seconds....
bb94's user avatar
  • 3,948
2 votes

A single pixel moving in a circular path

assembly, 75 bytes As DOS is already running in the graphics video mode 19, no video setup was needed. Since this program is destined to run indefinitely, I have simply set the BIOS timer to zero so ...
Sep Roland's user avatar
0 votes

A single pixel moving in a circular path

TIC-80 Lua, 82 bytes i=0 function TIC()cls(12)pix(120+60*math.cos(i),68+60*math.sin(i),1)i=i+.00173 end
janAkali's user avatar
  • 449
0 votes

A single pixel moving in a circular path

Uiua, 50 bytes Full program, outputs a 100x100 pixel GIF with 1 fps, circle starting at 3 o'clock and walking clockwise around in one minute. ...
ojdo's user avatar
  • 1,025
1 vote

A single pixel moving in a circular path

Scratch, 145 122 bytes Try it here Should work in any framerate, though it won't update as smoothly. Now works only on 30 FPS (the default) so don't activate Turbo Mode. The circle is of radius 180 ...
Rhaixer's user avatar
  • 3,095

Top 50 recent answers are included