473,403 Members | 2,222 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

Calculus on a GraphicsPath?

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
Oct 16 '06 #1
4 3048
Check out the Microsoft DirectX runtime libraries:

http://msdn.microsoft.com/directx/sdk/

--
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.

"Jon Slaughter" <Jo***********@Hotmail.comwrote in message
news:12*************@corp.supernews.com...
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

Oct 16 '06 #2

"Kevin Spencer" <sp**@uce.govwrote in message
news:el**************@TK2MSFTNGP05.phx.gbl...
Check out the Microsoft DirectX runtime libraries:

http://msdn.microsoft.com/directx/sdk/

I really don't want to have to use directx ;/ I just don't see having to
bind to the whole library just to use one small feature. (unless your are
implying that they give non-directx examples of what I want?)

Thanks,
Jon
Oct 16 '06 #3
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/m...s/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.
"Jon Slaughter" <Jo***********@Hotmail.comwrote in message
news:12************@corp.supernews.com...
>
"Kevin Spencer" <sp**@uce.govwrote in message
news:el**************@TK2MSFTNGP05.phx.gbl...
>Check out the Microsoft DirectX runtime libraries:

http://msdn.microsoft.com/directx/sdk/


I really don't want to have to use directx ;/ I just don't see having to
bind to the whole library just to use one small feature. (unless your are
implying that they give non-directx examples of what I want?)

Thanks,
Jon

Oct 16 '06 #4
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

"Jon Slaughter" <Jo***********@Hotmail.comwrote in message
news:12************@corp.supernews.com...
>
"Kevin Spencer" <sp**@uce.govwrote in message
news:el**************@TK2MSFTNGP05.phx.gbl...
>Check out the Microsoft DirectX runtime libraries:

http://msdn.microsoft.com/directx/sdk/


I really don't want to have to use directx ;/ I just don't see having to
bind to the whole library just to use one small feature. (unless your are
implying that they give non-directx examples of what I want?)

Thanks,
Jon

Oct 16 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: Altramagnus | last post by:
I have a complicated Region object, which I need to draw the outline, but not fill How can I convert the Region object to GraphicsPath object? or How can I draw the outline of the Region object?
6
by: Altramagnus | last post by:
I have n number of circles. Some of them might overlap. I need to draw the outline of all circles but not those overlap areas. Initially, I am try to use a Region, because a Region object has a...
21
by: Merrill & Michele | last post by:
Q1) Has anyone seen a treatment of Dr. Church's lambda calculus that uses C instead of an obscure language designed for logic? Q2) How does access the forum archives? MPJ
1
by: jay | last post by:
I have a bitmap and a graphicspath object. I draw pixels on m_Bitmap and I'm drawing text using m_Graphics GraphicsPath object. However, saving my work with m_Bitmap.Save doesn't save...
7
by: Crirus | last post by:
Hi Is that true that this IsVisible method is incredible slow? Seems that my app is much slower with only this added as a condition to draw something Crirus
16
by: Crirus | last post by:
I have a graphics path composed from multiple circles that may overlap... That graphics path I need it converted to a string and that string I whould like to be as small as possible Any ideeas?...
4
by: Don | last post by:
When creating a new region for a control via a GraphicsPath object, it appears the entire rightmost column of pixels and bottom most row of pixels are not included in the region. I will try to...
2
by: Martijn Mulder | last post by:
/* GraphicsPath.IsVisible() gives unexpected results. I fill a System.Drawing.Drawing2D.GraphicsPath-object with PointF-structures that define the unit-square (0,0), (1,0), (1,1) and (0,1). Then I...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.