Skip to content
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

Merged
merged 64 commits into from
Apr 21, 2024
Merged

feat: add NumberGlyph visualizer #231

merged 64 commits into from
Apr 21, 2024

Conversation

liammulh
Copy link
Member

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.

@liammulh liammulh changed the title Seq color visualizer feat: add sequence color visualizer Dec 20, 2022
Copy link
Member

@katestange katestange left a 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.

if (
this.sketch.keyIsDown(this.sketch.RIGHT_ARROW)
&& this.firstDraw == false
) {
Copy link
Member

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.

Copy link
Member

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

Copy link
Collaborator

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.

@katestange
Copy link
Member

My most recent commit attempts to handle possible bigint errors but it doesn't do a great job... suggestions appreciated.

@katestange
Copy link
Member

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.

@katestange katestange changed the title feat: add sequence color visualizer feat: add NumberGlyph visualizer Jan 18, 2023
@katestange katestange marked this pull request as draft April 21, 2024 03:26
@katestange katestange marked this pull request as ready for review April 21, 2024 05:34
@katestange katestange requested a review from gwhitney April 21, 2024 05:35
@gwhitney
Copy link
Collaborator

I took the liberty of fitting the square of glyphs to the canvas, and I found a way in this case of avoiding the {} as p5.Vector TypeScript hack. So just went ahead and committed those minor changes.

@gwhitney
Copy link
Collaborator

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.

@gwhitney
Copy link
Collaborator

OK, have tested all of the other open points and resolved them, so I will now take care of the negative growth function values.

@gwhitney
Copy link
Collaborator

Alright, now just the absolute value of the brightness function is used (and I dropped the outer abs from the default brightness function). I don't see anything else, so merging.

@gwhitney gwhitney merged commit 2d31066 into main Apr 21, 2024
2 checks passed
@gwhitney gwhitney deleted the seq_color_visualizer branch May 18, 2024 21:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants