Properties
Category
English
Similar Topics
Statistics
Comments
4
Participants
3
Subscribers
27
Votes
3
Views
1986
Share
Answered
Hello!
I want to create a grid of points. The sequence command works nicely for a single line of the grid:
Sequence[(i,0),i,-5,5]
But I need two variables for the coordinates of the points. I tried nesting two sequence commands like this:
Sequence[Sequence[(i,j),i,-5,5],j,-5,5]
This does almost what I want. But instead of a list of points I get a list of lists of points like this:
{{(0,0),(1,0),(2,0),...}, {(0,1),(1,1),(2,1),...}, ...}
I can't display the points by clicking on this object.
Any ideas how I can display my grid of points?
Thanks a lot in advance!
- GeoGebra
- Help
- Partners
-
Contact us
- Feedback & Questions
- This email address is being protected from spambots. You need JavaScript enabled to view it.
- +43 677 6137 2693
© 2023 International GeoGebra Institute
I just realized that my sequence of sequences doesn't actually do what I wrote above. So I don't have a clue at all how to get the grid.
Only one sequence:
Sequence[(Div[n, 6], Mod[n, 6]), n, -30, 35]
Here’s a great example.
https://www.geogebra.org/m/kvRkTCec
I don’t think my previous link was particularly useful.
However, I just figured out how to modify abakus’ answer for 3D.
Sequence((Mod(i,n),Mod(Div(i,n),n),Div(i,n^(2))),i,0,n^(3)-1)
This creates an n×n×n cubic grid of points, starting at (0,0,0) and extending into the positive octant, i.e. (+,+,+). The numbers also increment in the order x, y, z which was more intuitive to me.
Comments have been locked on this page!