• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

How do you make a circle that is divided into 300 pieces of cake of equal size?

Guest
Jan 16, 2021 Jan 16, 2021

Copy link to clipboard

Copied

Can someone explain to me which steps it need? 

TOPICS
Draw and design

Views

261

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Guide , Jan 16, 2021 Jan 16, 2021

You can try this script.

var d = app.activeDocument.artboards[0].artboardRect;
var paths = app.activeDocument.pathItems;
var circle1 = paths.ellipse(d[3]/2+250, d[2]/2-250, 500, 500);
var polygon1 = paths.polygon(d[2]/2, d[3]/2, 250, 300);
var points1 = polygon1.pathPoints;
for (var i = 0; i < points1.length/2; i++) {
    var line1 = paths.add();
    var points2 = [points1[i].anchor, points1[i+150].anchor];
    line1.setEntirePath(points2);
}
polygon1.remove();

Votes

Translate

Translate
Adobe
Community Expert ,
Jan 16, 2021 Jan 16, 2021

Copy link to clipboard

Copied

Try the Polar Grid tool (hidden below the Line Segment tool)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Jan 16, 2021 Jan 16, 2021

Copy link to clipboard

Copied

You can try this script.

var d = app.activeDocument.artboards[0].artboardRect;
var paths = app.activeDocument.pathItems;
var circle1 = paths.ellipse(d[3]/2+250, d[2]/2-250, 500, 500);
var polygon1 = paths.polygon(d[2]/2, d[3]/2, 250, 300);
var points1 = polygon1.pathPoints;
for (var i = 0; i < points1.length/2; i++) {
    var line1 = paths.add();
    var points2 = [points1[i].anchor, points1[i+150].anchor];
    line1.setEntirePath(points2);
}
polygon1.remove();

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jan 16, 2021 Jan 16, 2021

Copy link to clipboard

Copied

Great, thanks! I tried the script and it works perfect. Can you explain to me how I can change the pieces from 300 to another number?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Jan 16, 2021 Jan 16, 2021

Copy link to clipboard

Copied

LATEST
var n = prompt("Enter even number ≥ 4", 4, "Number of circular sectors");
var d = app.activeDocument.artboards[0].artboardRect;
var paths = app.activeDocument.pathItems;
var circle1 = paths.ellipse(d[3]/2+250, d[2]/2-250, 500, 500);
var polygon1 = paths.polygon(d[2]/2, d[3]/2, 250, n);
var points1 = polygon1.pathPoints;
for (var i = 0; i < points1.length/2; i++) {
    var line1 = paths.add();
    var points2 = [points1[i].anchor, points1[i+n/2].anchor];
    line1.setEntirePath(points2);
}
polygon1.remove();

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines