# OpenGL Build a Wall in OPENGL

This topic is 4256 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hi, Right now i am doing an assignment which is asking me to build a house with a house with 2 rooms connected by a hallway. We should use polygon meshes. In the specs they have given that Each of us will be allocated with a different shaped rooms, so for example we may be told to use a room with 10 sides at one end and an 8 sided room at the other end of the connecting hallway. So they have given me that Room 1 has 8 vertices and the radius is 20 and the room 2 has 17 vertices and 11 radius. Th enumber of vertices equals the number of sides. And also they have provide me with the hieigh of the roof and the walls. How can i build a room which has so many sides? And what do this vertices and radius means... Sorry i am not so good @ this stuff, i am totally a system guy..Only for assignment pupose i do programming. It would be really great if anybody can help me on this. Thanks Hari

##### Share on other sites
The general policy is no homework... but seeing as how this is such a 'common knowlege' fact, I'll point out that:

the 8-sided room is an Octagon
http://en.wikipedia.org/wiki/Octagon

the 17-sided room is a HeptaDecagon

Both of those links show what the shapes of each room should look like.

##### Share on other sites
Hi,

Atleast now i know how to start of this. Is there a sample program or something i can have , so that i can start coding. I have went through some lessons in nehe website(until 8) . But is there a way i can auto generate the wall instead of calculating the vertices one by one? Something like a loop?

Thanks
Hari

##### Share on other sites
Also the link you provide me will be the shape of the Floo of the rooms right? Based on that i need to build the sides and roof of the room?

Thansk
Hari

##### Share on other sites
Quote:
 Original post by sri_hari1986is there a way i can auto generate the wall instead of calculating the vertices one by one? Something like a loop?

http://en.wikipedia.org/wiki/Unit_circle

*This response is intentionally vague due to the nature of homework.

I'm kinda curious what kind of assignment this could be...
Seems to be an odd mix of basic geometry/trigonometry but there seems to be opengl in the mix... generally you don't take a class with opengl without the trig as some prerequisite...
A very odd class it seems...

##### Share on other sites
I am going nuts with this subject. Because i totally know nothing about programming and i have been given an assignment in that. Let me ask my teacher whether i can drop this subject and take some other elective.

Regards
Hari

##### Share on other sites
"i totally know nothing about programming"

At least you are able to admit it, unlike others who just ask people to write the source code for them.

##### Share on other sites
This is actually a elective subject, i thaught i would try to do this just to get a feel in doing programming stuff...But after attending the classes i taught to drop the project...Because this subject is not for me..

##### Share on other sites
Generally you'd want to already know how to program before trying to program for 3d graphics.

Why not try and find an introductory programmaing elective instead, then save this one for next year?

1. 1
2. 2
3. 3
4. 4
Rutin
13
5. 5

• 26
• 11
• 9
• 9
• 11
• ### Forum Statistics

• Total Topics
633701
• Total Posts
3013435
×