hey thx for asking. I still haven’t managed to do that one.
It is for drawing shapes of leaves. A simply ellipse does not look like a leaf.
So let’s say I want a leaf with 10 pixels on the left, 15 pixels on the right (for a total of 25 pixels in width). Leaf is say 100 pixel in length/height.
I decided to model half a leaf as an ellipse cut by a vertical line.
This is what I do for drawing half a leaf
I know the top point of the leaf. topX,topY (can be modeled as point M in figure)
I know the bottom pointer of the leaf, botX,botY
In my case topX=botX. I will do rotations later if needed.
I know that the distance between a and a’ in the above image is 10 pixels for the left part.
Once I know a and b of the ellipse, I draw the ellipse correctly offsetted and clipping on the area of half the leaf, it draws the left half of the leave.
It does not matter if there is an unknown. This unknown can be made a parameter for the leaf creation and put into the equation.
I just need this ellipse equation that goes through
(topX,topY) (topX, botY) (vertical line) and (topX + 10, MiddlePointer Between TopY and BotY). This last point is the (Distance(a,a’) in the model)
that’s for one part. the other part is similar except the other way around.
all I managed to do is draw half a real ellipse and not a truncated one. so maybe I don’t model the problem correctly.
thx for your time.