Create any shape layer. Go to contents and expand. Delete the current shape (Ellipse and etc.)
Click on the little right arrow icon next to Add. Click Path. Now expand path by clicking down arrow icon. Alt-Click on time-watch icon to create an expression.
Copy and Paste the following code.
JavaScript
// Expression for a shape layer's Path property to create a parametric circle with custom point amount
// Slider Controls
var radius = effect("Radius")("Slider"); // Circle's radius in pixels
var numPoints = effect("Points")("Slider"); // Number of points (minimum 3 for a valid circle)
var rotation = effect("Rotation")("Slider"); // Rotation offset in degrees
// Ensure there are at least 3 points
if (numPoints < 3) {
numPoints = 3;
}
var points = []; // Array to store the points of the circle
var inTangents = []; // Array for in tangents (zero for a polygon-like shape)
var outTangents = []; // Array for out tangents
var twoPi = Math.PI * 2;
// Loop through and calculate each point on the circle
for (var i = 0; i < numPoints; i++){
// Calculate angle for each point, add rotation offset (converted to radians)
var theta = twoPi * i / numPoints + degreesToRadians(rotation);
var x = radius * Math.cos(theta);
var y = radius * Math.sin(theta);
points.push([x, y]);
inTangents.push([0, 0]);
outTangents.push([0, 0]);
}
// Create the closed path for the circle using the calculated points
createPath(points, inTangents, outTangents, true);
Now we need to add some slider controls like below:

You need to connect Rotation, Fill Color, Stroke Color and Stroke Width manually one by one. If you don’t have Fill or Stroke options, create them by clicking right arrow icon next to Add.

Quick Tip : If you click on stop-watch icon on any parameter, you will see helix like icon where you can simply drag and connect any expression control.
