home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / graphics / 8034 < prev    next >
Encoding:
Internet Message Format  |  1992-07-22  |  1.6 KB

  1. Path: sparky!uunet!gatech!prism!gm35
  2. From: gm35@prism.gatech.EDU (Greg Montgomery)
  3. Newsgroups: comp.graphics
  4. Subject: 3d grid rotating around wrong point
  5. Message-ID: <64118@hydra.gatech.EDU>
  6. Date: 22 Jul 92 18:55:34 GMT
  7. Organization: Georgia Institute of Technology
  8. Lines: 15
  9.  
  10.  
  11. I am in need of some help with some 3d graphics programming. I have a program that reads in a series of x,y points with elevations, and I'm trying to display them as a 3d grid. I'm using polygons (triangles) to display the grid. The grid comes out good, but I would like to rotate it and scale it. I can do this without matrices, but when I put in the matrix code, it does not rotate properly. I've put together a matrixthat transforms each point by -.5, scales it, rotates it on the x and y axis, and then tran
  12.  
  13. sforms it back by .5. The grid seems to be rotating fine except for one corner by the origin which seems to be staying pretty much in one place. It's like the grid is rotating on that corner. I am pretty sure the matrix multiplication and the matrix-vector multiplication is working fine. I have a feeling that it has something
  14. to do with the transformations, but I'm not sure. I'm still in high school, and
  15. haven't even had trig yet, so this matrix and trig stuff is new to me, but I'm
  16. pretty sure most of the code is right. Does anybody have any ideas or code
  17. examples they could give me? Let me know if more details are necessary.
  18. Thanks!
  19.  
  20. Greg
  21.  
  22. -- 
  23. Greg Montgomery
  24. Georgia Institute of Technology, Atlanta Georgia, 30332
  25. uucp:      ...!{decvax,hplabs,ncar,purdue,rutgers}!gatech!prism!gm35
  26. Internet: gm35@prism.gatech.edu
  27.