-
Notifications
You must be signed in to change notification settings - Fork 61
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
Going all meta with arrangements of objects (grids and more) #210
Comments
Interesting! A similar thought occurred to me a while ago, though much more limited, I was going to propose a syntax just for grids like:
which would be a shortcut roughly for:
But—and your proposal is proof of this—there are so many possible variations! Cubes, objects along vertices of other objects, etc. ProposalSo, this is kind of more than you asked for, but I'm going to propose something that crossed my mind. Combining user-definable functions with the thing you mentioned before: that it would be nice if users could save and share sketches. So this is a three part thing. 1) FunctionsCreate syntax for defining functions that can take a code block as an argument. Like
2) MacrosLetting users define rewrite rules that make these functions easier to write:
3) SharingAllow users to share sketches (just dump them to gist? that's pretty easy). And allow other users to import these sketches into their own sketch: Other thoughs:
So, I realize there is a lot potentially reinventing the wheel going on here, so this warrants some careful planning. And reading back, this might not even be an answer to your "cubes on a sphere" problem, because these user-defined functions probably won't have access to "the routines that generate the vertices of the three.js shapes" [davidedc]. But it is a nice way to separate LCL into high performance+powerful core code, and expressive/limitless user code. P.S. @davidedc / @rumblesan , I was looking at both of your blogs (the retina burn arts and 'errrord' respectively) and: very cool. |
I think we should break down these threads into separate issues (and you are welcome to do that), this is a lot of material to discuss, it's definitely not all going to fit in this one thread. What do you think specifically about the proposed objects-arrangement mechanism? (I think that this is a system-level thing that can be discussed on its own separately from functions/macro definitions and imports.) (thanks for the compliment btw - I'm glad that I got 1 visitor in the whole of 2013, I've got 100% appreciation rate at this point :-) |
Haha yes, I realized at the end of my text that it was a little off topic. My actual thoughts on object-in-template arrangements:
I think it's going to be hairy, and I have personally never wanted to do anything beyond (P.S. maybe you can enlighten me sometime as to the process you used to create some of the illustrative/figurative pieces in the series :) ) |
definitely think that some higher order functionality for adding grids and cubes of shapes is needed. 👍 to this left my comments to @noio 's thoughts on relevant issues. also glad you like the blog btw. for something that's entirely automated it's worked out pretty well :) |
Good spots, this is much more complicated than I thought. Let me try to defend this a bit more, I'll try some answers.
will be the same as
draws squares in a grid of proportion 2,1. Default detail means that there will be 2 squares
As for the orientation (and also, as an effect, the scale) - you are right unfortunately there are many many ways. For filling a volume for example, there is "straight" (all objects put in straight, like gold bars in a stack of gold), there is "radially" (like needles of a sea urchin), for a surface there is also "longitudinal" and "latitudinal" (if it's "radially symmetrical shape", with lines pointing like latitude and longitude lines), "randomly" and probably more. Sounds like we need an optional parameter then, something like:
And some values will apply in some cases and not in others, and we'll pick some defaults when that parameter is not given. Also we might need another parameter to indicate whether the scale of the objects should change as well (lines placed in latitude/longitude are not all the same size, lines at the equator are longer than lines at the poles)
I'm happy to get more challenges on this, I didn't think about the problems with orientations at all, it's more difficult than I first thought. But we don't need to do it all in one shot, we can do the simple grid cases first, maybe vertexes, and then see how it goes.? |
In regards to 4) I didn't mean language so much as geometry. (As in, do surfaces and lines have orientation? Is a box a collection of vertices, edges, surfaces, or a volume?) But I guess it's just the same as the other questions. It's going to be hard to implement this with a compact and orthogonal syntax that is easy to type. So I have another suggestion for brainstorming: how about a a literal object notation:
And then: edges would always be aligned to the edges themselves (latitudeAndLongitude), vertices are always radial, and volume is always straight. As a side note: surface and volume are going to be somewhat tricky (and relatively computationally expensive) to implement. |
Further comments after email exchange with "Patterning" author Phil Jones and also referencing the "Diagrams" Haskell package documentation (http://projects.haskell.org/diagrams/doc/quickstart.html), we could handle it like so:
or, with some vertex-specific operations like:
or, avoiding the
|
With Guy we were thinking some time ago that we might want a simplified way to make grids / cubes of objects.
Proposal for discussion: we could go all meta and use the block notation applied to primitives, and do the following:
The only attention point comes with the level of detail:
and so on and so forth.
It's going to be occasionally tricky to find ways to arrange objects according to a geometry and a given level of detail, but we can peek into the routines that generate the vertexes of the three.js shapes. Anyways, may be tricky but for sure doable.
Thoughts?
The text was updated successfully, but these errors were encountered: