Grasshopper

algorithmic modeling for Rhino

Hi all, I have a surface which I've run a basic finite analysis on and which I've visualized in gh. I also distributed a bunch of pints along the bottom edge with a bezier graphmapper. Then I matched each of those points with the closest stress point form the stress analysis so each new point now contains a stress value. 

Now, what I want to do is somehow get to a situation where my graph mapper is controlled by the stress values. By that I mean I would like to see more points gather where the stress is greater.  

I can't seem to riddle it out. Any input would be greatly appreciated. 

 

Thanks

 

ps. link the the file path component at the beginning of the definition to the csv file. 

Views: 1615

Attachments:

Replies to This Discussion

Hey Bennett - 

 

It's not possible to drive the graph mapper component directly with other data. 

 

However, I can think of a couple approaches. A simple one would be to produce a very large number of points along the bottom curve and then cull out those below a certain stress value (with some degree of randomness added in so that you get a gradient of density.) This is easy, but the results are not so even. You will only achieve a nice gradient of density with a great many points. 

 

The second approach I can think of is fairly involved.

The density of points, when determined by a graph mapper, follows a relation whereby a shallower slope produces a denser set of points. Our ideal graph mapper should show a shallow slope where the stress is higher, and a steep slope where it is lower. 

If we graph the integral of the stress curve, it exhibits the opposite relation: it will show a steeper slope where the stress was higher, and a shallower slope where the stress was lower. 

Therefore, our ideal graph mapper would seem to follow the integral of the stress curve, but mirrored across the line x=y. This is equivalent to changing the function from yx = f(x) to x = f(y).

 

So we need to do the following things:

 

1. graph the stress curve

2. graph the integral of the stress curve

3. flip the graph over the x=y axis

4. use the resulting graph as a graph mapper. 

 

The attached definition shows how to do all those things, but I will try to summarize briefly here:

1. graph the stress curve

evaluate N evenly spaced points along the edge curve in question, and get the associated stress values for those points. You have already basically done this. Then remap the resulting values to XY points, where X = N evenly spaced values between 0 and 1 and Y = the associated stress values, remapped to the domain between 0 and 1. Connect the resulting points with a curve or polyline. The resulting graph will be visible at the origin in the top view.

2. graph the integral of the stress curve

place M evenly spaced points between 0 and 1 on the X axis. extend lines parallel to the Y axis from each point, and calculate the Y value of the intersection between this line and the stress curve graph. Calculate the area under the graph between each line, and then graph the resulting areas (remapped to 0:1) in a similar manner to that used to graph the stress curve.

3. flip the graph over the x=y axis

Swap X for Y in the XYZ point component in order to produce the graph. 

4. use the resulting graph as a graph mapper. 

Similar to the method used in step 2, create a series of P evenly spaced points along the X axis, extrude lines parallel to the Y axis, calculate the intersections to get the Y values, and then use the resulting Y values as the output of your "graph mapper."

 

 

Now I have to admit, my calculus is tremendously rusty, so I am not sure that all of this holds up logically, but it seems to produce the desired effect.

 

Hope it helps!

 

Andrew

PS whose studio is this for? seems cool, I don't know of other cornell professors making use of FEA in the past...

Ah almost forgot to attach the definitions. 1 is the cheap and easy way with culling, 2 is the integral method.
Attachments:
on second thought, step 3 is incorrect. It would be more correct to take the integral of one minus the stress curve. See attached...
Attachments:

Andrew Heumann you're my hero. Thanks so much for solving this for me. Definitely what I was looking for. 

This is for a digital studio with Lisa Iwamoto. She and her TA Chad Carpenter from Snohetta have been really terrific. It's a fun studio to have for my last here at Cornell. 

I hope you're having fun in Rome!

Hey Andrew, if you're interested in what I'm up to you can have a look at the definitions I'm attaching. I tried both versions you sent me and both have benefits, I'm not quite sure which I will use ultimately (both versions are baked in the rhino file) but the files I'm attaching show the first approach used twice, once for the bottom curve and once for the top. The points are then fed into a chunk of code I put together to draw curves on the surface. The goal is to generate a fibrous surface which localizes density around points of high stress.   

If you unhide the bottom two chunks of code you can see the way I was drawing the surface curves before by just adjusting the density with the graph mapper. I really appreciate your help getting past this point.  

Also, if you are interested I would really appreciate your help on the next task too. As of now I have surfaces which I generate as a translation between edge curves, points which densify according to stress on the edge curves, and surface curves which translate between those edge points. The final bit of information that I would like to feed this model is to evaluate points along the surface curves and make them responsive to "zones" of high stress on the surface. Those surface curves would them be a product of the start end end points which have data coded into them, and the evaluation points which react to other data points. I essentially see the high stress zones on the surface acting as attractors for the points along the surface curves. 

Please let me know if you have any recommended approaches for this. 

Anyone else is welcome to give input as well. 

 

Thanks!!

Attachments:

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service