Add your own alternative version
Stats
625.2K views 45.9K downloads 277 bookmarked
Posted
15 Jun 2003
|
Comments and Discussions
|
|
I can get the surface to draw but it doesn't draw correctly. It seems to create a bunch of spurious points.
were you able to get it to work?
|
|
|
|
|
Hello,
Yes, I got the activex working. Just make sure you set the data points correctly for each axis when you use Graph3D.PlotXYX
If the x,y and z data points do not correspond to the correct axes you will get points plotted that make no sense. I had to swap the y and z axes to get the correct results for a plot, as the activex does not use a proper xyz cartesian coordinate system.
A problem plotting lines though. The 3D line plot always closes the first and last point plotted with a straight line, resulting in a number of straight lines through the plot. OK if you want to draw a shape, but no good for a curved surface. Is this a bug?
I am still having problems with the surface plot elementtype=3. I get a blank canvas when the elementtype is set to 3 (surface). Lines and points work well though. I am using VB. Any ideas why the the surface plot will not plot?
modified on Thursday, March 12, 2009 5:48 PM
|
|
|
|
|
I want to have print option for 3D Graphs plotted using this ActiveX control . Can anyone help me in this.
There is one in 2D ActiveX, but he has not provided in this control - 3D ActiveX.
Thanks in advance. 
|
|
|
|
|
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.
|
|
|
|
|
did you ever figure out how to use it ?
|
|
|
|
|
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:
<br />
m_Graph3D.AddElement(); // fügt ein Element hinzu<br />
m_Graph3D.put_ElementType( 0 , 1); // definiert dasd ELement als Punkt<br />
m_Graph3D.put_ElementPointSize( 0, 10.0); // setzt die Punktgröße<br />
//m_Graph3D.put_ElementPointColor( 0 , ( ((unsigned long)((unsigned char)(piPixel/20 + 100))<<16) + ((unsigned short)((unsigned char)(piPixel/10))<<8))) ;<br />
<br />
for (i = 0; i < height; i++)<br />
{<br />
for (j = 0; j < width; j++) <br />
{<br />
piPixel = *piData++;<br />
m_Graph3D.PlotXYZ(j,i,piPixel, slElementID );<br />
}<br />
}<br />
<br />
m_Graph3D.put_TrackMode( 2 );<br />
m_Graph3D.AutoRange();<br />
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
|
|
|
|
|
I have found in some sites that i have to install some drivers to support OpenGL, Can any one suggest the relevant driver
NSRS
|
|
|
|
|
All you need is a graphics accelerator that supports OpenGL. All modern graphics accelerators do this.
Vista has no problems with OpenGL provided it is supported by the graphics accelerator
|
|
|
|
|
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
|
|
|
|
|
Dear Friends
can any body help in usin this 3D control in VB
I want to Plot the Graph from my Data Table
my Table Consist of
X = Columns
Y = Rows
Z = Values in that Row.
Can any body help in to plot the Drawing.
Z contains the Values which needs to be Ploted.
help needed urgently
NileshG
|
|
|
|
|
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
|
|
|
|
|
I had the same problem trying to compile the dll in VS C++ 2005.
CElement (and other iterators alike in the erring code) is a pointer which is different to an iterator. Hence you have to dereference it first then get its address before you can pass it through. This converts the iterator value into a pointer to an object behind the iterator.
Modifying each of the erring the code similar to below will make it compile:
SetLight(&*CElement);
|
|
|
|
|
Thanks hytleung!
Neat trick. It's 2011 and I'm using VS2010 now (back when I posted this message was using VS2005, as you noted).
Aside from sqrt((double)..., your fix made the compiler get to the last error. Only a linker error here.
And quickly finding a missing .lib reference to comsuppwd.lib, which is still prickly in this project-as-downloaded-now, the .dll is produced!
Four years older and still becoming wiser.

|
|
|
|
|
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'm using it in c#. It's pretty easy. Just go to your tools bar on the left hand side, right click, select "Choose Items" and then browse to the .dll. Then a new item for this control should appear in your tools bar.
I am having problems getting it to draw surfaces correctly though.
|
|
|
|
|
Thanks man. it was a gr8 help
|
|
|
|
|
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
|
|
|
|
|
there is one game on codeproject [ good website ]
in the OpneGL section (just scroll down the list)
but i need one like the Arked or Shooting game.
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?
<br />
...<br />
// Turn on the primitive connection mode (not connected)<br />
glBegin (GL_QUADS) ; <br />
<br />
/* Original code<br />
int i, npt = sqrt(theElement->m_PointList.size());<br />
aPoint = theElement->m_PointList.begin();<br />
for (aPoint, i=0; aPoint != theElement->m_PointList.end(); aPoint++,i++)<br />
{<br />
<br />
int j,k,n;<br />
if (PtInRange(&(theElement->m_PointList[i])))<br />
{<br />
// i, j, k, n ・4 indices of a quad<br />
// Counter Clockwise direction<br />
<br />
j = i + npt; // Other vertices indices<br />
k = j+1;<br />
n = i+1;<br />
*/<br />
<br />
int i = 0 ; <br />
int npt = theElement->m_PointList.size() ;<br />
int nxpt = sqrt(npt);<br />
int nypt = sqrt(npt);<br />
int x, y ;<br />
for (i = 0, x = 0 ; x < nxpt-1 ; x++, i++)<br />
for (y = 0; y < nypt-1 ; y++, i++)<br />
{ <br />
int j,k,n ;<br />
if (PtInRange(&(theElement->m_PointList[i])))<br />
{<br />
// i, j, k, n ・4 indices of a quad<br />
// Counter Clockwise direction<br />
<br />
j = i + nxpt ; // Other vertices indices<br />
k = j+1 ;<br />
n = i+1 ;<br />
...<br />
|
|
|
|
|
|
General News Suggestion Question Bug Answer Joke Praise Rant Admin
Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.
|
|