Creating tangent relationships between curves

I have a model i am trying to create in grasshopper. Originally i was able to create this in solidworks utilizing relationships between curves, but I am unsure how to do this in grasshopper. I am still pretty new to grasshopper, so apologies for anything that would be obvious to a more experienced user.

The model consists of 4 sets of curves. The object is symmetrical in two directions. I am provided with 2 radius dimensions, a length, and a width dimension. To make the object fully defined all curves need to be tangent to each other.

Everything I have been able to find when searching online about curves is that the points need to be established. While I can establish the points for the furthest the model is left, right, up, and down, the location of the 4 points that are created from the intersections of the curves are not known. Their location only becomes known after establishing the tangency between curves.

Is there a way to do this with grasshopper?

Thanks!

Previous threads on the topic:

These threads end up with very generalised solutions which may be overkill for you, but this one on the old forums looks neat and tidy and exactly matches your problem.

Desribed like that it seems you have 4 numbers, but instead you can only have 3:
radius, radius and width.
Height will be a consequence, you can’t directly control that.


simmetric arcs shape.gh (10.8 KB)

This shape can exist only while the bigger radius is larger than or equal to half of the width.

This is a geometrical construction.
Using math calculations you can make it with fewer components, but it will also become more abstract.

2 Likes

You are correct, I am given that dimension, but it over-constrains the model. Thanks for catching that, its been a while since I’ve tried to tackle this again.

1 Like

I feel like those are close, but I am unsure how to “wrap” a paraboloid around the resulting circles.

this is quite simple when using a GUI, and trying to do it programmatically is much more challending that i originally expected it to be.

What do you mean? Putting the same values must result in the same shape.
Surely the Rhino/GH version is accurate… parametric/constraint version might instead converge in something with small infinitesimal error.

That’s a new and different task. What do you mean with that?

Of course.
I expect the “hard-coded” programmed one (grasshopper or c#/python) to use many order of magnitude less power (computing time) than the parametric one.
Programmed one is “one-shot” it works or it doesn’t.
Parametric/constraint usually pin-point iteratively to find the solution.
That’s a huge difference.
With the hard-coded version you can calculate hundreds of similar sections real-time … I expect to perceive lag if you manage to do the same with parametric software.

Unfortunately it doesn’t create the shape i am looking for. The shape is in the image i posted originally. When entering the values i get either this shape


or this shape depending on which circle is the larger radius

If I use 4 circles in solidworks to replicate the gh definition, this is what it would end up looking like. Then i would trim away the curve sections that I don’t need to leave just the shaded region

1 Like

If the 2 radius values are not in order by size, merge them, sort them and use “list item” to use the first as the smaller and the second as the larger.

This is quite complicated. Your top drawing, where you start the topic, may not be the same as your last drawing with the two small and two large circles. In your last drawing, when all the radii are known, only one distance is needed to define the other distance.

In your original drawing, you define two distances.

In your last drawing it means that it is overconstrained with two distances, because only one distance is needed.

The last drawing is just a representation of what full circles would look like. It is based on the first drawing with all the dimensions. However Riccardo Majewski correctly pointed out that only 3 of the 4 dimensions are required.

1 Like

Which dimensions are absolutely fixed, and which are subject to change? Then I might be able to help you with a geometric approach to this.

lets disregard the height dimension


that leaves us with length, big radius, small radius

This should be solvable analytically. Set it out like a highschool trigonometry puzzle and solve for your unknowns.

This should let you make a solution using expressions only, which will be much faster than geometric solutions.

4 Likes

r1= small radius
r2=big radius
d1= horizontale distance

In your (@Tom_Newsom ) drawing:

d =abs(((abs((r1+(r2*(-1)))))^((-1))*((d1*(-1))+(r1*2))*r2*1/2))

b=(abs(((r2+(abs((r1+(r2*(-1))))*(-1)))*((r1+(r2*(-1))))^((-1))))*(abs(((d1+(r2*(-2)))*(d1+(r1*(-4))+(r2*2)))))^(1/2)*1/2)

c=(abs(((d1*(-1))+(r1*2)))*1/2)

vertical distance d2=abs((((((((d1*(-1))+(r2*2))*(d1+(r1*(-4))+(r2*2))))^(1/2)*(d1+(r1*(-2))))+(abs((d1+(r1*(-2))))*r2*(-2)))*((d1+(r1*(-2))))^((-1))))

distance A-B=(((((d1*(-1))+(r2*2))*(d1+(r1*(-4))+(r2*2))))^(1/2)*1/2)

3 Likes

Just another of the many possible ways:



simmetric arcs shape.gh (12.7 KB)

Note that not every combination of the 3 values can return a correct shape, I don’t know how Solidworks behave when that happens.

Also, the “smaller radius” (left and right arcs) can be actually the bigger, if you don’t sort the values:

Next step would be going into c# coding and make it output a null when the 3 values can’t generate a proper shape.

Doing like this, with math or geometric constructions, makes us understand and appreciate more how helpful is parametric sketching. One doesn’t need to know math but the software will create a precise accurate result anyway (when possible).

Instead, learning to actually visual-programming a shape, make you remember high school geometry/math and make you nearer to the actual programming.
After having see it work with visual code going further and coding it with c#/python is much simpler.
I started like this years ago and now most of my work is c# inside grasshopper.

4 Likes

For fans of tangents (literal and figurative), this construction is one of a family of curves called Polycentric Ovals, famously used by Borromini in his baroque churches.

This fascinating combination of maths and architecture covered in depth in “All Sides to an Oval” by Angelo Alessandro Mazzotti which can be found online if you look.

This is a 4-centre oval as in the OP, but any multiple of 4 works. It is highly likely that the Colosseum in Rome was aligned to an 8-centre oval for example. This would have made the concentric plan of seats and passageways trivial to set out, as opposed to ellipses which cannot be concentric.

2 Likes

To respect the measurements indicated in the drawing.
arc.gh (21.5 KB)

1 Like

Wow thanks everyone! This is exactly what I was trying to do

1 Like