# Eval surface centrepoint and centroid obtained through area

Eval surface centrepoint and centroid obtained through area component are different. How are they different?

I just took a simple lofted surface and divided it into multiple faces using iso trim.

understanding of centre points.gh (11.3 KB)

Use surface closest point

understanding of centre points2.gh (10.9 KB)

My question is, what does eval surface do when picking the centre point of surface and what does area component do when picking the centre point of the surface ? Why are they different? There must be something in the way they process geometry differently. Yes?

The center points are not on the surface like the sphere and the ring

1 Like

Oh. Iām clear about the eval surface component.

So the area component calculates the centroid of the volume created if the surface was closed by closing its vertices, right?

For one thing, Evaluate Surface works on the underlying untrimmed surface while Area works separately on each of the 25 sub-surfaces returned by Isotrim.

For another thing, UV curves on a compound surface are not evenly spaced, so when you use the entire untrimmed surface, Evaluate Surface and Area may differ:

understanding_centre_points_2019Sep28a.gh (15.5 KB)

1 Like

I am a novice who is still understanding the foundation of how components work in Grasshopper. Kindly bear with me.

Okay, so you have now taken one surface now to simplify. I am still not able to understand here. Please correct me, the eval surf is working innacurately due to uneven spacing of u and v.

1. Why are u and v unevenly spaced? They are supposed to be equal divisions for u and v to help people do equal divisions of any surface for better outputs. Isnāt it?

2. So for precision, we should use area component, then use surface closest point for the area in order to find the centroid of a curvy surface. Right?

3. The area component here in your file calculates (in its own capacity) the centroid of the volume created as if if the surface was closed by closing its vertices, right?

Itās complicatedā¦ Iād rather not muddy the water by trying to say much about theory at this point but itās not quite as simple as your three assumptions.

Look at the white group below. If either the U or V curve split the surface in half by area, the two values in each yellow panel would be the same, or very nearly so. They are not, even when you move the point using the MD Slider to match the location of Area centroid.

understanding_centre_points_2019Sep28b.gh (18.8 KB)

1 Like

Okay. So what do you suggest for an appropriate method that splits up an uneven surface into four pieces of equal area and finds the centre based upon their intersection?

I learnt this eval surface method during a grasshopper workshop session in my city for finding the midpoint of surface. Upon further comparison with area component and getting enlightened by your script along with comparing the unequal areas, I am under the impression that the whole methodology of finding the centre point of a surface is being wrongly deployed by me.

I donāt have an answer for that, sorry. Clearly there are may possible ways to divide a surface into equal areas, such as dividing the total surface area by four, then creating three non-overlapping circles of that area. The fourth piece would be whatās left over. Probably not what you have in mind.

Hereās another example that shows the problem. To get higher precision, replace the MD Slider with two standard sliders and carefully adjust them manually such that both U and V isocurves split the surface area in half. You might think that if thatās the case, using the U and V curves together to split the surface (purple group) would yield four pieces of equal area - right? NO!

1 Like

What on earth ?!! This is so paradoxical. The exact same curves are creating 2 sets of totally different areas on the same large surface in the purple group. So now how to understand the foundation principles of this and come to terms with this counter-intuitive, unrealistic phenomenon?

Secondly, how do you find out centre points of curvy lofted surfaces in your own workflow ?

I trust Area āCā (Centroid) but it can be slow when hundreds or thousands of surfaces are in play. Depending on what Iām doing, approximate centroids derived from the average of discontinuity or perimeter curve division points can work fine instead.

Perhaps this will explain the missing piece of the puzzle? This surface is flat but the same principle applies to compound surfaces. Note that as long as you donāt split the surface in two or more pieces, the Area centroid for the joined squares is identical to the average of the Area centroids of the smaller squares:

understanding_centre_points_2019Oct2a.gh (13.6 KB)

This also explains how the Area centroid of a curvy surface may not be on the surface itself. Itās not the center of volume, itās effectively the average of an infinite number of tiny surface squares (so to speak). Irregular shapes will shift the center.

Note that in the previous example, if you split the whole surface in half (by area using āUā) and then split each half separately in half (using āVā), you would get four surfaces of equal area.

Okay, I am understanding partially here.

and

You are doing the same process in the scenario of first quote, right? I mean exactly the same procedure you have mentioned in the second quote?

ā¦
ā¦
ā¦

I am perfectly understanding the concept here in the flat surface, yet not able to relate it with curved surface due to it being curved and this being flat 10x10 surface. In curved surfaces, the U and V are unequally distributed overall, maybe that messes up the entire averaging and makes the centroid output counterintuitive?

No. I have demonstrated neither of those techniques anywhere in this thread.

You can see what Iām describing in the model I posted today by placing the circle such that the centroid (red X) is not on the surface. Irregular UV divisions have nothing to do with it. Ponder it further please.

P.S. My analogy about averaging points isnāt accurate on your original lofted surface, so when you find a better explanation, please post it here? I donāt get too hung up on GH mysteries because there are so many them. One just has to deal with them.

understanding_centre_points_2019Oct2b.gh (13.9 KB)

1 Like

Sure. Someday I will surely. Probably will take some years as I am still a beginner. I am still learning the basic concepts here of how things work out. There has been immense support from people on these forums, especially Mr. HS_Kim and you. Your kind and helpful replies have been very prompt and insightful. Thanks a lot for your patience and guidance.

Exactly, I was having the same thoughts while having dinner tonight, after feeling frustrated about a paradox of simple shape division into four pieces. I was like, āMaybe it is what it is. And I should let it be, instead of becoming obsessed with it since 3 hours. Focus and spend more time on designing more geometry in Grasshopper instead of fixating myself on division of four surfaces.ā

1 Like

Thatās how most people cope with the vagaries of life, eh, and there is much to be said for that strategy.

My waking thought about this is that the only reason the analogy fails is because it doesnāt account for the fact that in this case, the areas of the subsurfaces are not all equal. That can happen on flat surfaces too. A weighted average is needed, with more weight allocated for larger subsurfaces than smaller ones. Iām not sure how to do that for a list of 3D points? And not sure I care enough to spend more time on it, though it is nice to know these thingsā¦

1 Like

That!! That!!!. ā¦that āitās nice to know these thingsā is what pulls the mind into deconstructing the status quo. I really admire your persistence and patience sir!!! Thanks for sharing the Khan Academy video. I will watch it twice or thrice in order to understand.

I will ponder it. Think over it the āhow and whyā of it more. Then get back here. I had given up on this figuring out last night. Your reply has made me scratch this itch once again.