function initArcVertices(numSegments, radius, startAngle, arcAngle) {
    let theta = arcAngle / (numSegments - 1);
    let tangetialFactor = Math.tan(theta); // opposite / adjacent
    let radialFactor = Math.cos(theta); // adjacent / hypotenuse
	let position = new vec3(radius * Math.cos(startAngle), radius * Math.sin(startAngle), 0);
	halfCirclePointData = [];

    for (let i = 0; i < numSegments; i++) {
        halfCirclePointData.push(position);

        // Add the tangent vector and correct the position using the radial factor.
        let tangent = new vec3(-position.y, position.x, 0);
        position = vec3add(position, vec3mul(tangetialFactor, tangent));
        position = vec3mul(radialFactor, position);
    }
}
/**
 * Computes the points lying on the specified circle arc and stores them in @see halfCirclePointData.
 * @param {number} numSegments The number of segments to use to approximate the circle arc.
 * @param {number} radius The radius of the circle.
 * @param {number} startAngle The start angle of the circle arc (in radians).
 * @param {number} arcAngle The total angle of the circle arc (in radians).
 */
Computes the points lying on the specified circle arc and stores them in @see halfCirclePointData.
@param {number} numSegments The number of segments to use to approximate the circle arc.
@param {number} radius The radius of the circle.
@param {number} startAngle The start angle of the circle arc (in radians).
@param {number} arcAngle The total angle of the circle arc (in radians).
Computes the points lying on the specified circle arc and stores them in @see halfCirclePointData . @param { number } numSegments The number of segments to use to approximate the circle arc . @param { number } radius The radius of the circle . @param { number } startAngle The start angle of the circle arc ( in radians ) . @param { number } arcAngle The total angle of the circle arc ( in radians ) .
function initArcVertices(numSegments, radius, startAngle, arcAngle) {
    let theta = arcAngle / (numSegments - 1);
    let tangetialFactor = Math.tan(theta); 
    let radialFactor = Math.cos(theta); 
	let position = new vec3(radius * Math.cos(startAngle), radius * Math.sin(startAngle), 0);
	halfCirclePointData = [];
    for (let i = 0; i < numSegments; i++) {
        halfCirclePointData.push(position);
        let tangent = new vec3(-position.y, position.x, 0);
        position = vec3add(position, vec3mul(tangetialFactor, tangent));
        position = vec3mul(radialFactor, position);
    }
}
function initArcVertices ( numSegments , radius , startAngle , arcAngle ) { let theta = arcAngle / ( numSegments - 1 ) ; let tangetialFactor = Math . tan ( theta ) ; let radialFactor = Math . cos ( theta ) ; let position = new vec3 ( radius * Math . cos ( startAngle ) , radius * Math . sin ( startAngle ) , 0 ) ; halfCirclePointData = [ ] ; for ( let i = 0 ; i < numSegments ; i ++ ) { halfCirclePointData . push ( position ) ; let tangent = new vec3 ( - position . y , position . x , 0 ) ; position = vec3add ( position , vec3mul ( tangetialFactor , tangent ) ) ; position = vec3mul ( radialFactor , position ) ; } }
Computes the points lying on the specified circle arc and stores them in @see halfCirclePointData.
Computes the points lying on the specified circle arc and stores them in @see halfCirclePointData .
// opposite / adjacent // adjacent / hypotenuse // Add the tangent vector and correct the position using the radial factor.