Hi, Is there with grasshopper a solution to connect 4 circles with 1 straight line. I can give a point on a circle. I want to draw a hyperboloïd surface, so I have the center point, the axis in the middle, 4 circles on the surface, but I don’t have the axis to revolve. I think there are normally only 2 curves that could connect those 4circles with a straight line, a curve and her symmetry curve. When I see posts about connecting circles, they all seem to divide the circle in points, and then connect those points. But I need to find the 3 other points on the circles/ straight line that connect them so I can construct the hyperboloid, like I would do in Rhino with a ‘surface of rail revolve’. Thanks

# Connect 4 circles with straight line

**StructureEmma**(Emmanuelle Vanhaesendonck) #1

**akilli**(Ethan Gross) #2

First, i moved your geometry to the origin for my own sanity. I also assumed the two middle circles are symmetric with respect to the center of the hyperboloid, If you project one of those circles to the xy plane and draw a tangent to it from a point on the large circular base, it will intersect the large circle in a second point, which corresponds to a point on the large circle on top for your line. Now, project that point back up. Connect the points on the top and bottom circles to get your hyperboloid generator.

Hyperboloid from circles…gh (13.6 KB)

**StructureEmma**(Emmanuelle Vanhaesendonck) #3

Waw, thanks for the fast answer, that looks great. The understanding of the gh is quiet difficult for me, but I am pleased with your explanation!

@akilli I looked at the steps in the gh file. One thing I don’t see, how the hyperboloid knows the need to go through the 2 circles in the middle, so if they would be farther away of the center (vertically), he would still go through them.

**laurent_delrieu**(Laurent Delrieu) #4

Argh @akilli Ethan was faster with a better solution.

I used a different approach using, less elegant and less precise. So for the record.

hyperboloid.gh (18.8 KB)

I made differents lines connecting the big circles and calculate the distance to one of the little circle then use Rhino to find points were distance between line and little circle is 0. So I get 2 points.

And just to say no need of rotation axis as you can get the center of the circle by connecting a circle to a point.

**StructureEmma**(Emmanuelle Vanhaesendonck) #5

@laurent_delrieu Thanks for making this! I just not understand:

’

**akilli**(Ethan Gross) #6

Take a look at the hyperboloid from the Top viewport. You’'ll see that the line is tangent to the middle circles no matter where they are along the axis because the tangent was drawn in the xy plane. As long as they are symmetric with respect to the center plane of the hyperboloid this should work. Hope this helps. You can experiment yourself and see but just make sure that if you do so, the order of the List Items that define each circle remain unchanged. This is important.

I was mistaken here in my rush to be brilliant. See below for a decent solution.

**StructureEmma**(Emmanuelle Vanhaesendonck) #7

I just redrawed, with de 2 circles in the middle farther away from each other, and then you see that the circles are not on the hyperboloïd. Maybe I explained wrong, the 2 small circles does not represent the circle of the center of the hyperboloïd, they are just symmetrical circles that are on the surface, just like the 2 big ones.

**akilli**(Ethan Gross) #8

You’re right. Your initial example seems to work because it must have been taken from a pre-exisitng hyperboioid or I was just “lucky”. I’m working on better solution but Laurent’s will take into account your changes.

**StructureEmma**(Emmanuelle Vanhaesendonck) #9

Yes, when you intersect the circles from the first model with the straight line, there is no intersection point. damn

**akilli**(Ethan Gross) #10

OK. Here’s a new approach and probably a little more involved than either of us was hoping. Play around with it and let me know. Assuming that everything lies on an hyperboloid, I used some analytic geometry to solve for the circle that intersects the xy plane, using the radii and heights of the two circles. Thereafter, it’s similar to my first post… If you want four circles, just mirror the first two, but its purely cosmetic.Sorry for the unwarranted confidence in my previous reply.

hyperboloid from circles 2.gh (13.2 KB)

**StructureEmma**(Emmanuelle Vanhaesendonck) #11

Nice, thanks!! I try this out and let you know

@akilli This is really awesome what you did! I wonder if, could we change the equation, to add 3 more circles on the hyperboloïd? I don’t know which rule you applied, so I could change it for more circles… Maybe I am asking the impossible?

… As 5 points define a hyperbola, it’s maybe easier, to draw a hyperbola defined by 4 points, and then I can move it with the 5 th point. And rotate the hyperbola around the center line. I am trying to make a hyperboloïd the same in some points as an onther one, and I was using the circles to obtain it.

**Joseph_Oster**#12

Connect just two circles, not four…

hyperboloïd_2018Mar16a.gh (9.4 KB)

Intersect plane(s) *(white group)* to get circle, ellipse, parabola, hyperbola curves *(yellow)*.

hyperboloïd_2018Mar16b.gh (18.3 KB)

Create an Elliptic Hyperboloid from the matematic formula

**StructureEmma**(Emmanuelle Vanhaesendonck) #13

