FORUMS: list search recent posts

# Maintain equal perpendicular width between two curves? For Sankey Diagrams...

VIEW ALL
 Maintain equal perpendicular width between two curves? For Sankey Diagrams... on Dec 16, 2012 at 6:05:31 am

I want to be able to create a curved 4-sided polygon with equal perpendicular widths, like a thick bezier curve:

... but I want to do that with a shape, adding the curves, one at a time.

So, say I have "Curve 1". I want to create "curve 2" such that along any point on either curve, the perpendicular distance between the nearest point is equal.

You can't just copy and paste the same curve at a 45 degree angle, it bulges in the middle, like so:

The reason I want to do this is to create what is called a "sankey diagram", which shows quantitative flows, like the following image:

I want to be able to do a really nice one, like so:
http://www.wri.org/image/view/11147/_original

There is a decent sankey tutorial I found using the stacked column graph tool, but it doesn't seem to use curved lines.
http://www.nelsonelson.com/wiki/index.php?title=Sankey_Tutorial

Of course, I could approximate things by using bezier curves, but I can be much more exact by using separate curves.

Any help will be very greatly appreciated :)

 Re: Maintain equal perpendicular width between two curves? For Sankey Diagrams...on Dec 17, 2012 at 8:00:56 pm

well there are a few ways to pull this off.

1. I would draw a path the width I wanted... don't try and make a shape by hand. after you finished drawing the path simple expand it. Object/ Expand. This should make both sides of the curve equidistant.

2. http://park12.wakwak.com/~shp/lc/et/en_aics_script.html#dash_offset
this is a link to some very nice illustrator scripts. one of these might really help you.

3.http://www.astutegraphics.com/products/subscribe/
this is a wonderful plug in that is free. it does some great stuff. check it out i think the Connect tool with subscribe will give you what you need...

Ty

 Re: Maintain equal perpendicular width between two curves? For Sankey Diagrams...on Dec 19, 2012 at 3:43:16 am

The connect tool does look helpful.

As far as using the pen tool is concerned, the thing is, the pen tool can only approximate things as I expand the thickness, and I would like it to be exact, so that I use the stacks and connect the ends of two curves to the corners of each stack, and I can furthermore manipulate the curves as I wish. Does this make sense?

 Re: Maintain equal perpendicular width between two curves? For Sankey Diagrams...on Dec 19, 2012 at 6:18:55 pm

this is how i would do it... once i was done making all the arrows i would then expand the path and make custom arrow heads.

the green circles show that the path is equidistant over the whole length.

 Re: Maintain equal perpendicular width between two curves? For Sankey Diagrams...on Dec 20, 2012 at 7:11:13 pm

Great, this solves everything.

I also posted this same question here, and both of you helped me:

As I mentioned there:
Oh wow, yeah. I guess that can all work the same. I didn't realize you can snap to the grid, and that you can specify the grid size and can change the stroke size to any fraction. So you're right, I have total control with only using lines. No use in using excel, though that would be good for doing it on the fly.

That's the beauty of vectors I suppose :)

Here's another way of doing this that the other person gave, using excel. Amazing work by a developer:
http://ramblings.mcpher.com/Home/excelquirks/d3/sankey

I'm still going to use illustrator because it gives me more control for greater aesthetics, etc., but that's probably the best tool for being able to make them on the fly, once you set it up.