Click here to Skip to main content
12,403,811 members (70,918 online)
Click here to Skip to main content

Stats

662K views
34.2K downloads
374 bookmarked
Posted

Scientific charting control

, 17 Jan 2005
Multi-purpose scientific charting control.
XGRAPH10.dll
XGraphTest.exe
Include
Release
res
bitmap1.bmp
bs1.bmp
bs2.bmp
bs3.bmp
bs4.bmp
bs5.bmp
Toolbar.bmp
XGraphTest.ico
XGraphTestDoc.ico
XGRAPH10.lib
XGRAPH10d.lib
XGraphTest.clw
XGraphTest.dsp
XGraphTest.dsw
XGRAPH10.dll
bitmap2.bmp
default1.bin
Logo.bmp
Screen1.bmp
xgraphtest
XGraph.clw
xgraph.def
XGRAPH.dsw
XGRAPH.dsp
bitmap1.bmp
bs1.bmp
bs2.bmp
bs3.bmp
bs4.bmp
bs5.bmp
lib
XGRAPH10.dll
XGRAPH10.exp
XGRAPH10.lib
#if !__VECTOR2D_H
#define __VECTOR2D_H

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000


#define MPOINT2POINT(mpt, pt)   ((pt).x = (mpt).x, (pt).y = (mpt).y)
#define POINT2MPOINT(pt, mpt)   ((mpt).x = (SHORT)(pt).x, (mpt).y = (SHORT)(pt).y)
#define POINTS2VECTOR2D(pt0, pt1, vect) ((vect).x = (double)((pt1).x - (pt0).x), \
                                         (vect).y = (double)((pt1).y - (pt0).y))
typedef struct tagVECTOR2D  {
        double     x;
		double     y;
} VECTOR2D, *PVECTOR2D, FAR *LPVECTOR2D; 

typedef struct tagPROJECTION  {
        VECTOR2D   ttProjection;
		VECTOR2D   ttPerpProjection;
        double     LenProjection;
		double     LenPerpProjection;
} PROJECTION, *PPROJECTION, FAR *LPPROJECTION; 

typedef struct tagPOINTNORMAL  {
        VECTOR2D   vNormal;
		double     D;
} POINTNORMAL, *PPOINTNORMAL, FAR *LPPOINTNORMAL;

PVECTOR2D  vSubtractVectors(PVECTOR2D v0, PVECTOR2D v1, PVECTOR2D v);
PVECTOR2D  vAddVectors(PVECTOR2D v0, PVECTOR2D v1, PVECTOR2D v);
PVECTOR2D  vScaleVector(PVECTOR2D v0, double dScaling, PVECTOR2D v);
PVECTOR2D  vLinearCombination(PVECTOR2D ptScale, PVECTOR2D v0, PVECTOR2D v1, PVECTOR2D v);
double     vVectorSquared(PVECTOR2D v0);
double     vVectorMagnitude(PVECTOR2D v0);
void       vNormalizeVector(PVECTOR2D ptN);
double     vDotProduct(PVECTOR2D v, PVECTOR2D v1);
PVECTOR2D  vNormalVector(PVECTOR2D v0, PVECTOR2D v);
BOOL       vPointNormalForm(POINT pt0, POINT pt1, PPOINTNORMAL ppnPointNormal);
void       vProjectAndResolve(PVECTOR2D v0, PVECTOR2D v1, PPROJECTION ppProj);
BOOL       vIsPerpendicular(PVECTOR2D v0, PVECTOR2D v1);
double     vVectorAngle(PVECTOR2D v0, PVECTOR2D v1);
double     vDistFromPointToLine(LPPOINT pt0, LPPOINT pt1, LPPOINT ptTest);

#endif

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

Share

About the Author

Gunnar Bolle
Web Developer
Germany Germany
No Biography provided

You may also be interested in...

| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.160721.1 | Last Updated 17 Jan 2005
Article Copyright 2002 by Gunnar Bolle
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid