Cosine Spacing Plugin For Rhino

As I outlined in my post on my method for drawing airfoils in Rhino, the curves should be divided using a cosine spacing, rather than the typical division methods provided in Rhino.  I had a friend of mine whip up this plugin for me, and so it’s a little rough around the edges, but it gets the job done.  Here’s a user guide:

After you download it, unzip it, and then place it in your Plug-ins folder, which is inside your Rhinoceros 4.0 folder.  Then go to File->Properties->Rhino Options->Plug-ins to install the plugin.

Simply type CosSpacing on the Rhino command line to bring up the tool.

The first prompt will ask you how many segments you’d like to divide the curve into.   Enter the number and press enter.

The second screen can admittedly be a little confusing, but it’s where you toggle between full cosine spacing, and half cosine spacing.  The default setting is full cosine spacing, so if you want that, just press enter.  If you want half cosine spacing, click Half.  Notice that Half now displays as HalfToggle.  When you half cosine space, one end of your curve is tightly clustered with points, the other is much more spread out.  HalfToggle allows you to have the clustered points at either the curve start or the curve end.  If you simply hit enter now, the command would half cosine space a curve with the tightly clustered points at the curve start.  Not sure where your curve start is?  Esc out of the command, use the dir command to see where your curve starts.  I never use HalfToggle personally, I always check the dir of my curves before I run CosSpacing.

Okay, well now that we’ve made it past that, the rest is easy.  Just pick any curve, and it will be cosine spaced per your settings.  If you need to change the settings, like say from half to full, then you need to esc out of the command and the restart it.

Ready to cosine space your airfoils?  Okay, you can download the cosine spacing plugin for Rhino3D here.

4 Responses to “Cosine Spacing Plugin For Rhino”
  1. Just wanted to thank you for your very helpful and interesting TSpline webinar which I had the plesure to listen to. Not being into airfoils constructions I find your plugin useful for other applications as well.
    Herbert Schullin
    jewelry design
    Vienna Austria

  2. remonkna says:

    I appreciate it when people share their experience & knowledge as you have. Your making this plug-in available as well as your hard earned experience on how to keep topology orderly. I have tried 1-D extruding curves in the direction that stretches out the tighter bend, rebuilding the curve and then extruding it back to the original size, with fair success. I guess this is still necessary when the tight area is near mid-curve, but your cosine tool wins hands-down for the ends.
    Now- to get my head to intuitively work with your factors of two rule.

    Thanks, Ed Monk
    Naval Architect

    • Thanks Ed!

      With regards to the rule of 2, that’s really only important when you are using T-Splines. That rule of two really comes into play when you have a T-Spline surface that you want to join to something else. If you want to know more, and haven’t yet seen it, you can watch the previous webinar I did about maintaining accuracy with T-Splines.

      That really illustrates why you would want to use a rule of 2 when constructing a t-spline surface that needs to maintain accuracy.

      Another thing that I realized from feedback is that the cosine spacing approach is useful for much more than just airfoils. Airfoils are a nice special case, because the change in curvature of the curve is fairly constant, but there are many other areas where consine spacing can be applied with great results. A neat trick is to take any arbitrary curve in Rhino, and use the Curvature command to find the points of your curve where the curvature is at a maximum. You can split your curve at that point, then cosine space the sub-curves. Then, use InterpCrv to run a curve through your cosine spaced points. Hope this helps you in your projects.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: