PDA

View Full Version : Creating Contours in two directions



karbuckle
11-09-2004, 11:41 AM
Greetings to all.

I would like to be able to create contour lines in two directions using the automatic texture coordinate generation. I have no problem getting the contour lines in one direction using a 1D texture map, but canít seem to get this going in two directions.

Using the sample code in the OpenGL Programming Guide as an example, I simply want another set of contour lines to propagate at 90 degrees to the other contour lines.

I have tried creating a 2D texture and then specifying the T coordinate to be created in addition to the S coordinate. But my results haven't been very good.

Is this the correct approach? If so, I would really appreciate some pointers in getting this to work correctly. If this isn't the correct way to go about this, please let me know how this should be done.

Here is the code I am referencing which can be found at example 9-6 (http://www.parallab.uib.no/SGI_bookshelves/SGI_Developer/books/OpenGL_PG/sgi_html/ch10.html#id72524)

Thanks in advance for your time and help!