Grasshopper

algorithmic modeling for Rhino

I have used the nearest point component to find 3 points closest to a base point. I need to use this data to form a circle with 3 points.

I have no idea about how to deal with this kind of data structure.

I also dont know how to get the 3 points connected to the 3 point circle component.

I've tried exploding it, but I cant afford to connect all of them manually as the number of branches is very high.

Any help is appreciated.

Please find a picture attached

Cheers

Views: 1033

Replies to This Discussion

Hi tom,

I have done as you said, but im getting an error for the circle component.

It is saying that the points shouldnt be co-linear

You can fit a circle through any three valid points, but there are three special cases that will cause trouble when trying this in real life.

  1. All three points are coincident.
  2. Two of the three points are coincident.
  3. All three points are colinear.

In the first case there are infinitely many circles that pass through the points because we can always adjust the radius of any circle until it intersects the three points (well, in 2D anyway). You can make the case that the most sensible circle in this case would have zero radius and a centre-point coincident with the three input points, and that's certainly a very fair solution.

In the second case there are still infinitely many circles that pass through the points, although the degree of freedom is less than in the first case. Any circle with a centre-point somewhere along the perpendicular mid-line of the input points can have its radius adjusted until it intersects the input points. You can make the case that the most sensible circle is the one with the smallest possible radius, and thus with a centre-point exactly in the middle between the input points. This, again, is a very fair solution.

In the third case there is only 1 (or maybe 2, depending on how you treat infinities) circle that intersects the three points and that circle has infinite radius and its centre-point is infinitely far away. Ie. this circle looks like a straight line when you look at any finite part of it. Mathematically this is fine, computationally not so much. Rhino represents circles not as implicit equations or using Plücker or homogeneous coordinates, but as a centre-plane/radius pair in euclidean space. Because the resulting circle definition would contain a whole bunch of infinities in this case, we cannot represent the result in any meaningful way.

thank you for the explanation david.

is there any way i can get rid of these points for my defnition?

thanks in advance

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service