I’ve need of an algorithm to generate diamond-shaped patterns of arbitrary (but odd-numbered) XY dimensions and ramp rate.
I’ve got it. It works. But I feel dirty, like I’ve done this the really hard way. Can some kind soul take a look and see if I’m missing a more elegant approach? Right now I’m computing one quarter of the square, then flipping and trimming to get the whole thing. But every step feels more complicated than it should be.
Not quite an answer to your question, but sort of, you could create it in subd with reflections two directions. From there you could scale it non-uniformly to change proportions.
I’m almost out of my rookie GH year and I’m more and more effectively using geometry created in Rhino with history as the basis for my GH scripts. As an example nothing like yours, but I made the elements of this with subd, then awesome-o-fied it in GH.
I need to explore subd more, but most of my applications really need to be parametric. In this case, the number of XY points is derived from far-upstream choices.
Apart from your exact data and list-based approach, Sometimes simple to approach geometrically like the attached.
Moreover, you could be able to get even more fine-tuning withGraph Mapper.
Thanks, @HS_Kim. Always impressed at both your skills and willingness to help so many folks here on the forums.
That’s a really interesting approach, and way cleaner and more understandable and flexible than my list-based method. When I got to reversing, trimming, and appending lists, I knew something wasn’t right.