Author Topic: Modify ellipse and/or arc  (Read 174 times)

0 Members and 1 Guest are viewing this topic.

badjo_5

  • Mosquito
  • Posts: 13
Modify ellipse and/or arc
« on: October 23, 2020, 05:22:23 PM »
I have app (.net) for transformation drawing entities, entities is transformed from one coordinate system to another (geographical data). This is 7P transformation, grid data are precalculated, so math is simple, bilinear interpolation. In proccess of transforming entities, there is small change in angle, depends on distance from central meridian, and beacuse of this, that angle is not constant. So, if I transform line from one system to another, I need to transform StartPoint and EndPoint of line, and everything is fine. Circle is not problem (in this case, there is still a small amount of error because radius shold be recalculated, but elements are short 50-100 m, so when I transform circle it is enough to transform CenterPoint). For ellipse (or arc) is different thing,  If I change CenterPoint, ellipse will retain Major and Minor Axis angle, so my question is (finally): how can I edit Ellipse or Arc? I wolud rather transform existing objects, not create new ones.

Maybe if I calcuate StartAngle and EndAngle in first system, and angle of Mayor axis, then calculate new points for start and end points, calculate angle again in second system, and finally add that difference to StartAngle and EndAngle?

Picture left is orignal ellipse with lines as axis, axis are aligned, and transformed ellipse on the right, you can see that axis are slightly rotated/moved.

Edit:axis are on the right place, ellipse should be rotated.
« Last Edit: October 24, 2020, 12:49:52 PM by badjo_5 »