PDA

View Full Version : 3D object


akirayuki
03-24-2003, 10:01 PM
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:

davepermen
03-25-2003, 06:46 AM
well, i think on NeHe (http://nehe.gamedev.net), 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(...)

CyraX
03-25-2003, 06:47 AM
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.

baldurk
03-25-2003, 11:23 AM
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.

CyraX
03-26-2003, 05:52 AM
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.