Exponential Sine Curve across Points Grid

Hello all,

I’ve spent the last two weeks playing around with Sine curves (And had a lot of fun), but I can’t seem to figure out how to distribute Z-values based off an exponential sine curve formula across a grid of points (ie. 1…100…#25 cross-product laced).

I’ve replicated what I’m roughly after (Albeit, it should be more… sinuous) in the Conceptual Massing environment as shown below:

Anyone have any ideas how to do this? I’ll bet my bottom dollar is sublimely easy :smiley:
Sine Curve Tower

Maybe it’s not quite as easy as I thought!

As an addendum, the premise would be:

  1. X-Direction curves to start a a low amplitude Sine curve at the edge and ramp up to a rather ‘sharp’, high amplitude sine curve at the centre.

  2. Y-Direction to be the same. Geometry is the result of a loft over these.

It’s kind of Gaudi-esque…

Hi Sol,

Not sure if this is what you are looking for. The graph may not be very clean :slight_smile: Attached home2

Create a 2D set of points > Query both X and Y values

Assign a center (here 50, 50) > calculate the distance of each of the points to the center --> this acts as the parameter that will determine the amplitude of the damping curve and amplitude of the sin wave (I have used cos here since I want the peak to be at the center cos(0)=1)

Create sin and damping curves > Superimpose the amplitudes > Translate the original set of points by this value





Getting pretty close Elayabharath!

Is there any chance you could re-post your image? I can’t make out your nodes (unfortunately!).

Edit: Ignore that - I just saw your download link… it’s way to early here!

Hi Elayabharath and Sol, Elayabharath thank you for sample!

But if i open it, dynamo freezes and says that need new version.

I look at file and - Workspace Version=“” - i can’t find this version.


I have tested it by opening file on this version of Dynamo. (this is 0.7.5 release build).

After opening file you need to click on Proceed anyway button to continue opening file.

let me know if that doesn’t work for you.

Keep using Dynamo!!!



Attaching new image of EB’s graph as well as I am attaching another DYN which has a different approach to achieve the same results.

New DYN file… SineWave



Very cool Ritesh, many thanks!

Hello to all

I change workspace string to And all works. And don’t scold Elayabharath. :wink:


Sol, i’m sorry that i post in your topic

Hello all,

I tried playing around with all your definitions (very cool, many thanks), but still haven’t quite got what I’m looking for.

I’m after the following (illustrations at the bottom of the post).


A point grid of: 0…50…#100

x = 0, y = 0, z = sine curve translation

Sine curve = Factor*Math.Sin(X);

Each ‘point line’ would thus have a different factor associated with it up to half of the max lines (25 in this case).

Point Line 1 = Factor 1

Point Line 2 = Factor 2

And so on and so forth.


After getting my X-Axis sine curve working, I would mirror the point distribution to get something akin to the first post image in the X-Axis.

I would then rotate the point ‘cloud’ 90°, remove any co-incident points and create a new ‘cloud’ based off that - hopefully similar to the above image.

It should look something like below:




Very simple defintion.




First line. Second Line. Third Line … 10th Line.



Verbose version of what I’m after (part).

File: Sine_Curve_Mock_Up

How about some magicNode? :slight_smile:

(Tried to keep the python part minimal)

That’s pretty cool Mehmet, although I must admit Python is currently beyond me. I do dabble in coding so do understand it a little bit… high time to take that plunge I think!

Does this mean it’s not possible Out-of-the-Box in Dynamo? Or is Python just easier :smiley: ?

I’m sure it’s doable in Dynamo. It’s just easier in Python.

Don’t frighten yourself about Python. You don’t have to be a Guru for basic operations. I started by examining Nate’s codes (Lunchbox) and watched “Introduction to Computer Science and Programming Using Python” videos of MIT. (You can find them from MIT OpenCourseWare, EDX or youtube).

It’s dead simple to learn the BASICs.

Ah brilliant. I’ll do that then. Thanks for the heads up!

I think it’s even easier to do this with design script and a bit of lacing. Just keep in mind that python math works in radians and Dynamo math works in degrees. Following Mehmet’s example:



I hope this gets you started. I’ve commented as much as I could. I’m sure there is a better way of writing the same code. But for basic operations for the numbers we are dealing with the computational complexity doesn’t have a big hit on the efficiency.



You, you, you’re good you! (with Robert Deniro voice)

Ah awesome, thanks lads. I would prefer, for this example, to use DesignScript but Python is now off the ‘to-do’ list and on the ‘am-doing’ list :slight_smile:

I did start watching some of those MIT edX tutorials as well Mehmet and while I know most of that stuff (in general) so far, I’m learning tidbits which is cool.

Definitely excited to be learning Python.

@Mehmet: I had a look at your Python code, makes total logical sense. I agree it doesn’t look that bad to pick up and I’m reading/watching stuff where I can :slight_smile:

@Dimitar: I love how simple this is in DesignScript. I’ve been using your node and it’s doing 80% of what I’m after. Could you please explain to me something if you don’t mind?

I’ve added in an ‘offset’ value to take the points off the ground as indicated in the image below: Is there a way to add this to the Point.Add(v1) as a list? As in, I can get the offset to work as a static number (ie. 6), but cannot get it to populate offsets based off a list. I’m sure my syntax is somehow failing.

The intention would be to simulate that same sine curve in the opposite direction with an offset. So instead of having all the points along the edge at (X,Y,6), they would be (X,Y,(6-20)) or some such.

That way my ‘tower’ would have four corners ‘near’ the ground, and the intermediary points between said corners being the high points of a sine curve.

As below, the first orange box shows where I have added my Offset. I tried adding one in the second box as part of my: pts.Add(v1 + offset); and it didn’t work.

Code Block Sin Tower


You could try a combination of geometry.mirror and geometry.translate. What’s the effect you’re aiming for?