Grasshopper

algorithmic modeling for Rhino

Hello,

I sorted a List of Doubles using an Array.

Now I want to increment the path each time a new number occurs. That the result looks like following:

My try at the moment looks like this:

Should be a really easy task for someone who knows.

Also not sure if its the adecuate method to do this,hope so, hehe.

Regards!

Views: 1125

Attachments:

Replies to This Discussion

The question is: who knows someone who knows?

Answers: The Lord, District 9, North Pole.

Attachments:

thanks Peter,

but its not exactly what I am after.

I want to change it like this:

Not just looking for unique numbers, but will save this one for my examples.

Get 4 ways to walk the walk (N3 is a bit tricky to get the gist of it, mind )

Attachments:

Added the 5th mode that is the best by a million miles (and requires no sort).

Of course is not the Jack for all trades ... but in this case is.

Attachments:

4 and 5 are nice, five obviously nicest(shortest).
Well edited this comment will think a bit of it to get clearer what I want.

Thanks for your help to this point.

Regards!

ok , was reading a little bit more about sorting but I am still not sure if I want to use some doubles as sortable keys to sort some geometry accordingly, is the array my friend? Also read about the zip function, but not sure what to use. And how, hehe.

like doing this:

For sorting sardines out of apples Use (ThenBy is optional and arbitrary):

pList = pList.OrderBy(x=>x.Z).ThenBy(x=>x.Y).ToList();

Other options:

(a) Use sorted Dictionary (key = point, value = point.Z),

(b) Sync sort using an Array,

(c) Use LINQ/queries in a variety of ways (see N3).

(d) Forget all that and learn windsurfing.

ok,thanks Peter, will try the Array thing,seems to be easiest for me.

I was asking me: the GH sort component, to be able to work on any geometry/data type how is it written is it some huge

if Curve {

 Curve[] crvsA = crvs.ToArray()}

if Point 3d{

Point3d[] ptsA = pts.ToArray()}

or is there a more generic way to avoid copying it for every type?

thanks!

No .. when I say sync Array (sync: synchronous) I mean other things.

Anyway ... see attached that makes chaos (good) and then restores order (bad). The thing is that if we had some boxes instead of Lines the Sort should be different (same for sardines etc etc) ... meaning that without a type (+ properties) what exactly to Sort? Answers: The Lord, blah, blah

For instance imagine that we have to Sort ducks ... but due to the Law of unintended consequences there's dogs around. What to do?

Attachments:

Whilst I'm working for a generic sort with regard ducks or dogs ( but not cats or alligators) ... see attached.

Big questions:

1. Why only one mode works?

2. Can we sort something without a property or that something?

3. What if we had boxes instead?

4. Can Lewis win at Monaco this w/e?

5. What does the Duck.CovertCount ? (see SDK).

Attachments:

Just rememberd the assign paths component from the human guy, think its part of tree frog, which does the same, would be interessting to know how it works.

Since I am not into f1 ask my coworker, whos really into it, and  she says Vettel will win, but wish you the best,hehe.

Whilst will have a look at your Line Sortings to get the gist.

ah and just stumbled over this thread a few days ago:

http://www.grasshopper3d.com/forum/topics/ptpanelgridquads-in-gh?x=...

I really like that stuff(Schlaich Bergermann und Partner as engineers), will try next week to get something similar.

Spend some minutes more on that Line thingy. See Methods

Finish the other thing as well.

The Yaz thingy is pointless since it engulfs an awful hotel (and kitsch: I've been there for the F1 event) with a canopy solely for aesthetics (Mies are you listening?). After WW3 (soon) all these things would be forgotten.

Moral: long is the path (and hilly)

Attachments:

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service