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

Canvas should be 101x101 #5

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

gingerbeardman
Copy link

@gingerbeardman gingerbeardman commented Nov 23, 2024

  • I have no idea if the examples will also need to be changed

@dribnet
Copy link

dribnet commented Nov 23, 2024

Thanks Matt for this first version. My intuition is that this change would make the canvas 101 pixels wide, but by allowing x=101 and not x=0 as in the original implementation (and similarly for y) - but would be happy to be wrong on this if I'm reading it wrong. I would also double check other dbn commands which were meant to operate over the same range of 0 to 100 inclusive like pen and paper as those often had logic that tied directly to the canvas, such as can be found in the dbn introduction

Paper 0
Pen 100
Repeat A 0 100
{
  Pen A
  Line A 0 A 100
}

gradation

@dribnet
Copy link

dribnet commented Nov 23, 2024

Here's a useful unit test for this change.

// symmetric canvas test
Paper 20
Pen 100
Line 0 0 0 100
Line 50 0 50 100
Line 100 0 100 100

Current result:
current_dbn

Expected result:
expected_dbn

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.

2 participants