Grasshopper

algorithmic modeling for Rhino

I have a conic surface that I created in Rhino using the loft command. I want to create a surface texture that looks like a bunch of hairs leaning on the surface. The end result should be similar to the following image of a hut. 


I do not have experience using kangaroo to simulate forces, but I have made a test using multiple random components on a flat surface to fake the effect I'm going for. See image below. 

The main issue I'm having is that the original file used for my test surface used box morph and the variable pipe command. Box morph is a bit touchy on a curved surface and it is not as elegant as I would like it to be (ie. I want all the hair diameters to be perfectly circular and uniform in size). Variable pipe also does not align the base of the hair with the existing surface, which means I have to offset the surface and then trim the excess of my pipe.....leading to heavy code and the file crashing. 

So I'm trying to rebuild the "hairs" using a new method:

1) Subdivide the surface

2) Find the midpoint of each surface and then create a straight line that is perpendicular

3) Move a point along the on the straight line (between the start and end points) in the z direction, and then create a nurbs curve using this point and the start and end points 

4) create a circle at the base of each crv, and then two more circles: one at the point in the middle point (I think I set it to .9) and the end of the curve

5) The problem: Now I am trying to sweep along these three circles and the nurbs curve to create a bent hair/pipe that is flush with the conic surface, but it does not work.

If someone can help that would be amazing. I've included my original surface test file and my new file where I am rebuilding using the sweep command. Below is a drawing of what I'm trying to achieve. 

Views: 3469

Attachments:

Replies to This Discussion

442 Megabytes!!!  WHAT!!?????  That's gonna hurt.  Will probably crash my machine.  Your bases surface(s) can't be that big?  But I can't see what your GH code does without a surface.  Actually, it looks like all your GH components are disabled?  I just tried baking the cone from my earlier code and using that but can't see anything at all.

OH!  You had 'Display | Shaded Preview' disabled - why?  Now I see that you have 80 X 55 'SFrames', which will be VERY SLOW.  I never understood why you abandon 'PopGeo'?  But that many points will be extremely slow either way.  I won't wait that long.

You're making this way too hard for me, bobbi.

I said early on that it's best to work with a very low count until everything works properly.  Solid unions are one of the ragged edges of Grasshopper; slow and prone to failure, depending on the complexity of the geometry (co-planar surfaces, etc.).

Good luck!

P.S.  I can see two problems here:

  1. Surface normal is in instead of out.
  2. You didn't 'Cap Holes' on the lofted tubes so they aren't solid "Closed Breps".

I have no clue what you're doing.  Do you?  :)

Sorry about that, my file crashed and I think I sent you the wrong one. Thanks for figuring that out. I flipped that surface in Rhino and it solved that. 

The thing is I don't want to cap the hairs (I like them to look more like tubes), although maybe this is my only option...

I actually think I will have to bring the populate surface back because it will look too bald otherwise... will update soon (hopefully have this figured out)

The code I posted earlier today had a "-x" expression on the 'Direction (D)' input of the 'Line SDL' to compensate for that.  Easy to have it either way.

You MUST have a "Closed Brep" to have a "solid".  Required for a solid union and/or printing.  Period.

How it looks is secondary to that.  I don't get holes at the end of "hairs" anyway?  Will they even be visible?  If you want that appearance, you will need some thickness to the tube walls.  Remember that after a solid union of multiple parts as a single "Closed Brep", it's still possible to manipulate, remove or replace surfaces - as long as you can get back to a "Closed Brep" before printing.

Have you considered taking advantage of symmetries and doing this as tiled sections?  Much less processing time to generate a fraction of the model, then replicate it.

P.S.  What I mean by "tiled sections" is to produce hairs for just 1/4th of the surface (for example), then rotate it three times to make the whole thing.

I'm just looking at your script now, it doesn't look like the heights are randomizing. Not sure why. I've turned the previews on for the nurb curves and it looks like something funky is going on. 

If I can figure out how to make these heights random i will call it a day/night on this one!! :)

Eureka! 

The z vector list was off. Just flattened it and now they are random. 

You didn't flatten it, you grafted it.  It works because it matches the grafted output of 'Line SDL'.  Sorry I missed that myself - and that you didn't notice it Saturday afternoon when I posted it.  ~43 posts on this thread in three days is straining my attention span.

Several issues have emerged here that go far beyond the original scope: "Loft between three circles on a Crv".  Like culling tubes whose base is off an edge, unless the edge is a seam ("naked edges" vs. interior edges).  Like creating solids, random lengths, bending and rotation, etc.  I still don't have the base surface(s) for your hut roof with openings as in your posted images, which certainly don't require a 442 MByte Rhino file!!

Ultimately, this is your project, not mine.  Working through all the details is a great way to learn.  There is no one perfect way.

Goose bumps hair-raising simulation for fun.^^~

See "this" and if you want more natural form finding by physics simulation, try using Kangaroo plug-in.

That is so cool! Thanks. 

I'll have to play around with this when I have some more time to spare. 

My classmates will appreciate this link thought thanks again!

I added code to cull points that are too close to the naked edges.  After fixing that random length bug, I noticed that all the longer ones were rotated in the same direction!?  So I changed the seed values for each 'Random' component.

Attachments:

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service