Skip to main content
New Participant
February 3, 2023
Question

How to create a polygon shape with each side a different length?

  • February 3, 2023
  • 6 replies
  • 3370 views

How do you assign differing side lengths to a basic polygon?

 

I understand that creating a s=1 for all sides is possible in the shape dialog box.

But, say for example, I wanted to creat a pentagon with side lengths: 1, 2, 1, 2, 1

And/or is there a way to apply the Python turtle-graphics approach to map out more complex sequences? (ie insert a seqence of lengths and angles)

 

See example:
sequences with s= 1,2,3... etc. (with various angles.)


Thanks for any thoughts or approaches.

This topic has been closed for replies.

6 replies

Jacob Bugge
Inspiring
February 13, 2023

Adam,

 

For changes like in your pentagon with side lengths: 1, 2, 1, 2, 1, you can use the native tools in the following kind of way, starting with the original pentagon, Smart Guides being your friends:

 

1) Create a circle with W = H = 4 times the original side length, with its centre snapped to the leftmost corner Anchor Point;

2) With the Direct Selection Tool Click the two bottommost corner Anchor Points, then ShiftClickDrag by the left one downwards to snap to the circle.

 

 

Click/RightClick to get closer, Click again to get closer still

Nancy OShea
Braniac
February 12, 2023

There are many ways to skin the proverbial cat. It all depends on what your output will be used for.  You could make a shape in Photoshop with the Polygon tool as I have here.

 

Or you can code one in Dreamweaver or any other code editor you wish to use. You have complete control over the number of points and where points begin & end.

https://www.w3schools.com/graphics/tryit.asp?filename=trysvg_polygon2

 

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Polygon SVG</title>
</head>

<body>
Polygon with 5 points, change point values to alter its shape
<svg viewBox="0 0 200 100" xmlns="http://www.w3.org/2000/svg">
<polygon points=
"0,100 
110,25 
120,75 
145,90 
153,75" 
fill="none" 
stroke="indigo" />
</svg>
</body>
</html>

 

Hope that helps.

 

Nancy O'Shea— Product User, Community Expert &amp; Moderator
Monika Gause
Braniac
February 12, 2023

To create the more complex shapes programmatically in Illustrator you could use JavaScript.

Nancy OShea
Braniac
February 3, 2023

Which Adobe software or service are you using?

 

Nancy O'Shea— Product User, Community Expert &amp; Moderator
jane-e
Braniac
February 3, 2023

@adamg66397417 

 

I would use Adobe Illustrator, as it has various features that will assist:

  • Draw lines, then use Join to make one shape
  • Construction guides to draw at a specific angle, such as 30°, 90°, or 17°
  • Smart guides assist throughout
  • Anchor points can be adjusted after drawing
  • Rotate and repeat rotation from a specific point
  • Snap to Point means precision
  • Tons more

 

Shall we move your post to the Illustrator forum?

 

Jane

New Participant
February 13, 2023

>>Shall we move your post to the Illustrator forum?

Yes, perhaps that would be best. Thanks everyone for respones.

kglad
Braniac
February 13, 2023

in the future, to find the best place to post your message, use the list here, https://community.adobe.com/

 

p.s. i don't think the adobe website, and forums in particular, are easy to navigate, so don't spend a lot of time searching that forum list. do your best and we'll move the post if it helps you get responses.

 

<moved from using the community>

kglad
Braniac
February 3, 2023

draw connected lines.

 

what app?