Title: Interesting research into your "disparity circle" formula along with a new, smoother one · Issue #22 · w0rthy/ArrayVisualizer · GitHub
Open Graph Title: Interesting research into your "disparity circle" formula along with a new, smoother one · Issue #22 · w0rthy/ArrayVisualizer
X Title: Interesting research into your "disparity circle" formula along with a new, smoother one · Issue #22 · w0rthy/ArrayVisualizer
Description: I was chatting in my Discord with Aphitorite on GitHub, and they actually dug into your "disparity curve" formula a bit. Some interesting stuff was discovered, and we wanted to share it with you! So first of all, we were talking about my...
Open Graph Description: I was chatting in my Discord with Aphitorite on GitHub, and they actually dug into your "disparity curve" formula a bit. Some interesting stuff was discovered, and we wanted to share it with you! S...
X Description: I was chatting in my Discord with Aphitorite on GitHub, and they actually dug into your "disparity curve" formula a bit. Some interesting stuff was discovered, and we wanted to share it w...
Opengraph URL: https://github.com/w0rthy/ArrayVisualizer/issues/22
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Interesting research into your \"disparity circle\" formula along with a new, smoother one","articleBody":"I was chatting in my Discord with Aphitorite on GitHub, and they actually dug into your \"disparity curve\" formula a bit. Some interesting stuff was discovered, and we wanted to share it with you!\n\nSo first of all, we _were_ talking about my modified version of your formula from my fork that's able to handle arbitrary array lengths, which is the following:\n```\ndouble len = ((ArrayVisualizer.getCurrentLength() / 2d) - Math.min(Math.min(Math.abs(i - array[i]), Math.abs(i - array[i] + ArrayVisualizer.getCurrentLength())), Math.abs(i - array[i] - ArrayVisualizer.getCurrentLength()))) / (ArrayVisualizer.getCurrentLength() / 2d);\n```\n\nYeah, I know... I didn't refactor it after changing it around, and the line of code it takes up is an absolute mess. _But_ it turns out that you had written up a partial triangle wave function (without using trig functions)!\n\nhttps://cdn.discordapp.com/attachments/592103638034415647/733325936417570926/SharedScreenshot.jpg\n\n_That's_ why the peaks of the disparity circle visual are always jagged! You can especially see that here:\n\nYour original formula:\nhttps://cdn.discordapp.com/attachments/592103638034415647/733197874434932807/Screenshot_516.png\n\nversus Aphitorite's new cosine wave formula:\nhttps://cdn.discordapp.com/attachments/592103638034415647/733197892264656946/Screenshot_515.png\n\nTheir new cosine wave formula is as follows:\n```\ndouble len = (1 + Math.cos((Math.PI * (array[i] - i)) / (ArrayVisualizer.getCurrentLength() * 0.5))) * 0.5;\n```\n\nI personally found this super fascinating; hope this was interesting for you too! ","author":{"url":"https://github.com/MusicTheorist","@type":"Person","name":"MusicTheorist"},"datePublished":"2020-07-16T16:15:29.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/22/ArrayVisualizer/issues/22"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:6950e3b2-a8f4-b84d-0cc3-02bca2e0644e |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B722:223E3:6C340:85429:6990D02E |
| html-safe-nonce | eaf5097faee6044930bd1d0c9976cc3663f6e80529ae4608fa1dfdff919956f5 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNzIyOjIyM0UzOjZDMzQwOjg1NDI5OjY5OTBEMDJFIiwidmlzaXRvcl9pZCI6IjkwMTUyMzg1NDkyODY5NTM0MiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | d1b035d4dce1cb50fe530579ee7cd62f86378924439dc2638342dbe2defa100a |
| hovercard-subject-tag | issue:658345978 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/w0rthy/ArrayVisualizer/22/issue_layout |
| twitter:image | https://opengraph.githubassets.com/d72e6abf21ebfb51e3a22612dbc3856494240009e490567c93b4841b3421da59/w0rthy/ArrayVisualizer/issues/22 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/d72e6abf21ebfb51e3a22612dbc3856494240009e490567c93b4841b3421da59/w0rthy/ArrayVisualizer/issues/22 |
| og:image:alt | I was chatting in my Discord with Aphitorite on GitHub, and they actually dug into your "disparity curve" formula a bit. Some interesting stuff was discovered, and we wanted to share it with you! S... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | MusicTheorist |
| hostname | github.com |
| expected-hostname | github.com |
| None | 42c603b9d642c4a9065a51770f75e5e27132fef0e858607f5c9cb7e422831a7b |
| turbo-cache-control | no-preview |
| go-import | github.com/w0rthy/ArrayVisualizer git https://github.com/w0rthy/ArrayVisualizer.git |
| octolytics-dimension-user_id | 4707345 |
| octolytics-dimension-user_login | w0rthy |
| octolytics-dimension-repository_id | 19898492 |
| octolytics-dimension-repository_nwo | w0rthy/ArrayVisualizer |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 19898492 |
| octolytics-dimension-repository_network_root_nwo | w0rthy/ArrayVisualizer |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 848bc6032dcc93a9a7301dcc3f379a72ba13b96e |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width