Output Shapes/Graphs?

May 16, 2011 at 11:58am
Hey! I am a reasonable C++ programmer, but I do not know anything about outputting diagrams. I was wondering if it is possible to output shapes/lines/graphs/ other diagrams, to the console, when running a programming? For instance, could I establish a "graph," set two points and draw a line between them? I do not have any specific program in which I need to use this, however, I was merely wondering if it is possible, and if so, how?

Thanks!

P.S. In case this is important, I am running Mac OSX, and Xcode 3.
May 16, 2011 at 12:02pm
You can't do advanced graphics in the console, but you could make the jump to non console programming

It's not really much harder :)

I suggest SFML as a graphics library: http://sfml-dev.org/
May 16, 2011 at 4:00pm
Well, openGL is what you can always go for... its lil bit hard at the begginig but u'll enjoy as it ages...
meanwhile to keepup you can also use libraries such as SFML,MiniGL,emWin...
May 19, 2011 at 2:35am
Thanks! But, Xander, when you say non-console programming, what exactly are you referring to?

(I am currently programming in the X-code developer, and then just running them in the x-code console).

Also, are SFML and openGL cross platform, so that I could also use them on Windows, or are then just for Mac?
Last edited on May 19, 2011 at 2:36am
May 19, 2011 at 6:06am
As you just want to draw some basic shapes, lines etc ... so any GUI library can also be good to start with. Although more than intermediate knowledge of c++ is required.

Doing opengl for basic graphics would be more complex than you will get something out of it.

May be you can have a look at Qt, wxWidgets, gtk etc etc.. Qt is cross platform easy to use on windows.. wxwidgets is cross platform but I don't know if a setup comes for installation on windows. gtk would be difficult to start on windows.
May 19, 2011 at 6:55am
Some people have a few initial setup videos with SFML 2.0, but ultimately they are avoidable if you build the library from the source yourself (not as difficult as it might sound).

SFML is cross platform; the same code should build on Windows, Ubuntu and Mac with a recompile (and a recompile of the SFML libraries) on the new platform.

Programmer3 wrote:
when you say non-console programming, what exactly are you referring to?

Your program will run in a GUI window rather than in a console. SFML makes the creation of this window extremely easy, and it also has functions for drawing basic shapes.
May 19, 2011 at 9:52am
Awesome! Thanks everybody!

I think I'm going to look into SFML. It sounds best for what I may try to do.
Topic archived. No new replies allowed.