# How to create two curves that change dependently

Hello everybody ,

I have a problem and I don’t know how to solve it, let me tell you. I’m making a multi-size pattern of a lantern sleeve in Seamly2D.

The question arises because the curvature measurement of piece 1 doesn’t match the curvature of piece 2 for each of the sizes and I don’t want the fabric to be embedded, I want it to have the same curve length in both pieces. (Right now this curvature changes independently in both pieces, but it should be dependent).

How can I make the curvature of piece 1 (yellow line) the same size as piece 2, as it varies from size to size?

Sorry, but I can’t send the file because it is for a customer, I insert screenshots.

Thank you very much,

Esther

2 Likes

On a different question regarding this piece, I’m curious if the curve on Piece 2, (hereafter referred to as Pc2,) is supposed to be a section of an ellipse or a section of a circle? Because, as drafted, the insertion seamline will need to be fudged at the underarm seamline, or else be angled.

As for the actual question, my first attempt would be to use the `Intersection point of two lines` tool (the second tool of the `Line` toolbox) to establish a point above the top of the sleeve, probably with the midline & one of the angles, & then draw an arc with the appropriate radius, & a length of Pc2/2 starting at 270°, & then `mirror the curve by axis` with a vertical axis.

Of course, assuming that all else went right, I’d then have to figure out how to put points on the ends of my curve. But I’ll leave my thoughts for another time or person to correct, right now I’m running late for breakfast.

1 Like

Ok, hi @Esther

I’ve got it figured out…

The part that needs to resize is the centre height of pc2. This needs to change according to the length of the curve in pc1, since the width will change according to the size.

What I did is I created points (nodes) as handles on both of the 2 curves that will change according to the direction of lines that I added to both parts.

And then I used this formula to change the height of the pc2: ((Line_A6_A7/Line_A9_A10)*Line_A3_A5)*2.38

(I’ve ignored the parts that aren’t relevant to the question.)

I’m guessing that someone will have some trig that will do a better job, but this is using my arithmetic

The line A8 to A11 should resize when the whole pattern is resized and this will make the 2 curve lines almost-almost the same length (tested size 34 & 50) - only 1 or 2 mm out.

BTW… The 4 outer handles use the line between the handle & the centre plus or minus 15° and all handles are 30% of the line between the outer & the centre points. It’s important that you use the same ° and % at the same places to get the formula to work correctly.

1 Like

Every circle is an ellipse (albeit a special case), but not every ellipse is a circle. In fact drawing a circle in Qt is done through a QGraphicsEllipseItem or directly via the painter with QPainter::drawEllipse.

2 Likes

Finally, I solved the problem .

Thanks to all of you for your contributions. Now I explain how I did it:

It’s not as professional as @Grace’s option but it works Grace proposed to reduce the measure or height of the second piece but I wanted it to be fixed. I wanted it to measure always 14 cm high, like the original piece from which the sleeve transformation starts.

For that reason, I changed only the curve of the piece 1. First I increased the size of the curve by 1.5 cm on each side and made the underarm seam in both cases the same. Then I divided the curve in two, both starting from the centre.

Once these changes were made, I applied a node corresponding to the half of the curve of piece 2, and as it is dependent, it changed for each size, so there is no more embedding! I did the same for both halves.

I attach pictures

2 Likes

Aaaahhh… very well done! This program is so very amazing

2 Likes

As are the users that come up with (workaround) solutions to various problems.

3 Likes