Mobile app version of vmapp.org
Login or Join
Bryan765

: Why do triangles do this with alignment I know that a triangle's mathematical center is not it's "visual" center, meaning it doesn't look good when aligned using the align tool, you have to

@Bryan765

Posted in: #AdobeIllustrator #Alignment

I know that a triangle's mathematical center is not it's "visual" center, meaning it doesn't look good when aligned using the align tool, you have to use alternative methods. (Such as creating the triangle from the center and dragging outward proportionately)



Here's what puzzles me:

When I create the triangle from the center, and dragging out from the center, (You can see it's visually perfectly aligned and looks good). When I use the align tool it gets shifted over to that bad position.

Does that mean that holding down the Alt key doesn't actually properly align it to the center, and if so, is that a (better but possibly worse) fault in the drag from center tool (Hold down Alt key and drag)




Holding down Shift + Alt

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Bryan765

2 Comments

Sorted by latest first Latest Oldest Best

 

@Yeniel278

Center of an arbitrary object is a bit diffuse concept. See there are four possible centers for a triangle. those are:


Center of Gravity (COG), aka. Centroid,
Circumcenter,
Incenter,
and Orthocenter.


Plus then you have the bounding box (BB) center which illustrator uses, but wait there is more, we have the minimal BB center and... Over 6 centers to consider. A same sided triangle is a special case where all of those circle centers lie in the same point, but that is not generally true. So you see the poor programmer is out of luck, whichever he chooses somebody is going to disagree with the choice.

Granted that only COG, Circumcenter and BB center make some sense for general triangle solutions.



Image 1: Possible centers of a triangle. Click to zoom.

For an arbitrary shape its even more complex than this. Its a game that few programmers can afford to play, their career is at stake. So they choose simple over debatable.

Unfortunately next the logical choice, the COG, which @Metis is talking about wouldn't work for arbitrary triangles the way you envision. Circumcenter is too esoteric work as a general solution for arbitrary shapes.

References:


Triangle Centers, Math Open Reference


Also see:


Center of a bezier curve?
Circumcircle script by Hiroyuki Sato

10% popularity Vote Up Vote Down


 

@Murray976

Illustrator's align options use the bounding box as the area of definition, not the center point.

Therefore, when you click the align buttons, Illustrator is centering the triangle's bounding box within the circle's bounding box. It's not paying any attention to the actual center points.

The guides here represent the bounding boxes. (art shifts a bit when aligning, but they are the same size as you'll see at the end of the animation).


In addition, when you draw holding the Option/Alt key down, you draw from area center - meaning everything moves outward equidistant from that center point. When you align, you align on visual center (which is what the bounding box center is). You'll notice the triangle's bounding box center is not actually centered in the triangle's area, it's visual centered based on shape edges.

I WISH there was some mechanism to align on actual centers in Illustrator, but pretty much all alignment options use the bounding box as reference. There's also no ability to show area center within Illustrator, only visual center.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme