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

3D grids #8

Open
kaya3 opened this issue Sep 4, 2022 · 0 comments
Open

3D grids #8

kaya3 opened this issue Sep 4, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@kaya3
Copy link
Owner

kaya3 commented Sep 4, 2022

At the moment only 2D grids are supported, but it would be good to support 3D grids. This will necessarily require changes to many parts of the compiler:

  • Need to decide if a program with multiple grids must have them all 2D or all 3D, and choose a syntax for specifying whether a program or grid is 2D or 3D. (Perhaps grid {dim=3} ...?)
  • Tokenizer/parser needs to support that syntax and allow for 3D pattern literals. Probably use // for the separator in the z direction.
  • Pattern types and the Pattern class need a depth property.
  • 3D symmetry groups and functions to apply 3D symmetries to patterns.
  • If 2D and 3D grids can coexist, need to decide the semantics of a map statement between grids of different dimensions (or perhaps have a separate project statement?)
  • Position attribute expressions need to allow .z, but only for positions in 3D grids.
  • Grid index expressions in the compiler need to include a z * width * height term. Ideally, the compiler should not emit declarations like atZ = ... for 2D grids, but this adds complexity.
@kaya3 kaya3 added the enhancement New feature or request label Sep 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant