-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add NumberGlyph visualizer #231
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is transferring the review comments from the old branch.
src/visualizers/SeqColor.ts
Outdated
if ( | ||
this.sketch.keyIsDown(this.sketch.RIGHT_ARROW) | ||
&& this.firstDraw == false | ||
) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about negative terms? Right now it draws black. I suggest you just take the absolute values of terms, so that the sequences will converge. If you do this, you should also document this behaviour in the documentation above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed in a recent commit (except not yet documented). now it takes the absolute value of any growth function
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't seem to work; if I make a growth function that returns all negative values (like multiplying the default one by -1), I get a completely black canvas. Please could you do the abs-ing claimed here and document this aspect? If you don't get to it before I get back from my morning bike ride, I will do it when I get back, no problem.
…s of growth function
My most recent commit attempts to handle possible bigint errors but it doesn't do a great job... suggestions appreciated. |
I believe everything is dealt with here except for the issue that is blocked by issue #120 . Please take a look and resolve the open conversations or give feedback. |
I took the liberty of fitting the square of glyphs to the canvas, and I found a way in this case of avoiding the |
OK, all seems well except for negative growth function values, and I have to check a couple errors I left unresolved above but don't have time this second (they are probably fine though). Once that's all done I will merge. |
OK, have tested all of the other open points and resolved them, so I will now take care of the negative growth function values. |
Alright, now just the absolute value of the brightness function is used (and I dropped the outer |
By submitting this PR, I am indicating to the Numberscope maintainers that I have read and understood the contributing guidelines and that this PR follows those guidelines to the best of my knowledge. I have also read the pull request checklist and followed the instructions therein.
This is @LeongHouHeng's sequence color visualizer PR. We are continuing it based on a branch in this repository. The original PR, which was submitted from a fork is #191.