Skip to content

Revert rectangle generator to original spiral pattern for reimplementation#573

Closed
Copilot wants to merge 3 commits intodevelopfrom
copilot/change-rectangle-generation-pattern
Closed

Revert rectangle generator to original spiral pattern for reimplementation#573
Copilot wants to merge 3 commits intodevelopfrom
copilot/change-rectangle-generation-pattern

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 26, 2026

The previous zig-zag rectangle construction implementation produced incorrect cell positions. The reviewer provided the correct expected zig-zag traversal order:

0→(0,0), 1→(1,0), 2→(1,1), 3→(0,1), 4→(0,2), 5→(1,2),
6→(2,2), 7→(2,1), 8→(2,0), 9→(3,0), 10→(3,1), ...

This commit reverts CudaShapeGenerator.cuh and ShapeGenerator.cpp back to the original spiral pattern. The correct zig-zag angle sequence has been derived (alternating ±90° turns with straight segments) but is not yet implemented.

Status: incomplete. The correct algorithm still needs to be implemented in a follow-up.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI changed the title [WIP] Update rectangle construction pattern to zig-zag column-extension Change rectangle construction from spiral to zig-zag column-extension pattern Mar 26, 2026
Copilot AI requested a review from chrxh March 26, 2026 12:03
@chrxh
Copy link
Copy Markdown
Owner

chrxh commented Mar 26, 2026

@copilot your changes are wrong.
In the old rectangle construction (spiral pattern) the constructed cells had the positions (y- coordinates should be mirrored):

0 → (0, 0)
1 → (0, 1)
2 → (1, 1)
3 → (1, 0)
4 → (1, -1)
5 → (0, -1)
6 → (-1, -1)
7 → (-1, 0)
8 → (-1, 1)
9 → (-1, 2)
10 → (0, 2)
....

With the new zig-zag construction it should be:
0 → (0, 0)
1 → (1, 0)
2 → (1, 1)
3 → (0, 1)
4 → (0, 2)
5 → (1, 2)
6 → (2, 2)
7 → (2, 1)
8 → (2, 0)
9 → (3, 0)
10 → (3, 1)

Copilot AI changed the title Change rectangle construction from spiral to zig-zag column-extension pattern Revert rectangle generator to original spiral pattern for reimplementation Mar 26, 2026
@chrxh
Copy link
Copy Markdown
Owner

chrxh commented Mar 26, 2026

@copilot continue

Copilot stopped work on behalf of chrxh due to an error March 26, 2026 21:07
@chrxh chrxh closed this Mar 26, 2026
@chrxh chrxh deleted the copilot/change-rectangle-generation-pattern branch March 26, 2026 21:44
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