|
|
 Prize winner in Competition
"MFC/C++ May 2003"
Comments and Discussions
|
|
 |

|
how to change line color like rainbow? plz!!!
thanks.
|
|
|
|

|
incomeplete, lacks essential features, not working correctly, abandonware
|
|
|
|

|
i am trying to plot surface graph (similar to example "double sine" but solid) and set color of surface based on Z value.
am not sure if i use this properly but i am having some problems. so far i am still playing with the code trying to see how to use it.
for example right now i just use lineplot (modified from "double sine" example) and while plot looks fine, it is next to impossible to see anything because everything is same color.
i can change color but is always applied to entire graph not just line i am ploting.
i expect that after each ".AddElement", and it's ".ElementLineColor(n)=RGB(100 + (n mod 128), 0,0)" i color set for only that element (".PlotXYZ X, Y, Z, n").
for some reason it does not work (or maybe I am not understanding how this is supposed to be used).
any help is greatly appreciated.
|
|
|
|

|
Eight years old and still seriously wawesome!
|
|
|
|

|
tried to register it on win 7 and then add it to com from C# it worked but then tried to pull in from toolbox and then vs crashed .
any ideas?
|
|
|
|

|
I am confused by this project. After spending many hours locating and correcting errors and
eliminating myriad warnings so that the NTGraph3D_src project would compile on Visual Studion
2008, I find there remain a couple of unresolved issues.
1) if this is supposed to generate an ActiveX control, why is no OCX file generated ?
2) the only library files generated are the NTGraph3D.dll and the associated NTGraph3D.lib
3) a Custom Build error occurs in every configuration
4) it is not possible to register the NTGraph3D.dll using regsvr32.exe
When attempts are made to do so using regsvr32.exe NTGraph3D.dll, the following message is
posted:
The NTGraph3D.dll was loaded, but the DLLRegisterServer entry point was not found.
This file cannot be registered.
Further, when the src project generated NTGraph3D.dll is placed in the root directory of the demo project, an Assertion Violation is encountered:
Debug Assertion Failed!
Program: this
File: f:\dd\vctools\vc7libs\ship
atlmfc\src\mfc\occont.cpp
Line 926
ASSERT(IsWindow(pTemp->m_hWnd));
This problem can occur when the ActiveX controls are not properly registered on the deployment machine.
http://support.microsoft.com/kb/949107
If anyone would like my compilable version of NTGraph3D_src project, send me an email:
mbpliam@pliatech.com
If anyone has any idea how to get this project and the demos to work, please post your comments
here where we can all appreciate your brilliance.
|
|
|
|

|
I fail to see how making Alexander Chernosvitov 's code into an ActiveX control adds much utility. I believe that ActiveX controls have fallen out of fashion. It would be nice if the author would update this code without involving ActiveX. Then it would be extremely useful to many. As it is, it is full of errors and warnings when one attempts to compile it in VS 2008. While I certainly appreciate the effort the author put into this, I hope he or someone can update it. Still gets a 5 from me, but it's now too long in the tooth.
|
|
|
|

|
I can't run this demos (Demo3D and Torus) from C++ Builder 6. Please, tell me step by step what I must to do.
|
|
|
|

|
error C2664: 'CGraphCtl::SetLight' : cannot convert parameter 1 from 'std::_Vector_iterator<_Ty,_Alloc>' to 'CElement *'
error C2664: 'CGraphCtl::PtInRange' : cannot convert parameter 1 from 'std::_Vector_iterator<_Ty,_Alloc>' to 'CPoint3D *'
error C2664: 'CGraphCtl::Corrdinate' : cannot convert parameter 1 from 'std::_Vector_iterator<_Ty,_Alloc>' to 'CPoint3D *'
error C2664: 'CGraphCtl::PtInRange' : cannot convert parameter 1 from 'std::_Vector_iterator<_Ty,_Alloc>' to 'CPoint3D *'
error C2664: 'CGraphCtl::Corrdinate' : cannot convert parameter 1 from 'std::_Vector_iterator<_Ty,_Alloc>' to 'CPoint3D *'
error C2668: 'sqrt' : ambiguous call to overloaded function
Can anybody please help me to solve these errors???
|
|
|
|

|
Does anyone have a complete VB example of how to get this demo working in a VB project?
|
|
|
|

