algorithmic modeling for Rhino
Hello everyone!
Im currently trying to generate a sine wave with graph mapper, but with the addition of having planar points to both the side of this wave.
So the goal would be to:
-Move the Sine wave around this domain
-Maintain always the same separation between points
-Change the domain extension of the sine wave, being the maximum length the entire original domain set.
I have been trying with consecutive domains component, but Im not sure its the answer, the sliders are pretty loose and the separation between points is not always the same.
Tags:
Hello David, thanks for you answer. Isnt there a way of keeping the graph mapper in this case? So that when the sine weave does not start at 0, there would be a "jump" from the moment the wave starts.
Also the sine curve does not seem to "move" along the domain of points. By this I mean to maintain the sine curve's domain length, but vary its position inside the greater domain. Practically to have the same shape of the curve, but more to the left or to the right.
You can't get much information out of the graph mapper. You'd need to figure out the wavelength and 'zero' peak, which is not accessible from the outside.
If you want to control the sine using the peak location instead of the start and end of the wave, you'll have to adjust the equation slightly. Then you can have one slider which moves the wave left and right, one which moves it up and down, and one which changes the length of it.
For some reason I cant reply to you @Laurent Delrieu.
Thanks for your help, thats an interesting approach, but it does not suit my need.
First off I only need one curve.
A slider that controls the curves position inside the domain, being 0 totally to the left, and 1 totally to the right.
A slider which controls the length of the curve, to both sides. So that the curve grows from the middle.
A slider that controls its amplitude.
A slider that controls its frequency.
Thats pretty much it.
Im afraid I cant, the formulas you guys so kindly provided are quite far from reaching those controls, and just by looking at these examples I am afraid I haven't acquired the knowledge to re arrange them.
Anyone please? How can these controls be achieved?
Here's a solution that doesn't utilize equations for the less mathematically inclined :P
You can also directly plug in values in to the bottom left Construct Domain to pin-point sine start/end instead as well.
Adjust the Sine wave in your mapper so the Y value is right at the top for the height (/amplitude) slider to become relevant. (or I guess you can eyeball it if it doesn't matter so much) Be careful that the wave is right in the middle as the y values of all the points on the right can become non-zero if its slightly off (in your example its just slightly off-center).
I tried replacing the Graph Mapper with a Sine component to simplify things (just had to change the preceding Remap target domain to '0 to Pi') but for some reason it doesn't look as smooth/nice.. whelp.
Rereading your question, did you also want the points to be equidistant in 2 dimensions, not just on the x-axis?.. in which case Interpolate(IntCrv) the result and Divide Curve to get equidistant points I guess.
Hope this one is a bit easier to digest for you
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
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by