how to draw a circumference around the centroid of the geometry?

39 Views Asked by At

I am working on a task in which I have to project nodes (X and Y coordinates of nodes) of a point cloud to the circumference located exactly on the centre of gravity of the mesh (nodal Geometry). My question is how can I create a circumference on the geometry and divide it into 36 different parts and then how can I project the nodes on it.

What I have done? : I have found the centroid (Centre of Gravity) of the geometry. I I moved the geometry with its centroid and placed it on the reference point (0, 0). Now I have the same geometry, but with different coordinates which I have shown here below.

node_number X_coordinate    Y_coordinate
0            -1.0          -2.0
1            -1.0          -1.0
2            -1.0           0.0
3            -1.0           1.0
4            -2.0           1.0
5            -2.0           2.0
6            -1.0           2.0
7             0.0           2.0
8             1.0           2.0
9             2.0           2.0
10            2.0           1.0
11            1.0           1.0
12            0.0           1.0
13            0.0           0.0
14            0.0          -1.0
15            0.0          -2.0

I would like to project the nodes (coordinates shown above) onto the circumference which is divided into 36 pixels (parts). I have shown an example of that below in the picture.

For your refence: My goal is to make a vector or an array in python after flattening the circumference which will be having various values of nodes projected. Therefore my first goal is to draw a circumference on the geometry, divide it into 36 equal parts. Then projecting nodes to that circumference.

enter image description here