|
Hi!
Could you write some examples how to use this library in my С# -project?Thx for help!
|
|
|
|

|
Have you checked the exact name of the control in Access? If yes, have you then tried writing NTGraph3D0.Object instead of just NTGraph3D0 (or whatever your control`s name was) in the With line of the Torus example? Torus example with this .Object modification works fine in Access for me.
|
|
|
|

|
please tell me how to change the grid distances of x & y axis in ntgraph activex control.
abhinav bhorkar
|
|
|
|

|
Hi,
I've been using VBA for some time but have never worked with ActiveX controls.
I am trying to use this ActiveX Control in Excel.
I have registered the dll using REGSVR32.
I created an ActiveX control using NTGraph3D class.
I can see the empty x,y,z axis in the control.
I double-clicked on the control to add code.
I have ensured that I've ticked "NTGraph3D 1.0 Type Library" in my project References.
I can see the NTGraph3D objects when I open the object browser.
I have created the following test code:
Sub TstTorus()
Dim Gr As OLEObject
Dim WS As Worksheet
Set WS = Worksheets("Sheet1")
WS.OLEObject("NTGraph3D").ClearGraph
End Sub
I keep getting the same compile error:
Object library invalid or contains references to object definitions that could not be found.
Is there some step that I've missed? I would greatly appreciate help!
bd
|
|
|
|

|
I want to use 2d capabilities of Direct3D. I have different bitmaps and need to blit these directly on 'Backbuffer of device'. I created a surface using IDirect3Device::CreateOffScreenPlainSurface() then I blit bitmap on this surfsace using GetDC() function of surface. Then I used IDirect3Device::GetBackBuffer() method to get backbuffer surface and using IDirect3Device::StretchRect(), did blit on backbuffer surfaceBut It did not work. Kindly guide me in this regard.
Raheel
modified on Saturday, September 6, 2008 7:46 AM
|
|
|
|

|
I want to move a point(x,y,z) on straight or curved path in NTGraph3D control. Should I use line drawing function to draw curved path? Can Grid in background be made invisible? I only need 3-Axis in background. Is there anyother free 3D-Graph Drawing Actvx control like NTGraph3D?
Thanks
Raheel
|
|
|
|

|
Anyone got the surface plot and associated properties to work or is it disabled? Any idea on how to get the release version? No valid contact details are available for the author here.
|
|
|
|
|

|
I found this 3D Graph ActiveX Control in this website, but I don't konw how to use it?
what is m_Graph3D then? it seems to be a instance of the class.
Any one who has used it, please give me one hint.
thanks.
|
|
|
|

|
Hi
I tryed your code in an MFC DLL and it worked, but very slow.
I have to show every 12Hz new 3D images.
Now i can display 1 Image per second and this will bring the CPU to 100%.
Ok what i have done is calling an function from the Dialog with this code:
m_Graph3D.AddElement(); // fügt ein Element hinzu
m_Graph3D.put_ElementType( 0 , 1); // definiert dasd ELement als Punkt
m_Graph3D.put_ElementPointSize( 0, 10.0); // setzt die Punktgröße
//m_Graph3D.put_ElementPointColor( 0 , ( ((unsigned long)((unsigned char)(piPixel/20 + 100))<<16) + ((unsigned short)((unsigned char)(piPixel/10))<<8))) ;
for (i = 0; i < height; i++)
{
for (j = 0; j < width; j++)
{
piPixel = *piData++;
m_Graph3D.PlotXYZ(j,i,piPixel, slElementID );
}
}
m_Graph3D.put_TrackMode( 2 );
m_Graph3D.AutoRange();
But this takes so much times and only every second Image will be shown
Can u help be to make it faster?
|
|
|
|

|
Hi
I registerd this dll and ntgraoh.ocx in win 3000 server but when I want to put it on my prog not only a new form it takes a long time and my prog can not be started my prog is in vc++.net windows form application .
please help me to say what can I do?
|
|
|
|

|
Hi All,
Can anyone tell me what changes required other than registering dll, i have to made while using NTGraph3D dll in Vista system
-- modified at 4:22 Friday 17th August, 2007
NSRS
|
|
|
|

|
Hey all,
sorry i'm pretty average at this VB business, currently using VB6 though. Downloaded the NTGraph3D binary and registered it using regsvr32 and all went well. However after adding as a component in VB only NTGraph3D's properties show up, the elements (ie ClearGraph, AddElement, ElementType) don't appear in the objects properties box. As such the given code example refuses to work.
Have downloaded, registered and successfully used the 2D version of NTGraph and i'm not entirely sure where i've gone wrong.
Any help much appreciated,
Mike
|
|
|
|

|
Hi, first off, thanks for making this, its been really helpful. i have been having problems plotting an iterative sequence of a lattice like structure using a scatter diagram. while the program is running only the corners of the cube appear then the rest is plotted at the end. yet if the code is run a second time all the points are plotted. is there a way this could be fixed?
manythanks again.
Ollie
|
|
|
|

|
Is anything other than registering NTGraph3D.dll required to get the control to work in Access?
I have it registered adn working with Excel.
Right now Access is a no go though.
Any help will be greatly appreciated
|
|
|
|

|
Good code, I hope to embedded our project,as a preview 3D motion track component, could you tell me how can draw a arc by pssing center plot ,start plot and direct?
anyway, studying your code let me master lots of experiences.
coolman
|
|
|
|
|

|
Aside from scores of warnings about "possible loss of data", C2664 is keeping me from compiling this code in anything but VC++ 6.0. Would someone please post a method to "convert"? The code to convert, not just "oh great, it works now! Because I casted!" or "dude, you gotta cast". Thanx.
GraphCtl.cpp(1078) : error C2664: 'CGraphCtl::SetLight' : cannot convert parameter 1 from 'std::vector<_Ty>::iterator' to 'CElement *'
with
[
_Ty=CElement
]
No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
GraphCtl.cpp(1099) : error C2664: 'CGraphCtl::PtInRange' : cannot convert parameter 1 from 'std::vector<_Ty>::iterator' to 'CPoint3D *'
with
[
_Ty=CPoint3D
]
No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
GraphCtl.cpp(1101) : error C2664: 'CGraphCtl::Coordinate' : cannot convert parameter 1 from 'std::vector<_Ty>::iterator' to 'CPoint3D *'
with
[
_Ty=CPoint3D
]
No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
GraphCtl.cpp(1118) : error C2664: 'CGraphCtl::PtInRange' : cannot convert parameter 1 from 'std::vector<_Ty>::iterator' to 'CPoint3D *'
with
[
_Ty=CPoint3D
]
No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
GraphCtl.cpp(1120) : error C2664: 'CGraphCtl::Coordinate' : cannot convert parameter 1 from 'std::vector<_Ty>::iterator' to 'CPoint3D *'
with
[
_Ty=CPoint3D
]
No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
GraphCtl.cpp(1145) : error C2668: 'sqrt' : ambiguous call to overloaded function
C:\Program Files\VS71\Vc7\include\math.h(626): could be 'long double sqrt(long double)'
C:\Program Files\VS71\Vc7\include\math.h(578): or 'float sqrt(float)'
C:\Program Files\VS71\Vc7\include\math.h(200): or 'double sqrt(double)'
while trying to match the argument list '(std::vector<_Ty>::size_type)'
with
[
_Ty=CPoint3D
]
Quite a mess, huh?
RedDK
|
|
|
|

|
Hy guys,
I need to implement in my C# app same things that control does, just like 3d surfaces and points visualization.
How can I perform this?By wrap the *.dll?And if true why?
Thankyou a lot.
Mirko
|
|
|
|

|
I cannot add property pages because the compiler said "windows.h already include" or similar. Anybody can help me?
Thank you.
|
|
|
|

|
I want to develope a 3D game with vc++ can anyone help
me for using opengl , is there any simple example present
on the net free to download.
If anyone in the same field can help me
ok take care
Vikas Amin
Embin Technology
Bombay
vikas.amin@embin.com
|
|
|
|

|
Hi,
Actually I think there is another bug in the PlotElement function.
Indeed, I believe the loop in order to display a surface is wrong.
What about the following code?
...
// Turn on the primitive connection mode (not connected)
glBegin (GL_QUADS) ;
/* Original code
int i, npt = sqrt(theElement->m_PointList.size());
aPoint = theElement->m_PointList.begin();
for (aPoint, i=0; aPoint != theElement->m_PointList.end(); aPoint++,i++)
{
int j,k,n;
if (PtInRange(&(theElement->m_PointList[i])))
{
// i, j, k, n ・4 indices of a quad
// Counter Clockwise direction
j = i + npt; // Other vertices indices
k = j+1;
n = i+1;
*/
int i = 0 ;
int npt = theElement->m_PointList.size() ;
int nxpt = sqrt(npt);
int nypt = sqrt(npt);
int x, y ;
for (i = 0, x = 0 ; x < nxpt-1 ; x++, i++)
for (y = 0; y < nypt-1 ; y++, i++)
{
int j,k,n ;
if (PtInRange(&(theElement->m_PointList[i])))
{
// i, j, k, n ・4 indices of a quad
// Counter Clockwise direction
j = i + nxpt ; // Other vertices indices
k = j+1 ;
n = i+1 ;
...
|
|
|
|

|
Hi,
Thank you for this article. It is great!
However I think there is a small bug in the PtInAxisBox function.
Because we convert the coordinates inside the function Corrdinate,
and then we convert back inside the function PtInAxisBox. If so, this second convertion is wrong.
What about the following code?
BOOL CGraphCtl::PtInAxisBox(CPoint3D* pt)
{
float xF=dRangeX[MAX]-dRangeX[MIN];
float yF=dRangeY[MAX]-dRangeY[MIN];
float zF=dRangeZ[MAX]-dRangeZ[MIN];
CPoint3D point;
/*point.x = (pt->x+dRangeX[MIN])/xF + 0.5f;
point.y = (pt->y+dRangeY[MIN])/yF + 0.5f;
point.z = (pt->z+dRangeZ[MIN])/zF + 0.5f;*/
point.x = (pt->x + 0.5f) * xF + dRangeX[MIN] ;
point.y = (pt->y + 0.5f) * yF + dRangeY[MIN] ;
point.z = (pt->z + 0.5f) * zF + dRangeZ[MIN] ;
return (PtInRange(&point));
}
|
|
|
|

|
hi everybody,
when i draw a surface for example a trangle, just using 3 points, i just wonder why the the surface incudes the origin point (0,0,0) as a fourth point.
any ideal?
tia
Harald
|
|
|
|

|
hello,
is it possible to rotate the graph by pressing the button to a certain possition?
for example, i want to rotate the graph by pressing a button called "xy" in a view that only shows the 2d surface (xy)
tia
Harald
|
|
|
|

|
Hello!
Can someone help to me?
I need to make a surface from 2D data array containing the integer or double data.
I'm using this code:
////////////////////////////
void CDemoDlg::OnButton3()
{
m_Graph3D.ClearGraph();
m_Graph3D.SetCaption("Histogram");
double data,t[40];
double ar[50][255];
for(int ar_x=0;ar_x<50;ar_x++)
{
/* if(ar_x>20)
for(int ar_y=0;ar_y<255;ar_y++)
{
if(ar_y<127)
ar[ar_x][ar_y] = ar_y + rand()%3;
if(ar_y>=127)
ar[ar_x][ar_y] = 255-ar_y + rand()%3;
}
if(ar_x<=20)
*/ int ampl = (rand()%6+rand()%6+rand()%6)/3;
for(int ar_y=0;ar_y<255;ar_y++)
{
// if(ar_y<120)
ar[ar_x][ar_y] = sin(3.14*ar_y*(20+rand()%2))*ampl;
if(ar[ar_x][ar_y]<0)
ar[ar_x][ar_y]=0;
// if(ar_y>=120)
// ar[ar_x][ar_y] = sin(3.14*ar_y)*10;;
}
}
for (int i = 0; i < 50; i++)
for (int j = 0; j < 255; j++)
{
data = ar[i][j];//8 * exp(-(t[i] * t[i] + t[j] * t[j]) / 4);
m_Graph3D.AddElement();
m_Graph3D.SetElementType(i,2);
m_Graph3D.SetElementPointColor(i, RGB(0,0,100));
m_Graph3D.SetElementLineColor(i, RGB(200,50,50));
m_Graph3D.SetElementPointSize(i, 2.3);
m_Graph3D.PlotXYZ(j,data,i,i);
// m_Graph3D.SetElementType(j, 3);
}
m_Graph3D.AutoRange();
}
///////////////////////////////////
How to make the surface from this data array?
regards,
Georgi
|
|
|
|

|
Hi Friend,
this control is realy cool
|
|
|
|

|
Hey ,
I found this nice pice of software. And start to try it out,
but my problem is, that i can't register the ntgraph3d.dll to my windows 2000 system
I had read the 2d ActiveX description, for registration, but I can't solve the problem.
If I go to the folder in a command window and type regsvr32 ntgraph3d.dll
I got a windows messagebox with following message:
DllRegisterServer in ntgraph3d.dll failed.
Return code was 0x80040154
Anybody have an idea for this problem.
Best regardes
Eng
PS: Forgot: I use Visual Studio .Net 2003
|
|
|
|

|
Hey ,
I found this nice pice of software. And start to try it out,
but my problem is, that i can't register the ntgraph3d.dll to my windows 2000 system
I had read the 2d ActiveX description, for registration, but I can't solve the problem.
If I go to the folder in a command window and type regsvr32 ntgraph3d.dll
I got a windows messagebox with following message:
DllRegisterServer in ntgraph3d.dll failed.
Return code was 0x80040154
Anybody have an idea for this problem.
Best regardes
Eng
|
|
|
|

|
How to run 2 different(or same) OpenGL objects in one DialogBox?
IDC_STATIC1 is a first OpenGL objects Scene window.
IDC_STATIC2 is a second OpenGL objects Scene window.
IDC_STATIC1 and IDC_STATIC2 ,they are placed on IDD_DIALOG1.
code:
pclStatic = (CStatic *)GetDlgItem(IDC_OpenGL_Window);
pclGlView = new CGlView(pclStatic);
pclGlView->OnCreate();
pclGlView->InitGL();
pclGlView->DrawGLScene();
pclStatic1 = (CStatic *)GetDlgItem(IDC_OpenGL_Window);
pclGlView1 = new CGlView(pclStatic1);
pclGlView1->OnCreate();
pclGlView1->InitGL();
pclGlView1->DrawGLScene();
Will not involve both windows (IDC_STATIC2,IDC_STATIC1)
|
|
|
|
|

|
The source seems to throw a few errors when building on Microsoft Visual Studio .NET 2003. Any ideas?
c:\Documents and Settings\My Documents\Visual Studio Projects\NTGraph3D_src\GraphCtl.cpp(1143): error C2668: 'sqrt' : ambiguous call to overloaded function
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\math.h(626): could be 'long double sqrt(long double)'
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\math.h(578): or 'float sqrt(float)'
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\math.h(200): or 'double sqrt(double)'
while trying to match the argument list '(std::vector<_Ty>::size_type)'
with
[
_Ty=CPoint3D
]
|
|
|
|

|
Has anyone set line color in C#? I'm looking for the method that replaces RGB(...).
best regards,
|
|
|
|

|
Is it possible to stretch one axis for the purpose of viewing 3d data from an object which is in the shape of rectangle? The default axis is perfect for cube type data display but my application requires one axis to be stretched significantly to give the user a proper perspective. Any help will be greatly appreciated.
David
|
|
|
|

|
Hi I tried to use this control in WTL dialog based application generated by WTL Wizard. I simply put it in resource editor and when I try to run the application I got unhandled exception 0XC0000005. I tried the same in MFC and everything work just fine .So what is the problem ?
|
|
|
|

|
Hi..
I very interested with OpenGL programming ,so i need some help to learn more things about it, i need to learn how can work with joystics, how can i built a panl control ,please send to me an articles or notes or code or anything about this topics , then i will very greatful for you
|
|
|
|

|
Nice 3D Viewer !
I need a 3D printing like 2D graph...
I hope to get this function at next release...
han1963
|
|
|
|

|
Hi, i can not download the source code. Why?
Nice to see you here
|
|
|
|

|
Hi,
Basically a nice, useable control. The error messages are severely irritating though.
"Yo ho ho and a bottle of rum for that!"
"Your mother never allows you that!"
"Well I never ...!"
"You didn't say please first."
Leaves a very amateur flavour...
Mark
|
|
|
|
|
 |
|
|
General News Suggestion Question Bug Answer Joke Rant Admin
|
An ATL/STL ActiveX control based on OpenGL library for 3D data visualization
| Type | Article |
| Licence | |
| First Posted | 15 Jun 2003 |
| Views | 431,432 |
| Bookmarked | 255 times |
|
|