does anyone have any idea how I could create an ellipse tangent to 3 curves? (in what I’m working they are circles but it would be useful to be any curve)
elipse.gh (11.5 KB)
edit: from what I’ve seen there is no plugin that deals with such things, so if I was to do it ‘manually’ I would bet you could somehow define it by giving the circles and the axis angle as inputs. That way you should get a unique ellipse (?)
Edit: Ah, never mind. I thought you meant the straight lines with the “curves”, missing the obvious circles… doh!
Given that -----> X axis in your picture
midp.X = LineXaxis.StartPoint.X + LineXaxis.Length / 2;
midp.Y = LineYaxis.StartPoint.Y + LineYaxis.Length / 2;
Then you should have a midpoint (midp). From that midpoint, get the ellipse radius in x-direction :
x_radius = LineXaxis.Length / 2;
y_radius = LineYaxis.Length / 2;
Now create the ellipse.
If the lines to be tangent against is rotated, then first rotate it to be axis-aligned to the World axes, do the above thing, and then rotate (the ellipse) back to original rotation.
Hopefully I understood how you meant(?)
An Ellipse is a Circle
Meditate on this you will
Oh Great wizard,
The shortest path to wisdom I can see so far is go algebraically and solve for the equations for the 3 given circles and a given angle for the ellipse’s axis.
Since I cannot solve your riddle and It might take me a lot of time, can you please give more clues?
I was trying to use Yoda sense of humour without his master . What I proposed is to transform the ellipse you want to a circle with NU scale the go back with the 1/x NU Scale.
Is it more clear young padawan.
elipse.gh (16.0 KB)
It is clear you did something. -and it seems to be working- What you did it will take some time for me to grasp!
Is it only working with symmetric circles? the idea is for it to work with slightly off circles
Oh!!! you made the circles ellipses and then inversed the transformation!
HOW VERY SMART!!!
But it is not what I’m looking for…
I want to ‘pack’ a series of ellipses on a strip as in the image bellow. Each triad of circles is going to be of the same radius but slightly off one from another.
by the image you might be mislead to believe that just inscribing the ellipses in the rectangles might suffice but It is a more intricate arrangement I want to do.
An Ellipse is a circle in a world where there is a compression in one axis (one of the axis of the ellipse). Here another solution with choice of the angle, ratio of ellipse and 4 ellipses.
For your problem can you draw were you want the ellipse (red curves, yellow curves …) ?
elipse.gh (12.2 KB)
something like this but with ellipses instead of the selected circles.
(the angle of the ellipse might compensate for being able to have it tangent to 4 circles-unlike the circles in the image)
Here is a way but doesn’t give the 4 tangencies. You will need to use some recursion.
ellipseLD2.gh (27.1 KB)