Calculus on a GraphicsPath?

  • Thread starter Thread starter Jon Slaughter
  • Start date Start date
J

Jon Slaughter

Is is possible to use the Graphics Path to store curves and then compute
things on them? For example, In one of my controls I one to use a Graphics
Path to store a curve that represents something but I need to be able to get
the tangent at an arbitrary point on that curve. (basically the point that
the mouse is over).

I see that I can get the "data" of the graphics path but I'm not sure how to
interpret this. It seems that These are the points that you use when you add
curves or points to the path and then it stores the type of curve. The
problem with this is that I would have to manually reconstruct these curves
to fine the proper points. This isn't so hard for line or arc but just would
be a big mess in general. My paths will contain only one curve though that
might be connection.

It would just be nice to have some parameterization of the path so I don't
have to do any computations of the figures myself.

Any ideas?

thanks,
Jon
 
The DirectX platform has multiple assemblies which can be used in or out of
a DirectX project. The Microsoft.DirectX assembly contains a good number of
Math classes, such as Matrix, Vector2, Vector3, Vector4, and Quaternion.
The Microsoft.DirectX.Direct3D assembly contains some as well, such as
Geometry, KeyQuaternion, KeyVector3, and TangentOptions.

In addition, there are commercial libraries available for a fee, such as:

http://www.programurl.com/curvfit.htm
http://www.extremeoptimization.com/mathematics/Default.aspx

--
HTH,

Kevin Spencer
Microsoft MVP
Chicken Salad Shooter
http://unclechutney.blogspot.com

A man, a plan, a canal, a palindrome that has.. oh, never mind.
 
I don't know if the directX libraries contain that function. We have
something similar in VG.net called the PathInterpolater, you can see it used
here:
http://www.vgdotnet.com/blog/PathMoveMerged.zip

You can use the VG.net runtime (in the Lite version) for free. Look at the
PathMove sample for source code.


Regards,
Frank Hileman

check out VG.net: http://www.vgdotnet.com
Animated vector graphics system
Integrated Visual Studio graphics editor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top