3D object

Efe0e543a4dee7beb86a93be1f76b760
0
akirayuki 101 Mar 25, 2003 at 05:01

hi! we r doing a project for our graphic assingment.
we just want the coding for openGL of sphere and a cube.
The sphere and also the cube can rotate, and translated.
besides that, we also need coding for scaling.
we will be really greatful if anyone helped us for our assingment.
thank u! :confused:

4 Replies

Please log in or register to post a reply.

6ad5f8c742f1e8ec61000e2b0900fc76
0
davepermen 101 Mar 25, 2003 at 13:46

well, i think on NeHe, you’ll find the needed code’s.. espencially code for a rotating cube is used in a lot of his tutorials (see tutorial .. 5 i think..)

for the sphere, he uses quadrics.. you can use other methods, but they are rather simple.. you’ll find it in another tut..

rotating:
check glRotatef(…)

scaling:
check glScalef(…)

moving:
check glTranslatef(…)

590e8bdac8129bd87b188df15e62d0e5
0
CyraX 101 Mar 25, 2003 at 13:47

The whole forum is here to help (in the first place).
However you should understand that help is not doing ur assignment. You must first start coding and understanding the concepts - No spoon feeding here. We would like to train Hackers in Grafix. Try to ask you questions and we will give you answers.

Get started:
In OGL your bible/Quran/Gita/Granth Sahib == Red Book. You will find the online version of it too.
For some example OS related code - nehe.gamedev.net

If you want any other help - ask. Smart guyz ask for help.
I should however warn you - THIS IS NOT A PLACE TO POST YOUR ASSIGNMENT and ask us to do it.

0684f9d33f52fa189aad7ac9e8c87510
0
baldurk 101 Mar 25, 2003 at 18:23

if your assignment consisted of more, it wouldn’t be a problem, but because it seems to me that to answer would be to tell you your whole assignment, then I’m gonna refrain from telling you the answer to YOUR assignment.

Try investigating on your own, using google and MSDN etc.

590e8bdac8129bd87b188df15e62d0e5
0
CyraX 101 Mar 26, 2003 at 12:52

I am sorry Akirayuki if I sounded rude. I was just worried of the consequences of giving away code in this form. I hope you understand.
However if you would like there are places where you would learn a lot of stuff.
Read the Red Book - it teaches you your assignment too.
Just take a look @ the following link - it has VERY good stuff

http://opengl.org/developers/code/tutorials.html
Of these you better read the Online Books section. The others are short cuts to learning OGL and you might not exactly be able to learn it as much as you can. < No offence meant >
I hope you get to work in OGL and enjoy it too.