Hello, As a beginner I’m facing few challenges on creating an arced shaped polygon.
I have 3 positions:
let center = {x: 1544099.4685469768, y: 5443842.517738653, z: 2933662.238733839};
let pos1 = {x: 1542979.4544007997, y: 5444544.099535194, z: 2932960.5681547285};
let pos2 = {x: 1543430.2493222232, y: 5443358.603504639, z: 2934910.0218147836};
I want to create a filled semi-circle. I’m using polygon to create semi-circle. Here is the sandcastle link.
It is creating a triangle. But I want to give this triangle’s one edge to be arced in shape. For that I want to calculate the 360 degree circle from center to pos1 and from that circular points just want to get points between pos1 and pos2.
Hi @lennart.imberg , Thank you so much for showing interest and improving my code.
That’s really a nice idea, rather than creating single midpoint, you’ve created 200 points to create a fine curve.
It could be more perfect if let numOFsteps = 200;
Replace with: let numOFsteps = Math.abs(h1-h2);
Coz angle creating in center point can be lesser than contain 200 points.