Skip to main content
kphotopage
Legend
February 12, 2008
Question

Finding Geometric Center of Triangle, Star and Pentagon

  • February 12, 2008
  • 14 replies
  • 33586 views
http://img.photobucket.com/albums/v450/kphotopage/2007/2008/Want-Geometric-Center.gif

I am trying to find the geometric center of a triangle, star and a pentagon so I can align Group Spokes and cut the shapes.
What is Illustrators trick?
I do not want the center of the bounding box. I need the center of the shape.

I once had this thread bookmarked for later reference but the link no longer exist.

Centers of triangles.
http://www.adobeforums.com/webx?14@@.3bdfc3af/0

Thank you in advance. Ai CS3
Kathryn
    This topic has been closed for replies.

    14 replies

    kphotopage
    Legend
    February 12, 2008
    Kurt, Pure Genius!
    Thank you so much for concise instructions. It worked like a charm.

    I tried writing an Action.
    The only problem Object > Path > Average would not record. <sigh>

    James, if you could find your script, that would very helpful because I have a quantity of shapes where I need to find the centers.

    Thank you again. Kathryn
    Kurt Gold
    Community Expert
    Community Expert
    February 12, 2008
    A relatively easy way is to:

    1. Select the object
    2. Copy and Paste in Front
    3. Select > Object > Direction Handles
    4. Cmd+X (Cut); do not deselect
    5. Object > Path > Average: choose both axes
    6. View > Guides > Make Guides

    These steps can also be recorded as an action.
    xtassin
    Participant
    November 28, 2016

    Apologies for resuscitating an old thread but the solution given here (Kurt), as much as very attractive at first, is not correct... and I want to help people avoiding falling in the trap as I nearly did.

    Averaging the path give a center weighted by vertices and not an absolute geometric center of the shape itself.

    As shown on the picture, the shape is a circle with more points (vertices) on the left side. The averaged path solution gives a center that moves on the side with more vertices.

    As of now, I still do not have a solution that work in Illustrator.

    X.

    Monika Gause
    Community Expert
    Community Expert
    November 28, 2016

    xtassin schrieb:

    As of now, I still do not have a solution that work in Illustrator.

    Get the Subscribe plugin from Astute Graphics (it's free)

    Use the Line perpendicular from path tool

    Draw two lines into the center of the circle

    The center is where the lines meet.

    kphotopage
    Legend
    February 12, 2008
    James, that would be great if you could locate and send that Javascript.
    I do not know how to write scripts.

    I spent COUNTLESS hours yesterday trying to figure a quick and easy way to perfectly center align. Finally I threw in the towel.

    Kathryn
    JETalmage
    Inspiring
    February 12, 2008
    Actually, I think I have a Javascript floating around somewhere that does that, but I can't located it from here. I'll check when I get to my other machine.

    If you're a Javascript dabbler you might write one yourself. It's a simple matter of averaging the X and Y coordinates of the path's points to find the X and Y coordinates of its "center of gravity."

    JET