Grasshopper

algorithmic modeling for Rhino

# March 22, 2012- Sine Wave

I decided to kick things off with a basic script- that I used in a seminar I taught- it helped beginners learn the idea of functions parametrics and its relationship to math/logic.

How do you make a sine wave?

Make a sine (cos, tan, etc.) curve who’s length, amplitude and frequency are controlled by sliders.

Views: 12692

### Replies to This Discussion

Here's mine using only Native Grasshopper Components

Attachments:

Also a Script version.

I was trying to achieve it with a "For Each item in t" approach but failed miserably so I'm looking forward to any submissions along those lines.

Attachments:

What sine wave really is...

Attachments:

Should have applied earlier, so my version wouldn't look like a ripoff of yours :D

Considering Rhino accepts 4 CPs for a circle to be a valid approximation, a sample every pi/2 should be enough. My version doesn't have phase control and length is guantized to quarter wavelenghts.... and start and end tangency needs fixing.

Attachments:

Beside - who will tell is drawing an exact sine wave is even possible with b-spline (low amount of control point is a must - 4-12)

Great Responses.

Danny- you win for most elegant from a scripting component

Mateusz- You definitely have the most creative interpretation.

The “solution” I had presented was most like Danny’s. However the formula i used is: F=(sin(x*y*pi)).

There are three versions of the same script. As you look below you will notice how the script goes from using a small kit of nodes used repetitively to simply to using a more streamlined logic.

To some fun I decided to have.

Attachments:

Nice. Any suggestions for making compounded sin waves, like an oscilloscope records when multiple piano keys are pressed?

Here's a file of the Variable Sine Curve described above, Benjamin.

Sorry its a bit late, I just figured it could be used in the future by someone searching for a similar technique..

Attachments:

...and how do you make a non- sinusoidal periodic waveform ? ( Square, Triangle, Sawtooth )

by June Lee

• View All