# Help on assignment 03

Posted by chayolle
Announcements Last Post
SoC Curricula 09/30/2017 01:08PM
Demarcation or scoping of examinations and assessment 02/13/2017 07:59AM
School of Computing Short Learning Programmes 11/24/2014 08:37AM
Unisa contact information 07/28/2011 01:28PM
 Help on assignment 03 June 22, 2006 11:02AM IP/Host: ---.telecomplus.net Registered: 14 years ago Posts: 39 Rating: 0
-In the 1st modification, if the sun and moon spheres has to be drawn with triangles, must we write our own method for it and if so, can we draw them by using triangle fans and triangle strip?

-For the 2nd modif, isn't it that the earth is already drawn with quadrilaterals?
 Re: Help on assignment 03 July 10, 2006 10:05PM IP/Host: 198.54.202.--- Registered: 14 years ago Posts: 78 Rating: 0
re mod2:
it also looks that way to me - the rotation about the axis looks wrong to me though. do you think there is a way to get glutWireSphere to draw solid spheres?
 Re: Help on assignment 03 July 11, 2006 09:02AM IP/Host: ---.johncom.co.za Registered: 14 years ago Posts: 111 Rating: 0
I hacked the code for recursive subdivision of triangles from chapter 6 of the text book, and with minor modifications (and much frustration) it works. Yes, you have to write your own routines. No, glutWireSphere will never draw solid spheres. There is a glut routine called glutSolidSphere that takes the same arguments, but it also uses quads so it won't count if you use it.

A word of warning when doing recursive subdivision of triangles: do not recurse too deeply or you will hang up your processor Recursing about 7 times for the sun is fine. Recursing 15 times freezes my PC completely.

Re the Earth drawn with quads, it is indeed. However, it is calling the glut function glutWireSphere, which I think is going to pose a huge problem with the texture mapping. We may have to home brew a routine to draw a sphere with quads in order to get the texture mapping to work.
 Re: Help on assignment 03 July 12, 2006 03:52PM IP/Host: ---.enetonline.co.za Registered: 14 years ago Posts: 78 Rating: 0
so I guess glutSolidSphere doesn't support texture mapping pity
 Re: Help on assignment 03 July 13, 2006 08:21AM IP/Host: ---.johncom.co.za Registered: 14 years ago Posts: 111 Rating: 0
It does not, but you can still use quadrics:

http://www.cs.ubc.ca/~alex/FASTRAK/node43.html
Sorry, only registered users may post in this forum.