Forums › Adobe Illustrator › Maintain equal perpendicular width between two curves? For Sankey Diagrams…
Maintain equal perpendicular width between two curves? For Sankey Diagrams…
Nitin Gadia
December 16, 2012 at 6:05 amI 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:
https://www.wri.org/image/view/11147/_originalThere is a decent sankey tutorial I found using the stacked column graph tool, but it doesn’t seem to use curved lines.
https://www.nelsonelson.com/wiki/index.php?title=Sankey_TutorialOf 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 🙂
Tylor Larson
December 17, 2012 at 8:00 pmwell 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. https://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.https://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
Nitin Gadia
December 19, 2012 at 3:43 amThe 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?
Tylor Larson
December 19, 2012 at 6:18 pmNitin Gadia
December 20, 2012 at 7:11 pmGreat, this solves everything.
I also posted this same question here, and both of you helped me:
https://www.talkgraphics.com/showthread.php?60868-Maintain-equal-perpendicular-width-between-two-curves-For-Sankey-Diagrams&p=462647As 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:
https://ramblings.mcpher.com/Home/excelquirks/d3/sankeyI’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.
Log in to reply.