@Joseph_Oster hi, it is important all the circles are on the hyperbola, that’s why the 4… I have drawn a hyperboloïd, and I am drawing a second one, with some parts the same of the first one.

**Dani_Abalde**#15

As alternative, we can use Kangaroo as an approximation tool.

Line from 4 circles with K2.gh (12.9 KB)

**StructureEmma**(Emmanuelle Vanhaesendonck) #16

@Dani_Abalde Hi, thanks for the drawing! Could I use this method using 5 circles above the middle? Actually, being occupied with my drawing, I am now in the point, that it would be nice, if i have the hyperbola curve going true 5 points (in 1 plane - as if I would make a verticale cut true the hyperboloïd), so that I can move one point, and the 4 others stay fix. A hyperbola is defined by 5 points mathematically, so technical it can work. I just don’t find a function to draw a hyperbola in grasshopper using points on the curve.

**akilli**(Ethan Gross) #17

The general equation of an hyperboloid requires three parameters, but since you are requiring that the cross sections be circles, that leaves two degrees of freedom. That’s why it is possible to use just two circles to define it here. The five points you mention for an hyperbola refer to an arbitrary hyperbola in the plane that can be oriented in any way. Lets say your five circles intersect the xz plane in five points. Then you could solve five equations in five unknowns and come up with the equation for an hyperbola but it would probably have its major axis **not** pointing in the the x direction and if you rotated it about the z axis, what resulted would not be an “hyperboloid” according to the definition. https://en.wikipedia.org/wiki/Hyperboloid. If you want something that “looks” like an hyperboloid but is not mathematically exact, then that is a different matter.In that case, you could just do it by eyeballing it.

**StructureEmma**(Emmanuelle Vanhaesendonck) #18

@akilli Thanks very much for this explanation! I just have some questions.

Are the cross sections not always circles on an hyperboloïd? I was thinking the way it is formed, turned around an axis that it always result into a circle as cross section.

Do you mean that if rotating the hyperbola about the z axis, it would not be an hyperboloïd if the axis of the hyperbola is not perpendicular to the z axis? (my englisch is not that well, thats why I ask to be shure I understand) So if my hyperbola’s axis is perpendicular to the z, there would be no issue. My four points I pick, are lying on a hyperboloid drawed with rotating of a straight line. I am trying to draw a second hyperboloid that has some points the same as my original hyperboloid. Taking 4 points the same, would let me try to see the difference how far I need to change the 5th point to see a real difference between the two surfaces. (I am drawing a double structure, and on the circles points need to connect to each other…) I would think because of taking 4 points from a real hyperboloid, it will still be one after changing the 5th point, but I am not a mathematician to be sure of this, only quiet good and passionate about it… Is it possible to make the equation of the hyperboloid with grasshopper, so I can try it to see if it is an hyperboloïd? (my 4 points are fix, available, so 1 point should be able to change) I would love I can make a hyperboloïd of it

what can I understand by ‘eyeballing’?

Thanks!

**akilli**(Ethan Gross) #19

It’s clear you have something in mind that requires five points but, sorry, its not clear to me. Now you’re talking about two surfaces. I think it would be extremely helpful if you drew a picture of what it is you’re trying to do.

To answer your first question, you are looking for an “hyperboloid of revolution”, which has circular cross sections but a general hyperboloid can have elliptical cross sections.

**StructureEmma**(Emmanuelle Vanhaesendonck) #20

@akilli sorri for making it unclear. I was trying to explain more but didn’t work. I made 2 pictures. All what I was trying know with the circles for the hyperboloid, was for the surface on the inside you see on the picture. So, I am drawing a double structure, were both surfaces are lying on a ‘circular’ hyperboloïd. I draw a technique out to divide them into triangles. The inside surface on this image is just a 1D scaling of the hyperboloid to show how I want a surface inside another. Because of the scaling it is not a circular hyperboloïd anymore, so I cannot use my technique for division, which is necessary. I would like in my triangulation method, that the eindpoints at the border are on both hyperboloids, so I can connect my triangles of the two layers at the end of the border. (don’t know if this is clear). So to draw the inside hyperboloid, I first wanted to secure the two outside circles, so they would have the same ‘range’. That was my question I started with here. Looking further how it could be better, I start thinking making circles true each endpoint on the border, and look at the intersection point on the curve on the bottom (=were the plane is drawn). Then I wanted to use this points, to define a new hyperbola with one other point, so my curves would be different, but still coming together nice at the end. (as if you would not see 2 layers when you look at it, but 1 line going open in 2 layers) Using more points, give me more points at the end of my curve that will be the same… The points are marked in yellow on the picture. On the picture the lines come together in the bottem, I want to try make them together at the border. Is this explanation more clear? If not just say and I try to make it more clear on another drawing… Thanks for the effort!

- Yes, i had totally the hyperboloid of revolution in mind -

**akilli**(Ethan Gross) #21

Two questions: Why do the surfaces have to be hyperboloids and if they are, do they both need to have circular cross sections?