Skip to main content
improved ATO link
Source Link
Neil
  • 185.1k
  • 12
  • 77
  • 292

Charcoal, 73 70 bytes

≔⁶⁰θ⊞υ²⮌E³⁶⁰⪫⁺⟦∕⁻³⁶⁰κ²⟧E⁺·⁵×Xθ³⁺υ⊗⁻⊟υ⊞Oυ↔⊕XI1j∕ι¹⁸⁰⟦÷⌊λ×θθ﹪÷⌊λθθ﹪⌊λθ⟧ 

Attempt This Online!Attempt This Online! Link is to verbose version of code. Explanation:

≔⁶⁰θ

Assign \$60\$ to a variable because it gets used enough times to make it worthwhile.

⊞υ²

Set the "next" chord to \$2\$, so that the linear interpolation values for \$180°\$ become zero.

⮌E³⁶⁰⪫⁺

Map downwards from \$180°\$ to \$0.5°\$, with the final output reversed, joining together...

⟦∕⁻³⁶⁰κ²⟧

... the angle, and, ...

E⁺·⁵×Xθ³⁺υ⊗⁻⊟υ⊞Oυ↔⊕XI1j∕ι¹⁸⁰

...mapping over the current chord and the difference between the previous and the current chord, ...

⟦÷⌊λ×θθ﹪÷⌊λθθ﹪⌊λθ⟧

... convert to sexagesimal.

Chords are calculated by using the identity \$2|\sin(45x°)|=|i^{2-x}+1|\$ . Note that the although the variable containing the current chord is referenced before the actual calculation, it's actually a list and gets mutated to the correct value before it is mapped over.

Charcoal, 73 70 bytes

≔⁶⁰θ⊞υ²⮌E³⁶⁰⪫⁺⟦∕⁻³⁶⁰κ²⟧E⁺·⁵×Xθ³⁺υ⊗⁻⊟υ⊞Oυ↔⊕XI1j∕ι¹⁸⁰⟦÷⌊λ×θθ﹪÷⌊λθθ﹪⌊λθ⟧ 

Attempt This Online! Link is to verbose version of code. Explanation:

≔⁶⁰θ

Assign \$60\$ to a variable because it gets used enough times to make it worthwhile.

⊞υ²

Set the "next" chord to \$2\$, so that the linear interpolation values for \$180°\$ become zero.

⮌E³⁶⁰⪫⁺

Map downwards from \$180°\$ to \$0.5°\$, with the final output reversed, joining together...

⟦∕⁻³⁶⁰κ²⟧

... the angle, and, ...

E⁺·⁵×Xθ³⁺υ⊗⁻⊟υ⊞Oυ↔⊕XI1j∕ι¹⁸⁰

...mapping over the current chord and the difference between the previous and the current chord, ...

⟦÷⌊λ×θθ﹪÷⌊λθθ﹪⌊λθ⟧

... convert to sexagesimal.

Chords are calculated by using the identity \$2|\sin(45x°)|=|i^{2-x}+1|\$ . Note that the although the variable containing the current chord is referenced before the actual calculation, it's actually a list and gets mutated to the correct value before it is mapped over.

Charcoal, 73 70 bytes

≔⁶⁰θ⊞υ²⮌E³⁶⁰⪫⁺⟦∕⁻³⁶⁰κ²⟧E⁺·⁵×Xθ³⁺υ⊗⁻⊟υ⊞Oυ↔⊕XI1j∕ι¹⁸⁰⟦÷⌊λ×θθ﹪÷⌊λθθ﹪⌊λθ⟧ 

Attempt This Online! Link is to verbose version of code. Explanation:

≔⁶⁰θ

Assign \$60\$ to a variable because it gets used enough times to make it worthwhile.

⊞υ²

Set the "next" chord to \$2\$, so that the linear interpolation values for \$180°\$ become zero.

⮌E³⁶⁰⪫⁺

Map downwards from \$180°\$ to \$0.5°\$, with the final output reversed, joining together...

⟦∕⁻³⁶⁰κ²⟧

... the angle, and, ...

E⁺·⁵×Xθ³⁺υ⊗⁻⊟υ⊞Oυ↔⊕XI1j∕ι¹⁸⁰

...mapping over the current chord and the difference between the previous and the current chord, ...

⟦÷⌊λ×θθ﹪÷⌊λθθ﹪⌊λθ⟧

... convert to sexagesimal.

Chords are calculated by using the identity \$2|\sin(45x°)|=|i^{2-x}+1|\$ . Note that the although the variable containing the current chord is referenced before the actual calculation, it's actually a list and gets mutated to the correct value before it is mapped over.

added 383 characters in body
Source Link
Neil
  • 185.1k
  • 12
  • 77
  • 292

Charcoal, 7373 70 bytes

≔⁶⁰θF³⁶⁰⊞υ↔⊖XI1j∕⊕ι¹⁸⁰Eυ⪫⁺⟦∕⊕κ²⟧E⁺·⁵×Xθ³⟦ι⊗⁻§⁺υ⟦²⟧⊕κι⟧⟦÷⌊λ×θθ﹪÷⌊λθθ﹪⌊λθ⟧≔⁶⁰θ⊞υ²⮌E³⁶⁰⪫⁺⟦∕⁻³⁶⁰κ²⟧E⁺·⁵×Xθ³⁺υ⊗⁻⊟υ⊞Oυ↔⊕XI1j∕ι¹⁸⁰⟦÷⌊λ×θθ﹪÷⌊λθθ﹪⌊λθ⟧ 

Attempt This Online!Attempt This Online! Link is to verbose version of code. Explanation:

