Grasshopper

algorithmic modeling for Rhino

 hi everyone 

hope you are all enjoying good spring weather.. 

I am trying to find max and min points on a wave i have created which follows sine patterns (i.e. sin(x) sin (4x)..etc.) so the wave is varying but not randomly. I am trying to find a way for the max and min points to be identified continuously as the wave changes as i want to use these points further along in my work. 

any ideas?

thanks...

Views: 7174

Replies to This Discussion

If it's a curve wave, then you can use the Curve Extremes component (Curve Tab, Analysis Panel, visible on the dropdown only). If it's a surface, then it will be somewhat harder.

--

David Rutten

david@mcneel.com

Poprad, Slovakia

Curve Extremes will only return the highest and lowest points but if you need to do every peak and trough then you will need to split the curve for each segment.

If you use the attached definition (written in 0.8.0066) then you can do this. It measures the vector angle along the curve to the next point and where the direction changes it splits the curve, so you get the highest point and the lowest of a hump or a trough but also the split points so you need to remove these with a Set Difference Componet

this method will also work on Perlins

.........

EDIT: to then find the Parameter t on the curve that these points are you would need the CP Curve component with the Set as input

Attachments:

Hi, i'm using vb-script and would like to use the curve-extreme-function. I couldn't find something like this in rhinocommon. Can you tell me, where to find it?

Thanks.

Tobias

umm, is this what you are looking for?

sorry for the late reply

Attachments:

hmm..

I wasn't getting the result i wanted with the extremes component... but i think danny's definition might do the trick. i am going to try it now, so i am not sure yet. 

thanks guys

Im doing the same stuff byt using grasshopper .6. No curve extremes component in this version. Any suggestions on how I can get the extreme points.

Instead of the Extreme component you could Divide the curve and sort the results based on their Z value (use a pComp component) and return the two extreme points.

I guess this is a little late, but here is a vb-script component that deals with local extremes on curves.

Sorry for poor comments on the code.

Best Regards

Toben

Attachments:

Late to the party! I was looking for a really simple no-addons script to get the extremes without the use of the extremes component. Found a simple way, where I compare the difference between the x-unit of each point, and do a couple of and/or gates to discover when the direction of movement changes. Simpler to script than to explain...

Cheers!

Attachments:

RSS

About

Translate

Search

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service