-2

I want to make a simple rotating cube visualization using C++ for unix. What is an effective (efficient=fewest lines of code) way I can do this? I am running a mac. So far all the example code and tutorials I've found for this endeavor seem unix exclusive, but I am still searching for an appropriate library.

Can anyone please recommend a C++ module or tutorial which can lead me down the path of creating a compatible C++ code which generates an image of a rotating cube?

kilojoules
  • 9,768
  • 18
  • 77
  • 149
  • _"I am hoping for example code which generates a rotating cube or 3-d other object."_ **Nope!** We're not going to respond on _"Gimme teh codez plz"_ requests. (Neither for _"Cheezeburgers"_) – πάντα ῥεῖ Mar 03 '15 at 02:03
  • I want to program 3d rotating objects. I want to see how other people commonly do this, so I can work efficiently. Why is this wrong? – kilojoules Mar 03 '15 at 02:04
  • Please read [How to ask](http://stackoverflow.com/help/how-to-ask). It might also explain the downvotes. – Emil Laine Mar 03 '15 at 02:06
  • _@kilojoules_ _"Why is this wrong?"_ [It's off-topic](http://stackoverflow.com/help/on-topic) – πάντα ῥεῖ Mar 03 '15 at 02:06
  • C++ language has none graphic interface API so the question really is where with what and on what HW you want to render. There are **many** techniques so what exactly you want to achieve ? in how many dimensions (2D,2.5D,3D,stereo 3D,N-D)? with what features ? (light model,shading model,environment,...) what representation BR,Voxel map,analytic .... and much much more. specify more clearly and add what you have tried. – Spektre Mar 03 '15 at 08:26
  • 1
    look here for starters on some gfx API's http://stackoverflow.com/a/21699076/2521214 if you search a bit you will find many examples on how to draw cube even here ... – Spektre Mar 03 '15 at 08:31
  • 1
    btw what do you mean by efficient? (according to what speed,memory usage,...?) these few related Q/A of mine may help as starters http://stackoverflow.com/a/22981413/2521214 http://stackoverflow.com/a/28084380/2521214 http://stackoverflow.com/a/28737958/2521214 – Spektre Mar 03 '15 at 11:59
  • 1
    1. your question is still too broad and unspecific and demanding to do all the work for you that is the main reason for down votes. 2. choose what gfx API you will use, add platform (OS,libs...) 3. cube visualization itself is easy, setting up the 3D gfx environment is much harder if you do not have the experience with them but there are tons of tutorials with example codes so just search when you hit a specific problem then ask specific question – Spektre Mar 04 '15 at 07:38
  • Ok I will do my best and report back – kilojoules Mar 05 '15 at 23:57

1 Answers1

1

Modern C++ still doesn't provide libraries for drawing on screens or using GUIs.

You will have to research and find a GUI framework or Graphics Library that can help you with your objective.

Thomas Matthews
  • 56,849
  • 17
  • 98
  • 154