algorithmic modeling for Rhino
Hey,
I'm working on a definition which would divide a curve into smaller pieces/place points on it with changing density.
This in itself seems pretty easy, but what I want is being able to control several other things:
1. the minimum and maximum spacing between points (a certain 'x' and 'y');
2. the jump between two next points - let's say it is always 2. So if a minimum possible spacing is 'x' (pt.1) then the next one would be x+2, then x+4, x+6 etc. until it gets to x+n=y (the maximum);
3. how many maximum/minimum points there are in a row - when a division reaches the minimum 'x' or maximum 'y distance I want it to stay there for a while (e.g. [...] x+(n-2), x+n=y, y, y, y, y, x+(n-2), x+(n-4)...)
Therefore, what I want to get after dividing the base curve are curve pieces of following lenghts/points on the curve with following distances between them (for example):
x, x, x, x+2, x+4, x+8 . . . x+n, y, y, y, y, y, x+n . . . x+4, x+2, x, x, x, x, x, x, x, x+2, x+4 . . . x+n, y, y, y, x+n . . . x-2, x, x, x, x, x-2 . . . and so on and on.
As you can see the amounts of x's and y's in a row changes (Rule no.3).
I've tried this with graphs and attractor points and got nowhere in almost 2 weeks (though I'm a beginner).. Perhaps someone here will have an idea :)
I'm attaching a picture of what I have in mind (may be easier to understand than what I wrote for some people :))
Cheers
Tags:
Awesome! Is it possible to make it 'world scale'?
Right now I can get the proportions between points right, but it seems that the distance of, let's say, 9 seems pretty random as it's not a 9cm/m/other units :)
Everything works perfectly, that's exactly what I needed!
Thank you! :D
Though, I have one last question. Right now I can easily control the amount of repeats of the values in the middle of each 'pass'. Is it possible to control also the amount of the repeats in the beginning (and end) of each?
What I mean is that right now I can get [x, x+2, x+4, y, y, y, y, x+4, x+2, x] values where I can control the amount of 'y' repeats in the middle, but have no control over the amount of 'x' repeats in the beginning, which would be helpful as well :)
Found a stupid solution. Well, not really solution as it was there all the time - I blame 40 degrees Celcious outside for not thinking about it earlier. Gonna share it in case anyone else ever has the same problem:
I've just added a pass with a starting value = maximum value. This way I can get as many 'x' values as I want on both sides of each pass.
Thanks a lot again!
Cheers
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by