≔⁶⁰θ

Assign \$60\$ to a variable because it gets used enough times to make it worthwhile.

F³⁶⁰⊞υ↔⊖XI1j∕⊕ι¹⁸⁰⊞υ²

Calculate the chords ofSet the angles from \$0.5°\$"next" chord to \$180°\$ by using\$2\$, so that the identitylinear interpolation values for \$2|\sin(45x°)|=|i^x-1|\$\$180°\$ become zero.

Eυ⪫⁺⟦∕⊕κ²⟧E⁺·⁵×Xθ³⟦ι⊗⁻§⁺υ⟦²⟧⊕κι⟧⟦÷⌊λ×θθ﹪÷⌊λθθ﹪⌊λθ⟧ ⮌E³⁶⁰⪫⁺

Map over those chordsdownwards from \$180°\$ to \$0.5°\$, with the final output reversed, joining together...

⟦∕⁻³⁶⁰κ²⟧

... the angle, and, ...

E⁺·⁵×Xθ³⁺υ⊗⁻⊟υ⊞Oυ↔⊕XI1j∕ι¹⁸⁰

...mapping over the current chord in sexagesimal, and the doubled difference between thisthe previous and the nextcurrent chord in, ...

⟦÷⌊λ×θθ﹪÷⌊λθθ﹪⌊λθ⟧

... convert to sexagesimal.

Chords are calculated by using the identity \$2|\sin(45x°)|=|i^{2-x}+1|\$ . Note that the although the variable containing the current chord is referenced before the actual calculation, it's actually a list and gets mutated to the correct value before it is mapped over.

Charcoal, 73 bytes

≔⁶⁰θF³⁶⁰⊞υ↔⊖XI1j∕⊕ι¹⁸⁰Eυ⪫⁺⟦∕⊕κ²⟧E⁺·⁵×Xθ³⟦ι⊗⁻§⁺υ⟦²⟧⊕κι⟧⟦÷⌊λ×θθ﹪÷⌊λθθ﹪⌊λθ⟧ 

Attempt This Online! Link is to verbose version of code. Explanation:

≔⁶⁰θ

Assign \$60\$ to a variable because it gets used enough times to make it worthwhile.

F³⁶⁰⊞υ↔⊖XI1j∕⊕ι¹⁸⁰

Calculate the chords of the angles from \$0.5°\$ to \$180°\$ by using the identity \$2|\sin(45x°)|=|i^x-1|\$.

Eυ⪫⁺⟦∕⊕κ²⟧E⁺·⁵×Xθ³⟦ι⊗⁻§⁺υ⟦²⟧⊕κι⟧⟦÷⌊λ×θθ﹪÷⌊λθθ﹪⌊λθ⟧ 

Map over those chords, joining together the angle, the chord in sexagesimal, and the doubled difference between this and the next chord in sexagesimal.

Charcoal, 73 70 bytes

≔⁶⁰θ⊞υ²⮌E³⁶⁰⪫⁺⟦∕⁻³⁶⁰κ²⟧E⁺·⁵×Xθ³⁺υ⊗⁻⊟υ⊞Oυ↔⊕XI1j∕ι¹⁸⁰⟦÷⌊λ×θθ﹪÷⌊λθθ﹪⌊λθ⟧ 

Attempt This Online! Link is to verbose version of code. Explanation:

≔⁶⁰θ

Assign \$60\$ to a variable because it gets used enough times to make it worthwhile.

⊞υ²

Set the "next" chord to \$2\$, so that the linear interpolation values for \$180°\$ become zero.

⮌E³⁶⁰⪫⁺

Map downwards from \$180°\$ to \$0.5°\$, with the final output reversed, joining together...

⟦∕⁻³⁶⁰κ²⟧

... the angle, and, ...

E⁺·⁵×Xθ³⁺υ⊗⁻⊟υ⊞Oυ↔⊕XI1j∕ι¹⁸⁰

...mapping over the current chord and the difference between the previous and the current chord, ...

⟦÷⌊λ×θθ﹪÷⌊λθθ﹪⌊λθ⟧

... convert to sexagesimal.

Chords are calculated by using the identity \$2|\sin(45x°)|=|i^{2-x}+1|\$ . Note that the although the variable containing the current chord is referenced before the actual calculation, it's actually a list and gets mutated to the correct value before it is mapped over.

Source Link
Neil
  • 185.1k
  • 12
  • 77
  • 292

Charcoal, 73 bytes

≔⁶⁰θF³⁶⁰⊞υ↔⊖XI1j∕⊕ι¹⁸⁰Eυ⪫⁺⟦∕⊕κ²⟧E⁺·⁵×Xθ³⟦ι⊗⁻§⁺υ⟦²⟧⊕κι⟧⟦÷⌊λ×θθ﹪÷⌊λθθ﹪⌊λθ⟧ 

Attempt This Online! Link is to verbose version of code. Explanation:

≔⁶⁰θ

Assign \$60\$ to a variable because it gets used enough times to make it worthwhile.

F³⁶⁰⊞υ↔⊖XI1j∕⊕ι¹⁸⁰

Calculate the chords of the angles from \$0.5°\$ to \$180°\$ by using the identity \$2|\sin(45x°)|=|i^x-1|\$.

Eυ⪫⁺⟦∕⊕κ²⟧E⁺·⁵×Xθ³⟦ι⊗⁻§⁺υ⟦²⟧⊕κι⟧⟦÷⌊λ×θθ﹪÷⌊λθθ﹪⌊λθ⟧ 

Map over those chords, joining together the angle, the chord in sexagesimal, and the doubled difference between this and the next chord in sexagesimal.