3D and 2D

Questions about Marilou Open Devices Access (MODA)
Post Reply
yusie.rizal
Posts: 20
Joined: Thu Jun 16, 2011 8:01 am

3D and 2D

Post by yusie.rizal » Wed Nov 23, 2011 8:20 am

Hi,
Is there anyone here who make a program to plot the interested data (for example: we interested in torque or angle data) and when I run the robot, not only I can see the simulation robot, but I also can see the plotting angle at current time. This is a typical of classical simulation like simulink and something like that.. Because so far, I only got text data (after use c function just like _cprintf(...)), and simulation program (anyKode).

Best regards,
Yusie

fabian
Posts: 36
Joined: Sun Jun 15, 2008 9:45 am

Re: 3D and 2D

Post by fabian » Wed Nov 23, 2011 9:37 am

Hi yuzie,

By my side, i plot directly on screen using
hdcecr=GetDC(NULL);

SetPixel(hdcecr,x,y,color);
MoveToEx(hdcecr, x,x,NULL)
LineTo( .....)

ReleaseDC(NULL,hdc)

Under Linux i don't know how to do .... I think there is no way to plot directly in Marilou-Exec window.
Fab

yusie.rizal
Posts: 20
Joined: Thu Jun 16, 2011 8:01 am

Re: 3D and 2D

Post by yusie.rizal » Wed Nov 23, 2011 1:00 pm

Hi Fabian,

Yeah, I think it doesn't need to plot directly in Marilou-Exec Windows, just another windows is ok.

Are You talking about Windows Programming? Is it separate windows?
How did you do that?

fabian
Posts: 36
Joined: Sun Jun 15, 2008 9:45 am

Re: 3D and 2D

Post by fabian » Wed Nov 23, 2011 2:04 pm

It is basic Windows programming. GetDC(NULL) allows to write directly graphics on the screen.
You can use all Windows GDI primitives (Rectangle, Line, SetPixel, Fill etc.).

if you have your of window (MFC, win32), use GetDC(hwnd) to write directly in your window.
Fab

Post Reply