Вы можете достичь этого с помощью чего-то вроде
var line = two.makeLine(center.x+circle.vertices[0].x, center.y+circle.vertices[0].y, center.x+circle.vertices[5].x, center.y+circle.vertices[5].y);
Обновление:
Вершины рисуются на основе выбранного разрешения
makeCircle: function(x, y, radius, resolution) {
var circle = new Circle(x, y, radius, resolution);
this.scene.add(circle);
return circle;
}
и
/**
* @name Two.Circle
* @class
* @extends Two.Path
* @param {Number} [x=0] - The x position of the circle.
* @param {Number} [y=0] - The y position of the circle.
* @param {Number} radius - The radius value of the circle.
* @param {Number} [resolution=4] - The number of vertices used to construct the circle.
*/
var Circle = function(ox, oy, r, resolution) {
// At least 2 vertices are required for proper circlage
var amount = resolution ? Math.max(resolution, 2) : 4;
var points = [];
for (var i = 0; i < amount; i++) {
points.push(new Anchor());
}
Path.call(this, points, true, true, true);
/**
* @name Two.Circle#radius
* @property {Number} - The size of the radius of the circle.
*/
this.radius = r;
this._update();
if (typeof ox === 'number') {
this.translation.x = ox;
}
if (typeof oy === 'number') {
this.translation.y = oy;
}
};
и
_update: function() {
if (this._flagRadius) {
// Coefficient for approximating circular arcs with Bezier curves
var c = (4 / 3) * Math.tan(Math.PI / (this.vertices.length * 2));
var radius = this._radius;
var rc = radius * c;
for (var i = 0, numVertices = this.vertices.length; i < numVertices; i++) {
var pct = i / numVertices;
var theta = pct * TWO_PI;
var x = radius * cos(theta);
var y = radius * sin(theta);
var lx = rc * cos(theta - HALF_PI);
var ly = rc * sin(theta - HALF_PI);
var rx = rc * cos(theta + HALF_PI);
var ry = rc * sin(theta + HALF_PI);
var v = this.vertices[i];
v.command = Commands.curve;
v.set(x, y);
v.controls.left.set(lx, ly);
v.controls.right.set(rx, ry);
}
}
Path.prototype._update.call(this);
return this;
}
https://github.com/jonobr1/two.js/blob/dev/src/shapes/circle.js#L23
Вы можете использовать библиотеку или математически рассчитать баллы