# How doi update the coordinates of a ShapeGeometry?

I created an object using ShapeGeometry with the coordinates `{ x: -100, y: 0, z: -100 }, { x: 100, y: 0, z: -100 }, { x: 100, y: 0, z: 100 }, { x: -100, y: 0, z: 100 }`.
I then placed a blue circle at the coordinate `-90, 0, -90` and a red circle at `90, 0, -90`.
After that, I created a group, added these objects to the group, and rotated the group 90 degrees to the left around the Y-axis.
As a result, the red circle is at the top left and the blue circle is at the bottom left.

However, when I check the position of the red circle, it shows `-90, 0, -90` instead of `90, 0, -90`. How can I find out the position before the rotation?

``````const raycaster = new THREE.Raycaster();
const group = new THREE.Group();

const y = 0;
const points = [
{ x: -100, y, z: -100 },
{ x: 100, y, z: -100 },
{ x: 100, y, z: 100 },
{ x: -100, y, z: 100 },
];

const center = calculateCenter(points);
group.position.set(center.x, 0, center.z);
const shape = new THREE.Shape();
shape.moveTo(points[0].x, -points[0].z);
for (let i = 1; i < points.length; i++) {
shape.lineTo(points[i].x, -points[i].z);
}
shape.lineTo(points[0].x, -points[0].z);

const geometry = new THREE.ShapeGeometry(shape);
const material = new THREE.MeshBasicMaterial({ color: "yellowgreen" });
const mesh = new THREE.Mesh(geometry, material);
mesh.rotation.x = -Math.PI / 2;
mesh.name = "floor";
mesh.position.set(-center.x, 0, -center.z);

const geometry_circle = new THREE.CircleGeometry(5, 32);
const material_circle = new THREE.MeshBasicMaterial({
color: "blue",
});

const material_circle_2 = new THREE.MeshBasicMaterial({
color: "red",
});

const circle_1 = new THREE.Mesh(geometry_circle, material_circle);
const circle_2 = new THREE.Mesh(geometry_circle, material_circle_2);
// const circle_3 = new THREE.Mesh(geometry_circle, material_circle);
const circle_1_position = new THREE.Vector3(-90, 0, -90);
const circle_2_position = new THREE.Vector3(90, 0, -90);
circle_1.position.set(
circle_1_position.x - center.x,
0,
circle_1_position.z - center.z
);
circle_1.rotation.x = -Math.PI / 2;
circle_1.renderOrder = 1;

circle_2.position.set(
circle_2_position.x - center.x,
0,
circle_2_position.z - center.z
);
circle_2.rotation.x = -Math.PI / 2;
circle_2.renderOrder = 1;

group.rotation.y = Math.PI / 2;
mesh.updateMatrix();

function calculateCenter(points) {
let sumX = 0,
sumY = 0,
sumZ = 0;
points.forEach((point) => {
sumX += point.x;
sumY += point.y;
sumZ += point.z;
});
const count = points.length;
return {
x: sumX / count,
y: sumY / count,
z: sumZ / count,
};
}