Mobile app version of vmapp.org
Login or Join
Si6392903

: Horizontally distribute along path How can I horizontally distribute objects along a path? Blend and Brushes don't work for me because they distribute objects evenly according to the distance along

@Si6392903

Posted in: #AdobeIllustrator #Alignment #BlendingObjects #Brush

How can I horizontally distribute objects along a path? Blend and Brushes don't work for me because they distribute objects evenly according to the distance along the path.

I began by using the Blend method from this question. However, as shown below, the points aren't horizontally distributed as I would like. How do I get to the path and and objects displayed at the bottom of the figure below?

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Si6392903

2 Comments

Sorted by latest first Latest Oldest Best

 

@Correia448

If you can use a scripting environment that can detect bezier intersections, this is very easy to achieve. Unfortunately, Adobe does not include these methods in their scripting toolkit. Instead, I mainly use Scriptographer or Paper.js, but I believe Inkscape can find bezier intersections as well. Here's Mike Kamermans's excellent primer on the math for those interested: Bezier curve intersections.

The following is a script for paper.js / scriptographer that aligns a set of ungrouped, selected objects to the first intersection of the top-most selected path:

var sel = document.selectedItems;
var sel0 = sel[0];
sel.splice( 0, 1 );
var pathOffset = new Point( 0, 500 );
var line = new Path.Line( sel[0].position + pathOffset, sel[0].position - pathOffset );
for ( i = 0; i < sel.length; i++ ) {
line.position = sel[i].position;
lineIntersections = line.getIntersections(sel0);
if (lineIntersections !== null && lineIntersections.length > 0) {
sel[i].position = lineIntersections[0].point;
}
}
line.remove();


Here's a .gif of the process and result:

10% popularity Vote Up Vote Down


 

@Nimeshi706

You can easily distribute all the points so the space between them is even. Simply select the points and click the Distribute Horizontal Space button on the Align Panel. You'll then have to manually move the points vertically to meet your line.



If you do not see the Distribute Spacing options on the Align panel, Choose Show Options from the Align Panel menu.

There is no method, I'm aware of, which will evenly distribute objects horizontally while at the same time following a vertical contour without distorting the objects themselves.

Brushes will distort objects in 99.5% of cases. Blends, while capable of even distribution along their spine, are not capable of distribution which ignores the blend spine (which is what you are after).

I don't know if this fits your needs, but what about simply using a Dashed Stroke?



You could alter the gap distances where needed.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme