If you'll kindly first reference this old thread:
http://www.experts-exchange.com/Programming/Languages/CPP/Q_24200388.htmlThe thread pertains to drawing a line, and calculating points along it at a given percentage out.
Following the accepted answer there was a bit of brief conversation about doing the same thing, only instead of along a straight line, to do it along a "gentle curve". I had mentioned getting some help from a friend who is a math professor but that never panned out, and work priorities shifted.
Anyway I'm back to this old project and still wish to animate a curve and my head just doesn't wrap around the maths well enough to figure it out!
I am using VC++ 6.0 and MFC.
Consider two points, starting and ending. Between these points I want to draw a "gentle curve" - it could be a segment of a circle, or a parabola (I am told). For an example of what I mean, on the home-page of the "Facebook" social networking site (
www.facebook.com) there is an image of the earth with little pictures of people and dashed lines connecting them. This is very much the "look" I am after in so far as points and curves between them. "Starting to Ending" isn't always left to right, the start point could be on either side.
Picture though if those dashed lines on Facebook were not only drawn as they are - but then in another color we animated out along the same path, to represent the "progress" of the process I am modeling, from start to finish - as that is what I'm trying to accomplish more or less, a visual progress indicator that traces along a curve between two points rather than a fixed straight line.
My software is visually modeling the transfer of large filesets between two geographically separated points. So the first drawn arc connecting the two points represents the transfer itself, and then in another color, I want to animate out along the same curve from the start point toward the end point, representing the percent complete.
So I guess what I'm looking for is a function into which I can enter two points - starting and ending, a percentage value (0-100%) and perhaps a radius value to adjust the degree to which the line arcs. The function will handle all the math and draw the curve in one color between the two points, and then draw/overlay in a different color, the portion of the same curve representing the percentage value, ie. "20% done between A and B". It should handle A being to the left, right, above or below B.
Does this make sense I hope?
Thanks!