home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / sys / sgi / 16284 < prev    next >
Encoding:
Text File  |  1992-11-11  |  2.3 KB  |  79 lines

  1. Newsgroups: comp.sys.sgi
  2. Path: sparky!uunet!ukma!darwin.sura.net!sgiblab!sgigate!odin!koosh.asd.sgi.com!howardl
  3. From: howardl@koosh.asd.sgi.com (Howard Look)
  4. Subject: Re: GL hacks - Rotating text
  5. Message-ID: <1992Nov11.185314.11479@odin.corp.sgi.com>
  6. Sender: news@odin.corp.sgi.com (Net News)
  7. Nntp-Posting-Host: koosh.asd.sgi.com
  8. Reply-To: howardl@koosh.asd.sgi.com (Howard Look)
  9. Cc: howardl
  10. Organization: Silicon Graphics, Inc., Mountain View, CA, USA
  11. References:  <BxIqvu.B17@usenet.ucs.indiana.edu> <s78h2fo@zola.esd.sgi.com>
  12. Date: Wed, 11 Nov 1992 18:53:14 GMT
  13. Lines: 64
  14.  
  15. In article <s78h2fo@zola.esd.sgi.com>, cmarrin@fred.esd.sgi.com (Chris
  16. Marrin) writes:
  17. |> 
  18. |> In article <BxIqvu.B17@usenet.ucs.indiana.edu>, "Mark E. Johnson"
  19. <maejohns@bronze.ucs.indiana.edu> writes:
  20. |> > 
  21. |> > Suppose I wish to draw labeled cubes (similar to wooden blocks
  22. |> > with letters on their sides) and have them rotate all over the place.
  23. |> > 
  24. |> > I know how to rotate things around, but am having a hard time
  25. |> > with the letters.  I could figure out the coordinates of the
  26. |> > vertices of these letters and draw them each time - but this
  27. |> > leads to ugly results.  
  28. |> > 
  29. |> > Has anyone written code to do someting similar, say with the
  30. |> > fm calls?  Is it as tedious as I think it will be?  Any sample
  31. |> > code out there?  
  32. |> > 
  33. |> 
  34. |> Use Inventor...
  35. |> 
  36.  
  37. (Oh, bless your heart, Chris.)
  38.  
  39. Inventor can take any Adobe type-1 font and extrude it into three
  40. dimensions. The Text3 object behaves just like any other 3D object; it
  41. can be rotated, scaled, texture mapped, whatever.
  42.  
  43. To address your specific example, here is a simple scene graph that
  44. looks like a wooden block. If you have loaded the inventor_eoe subsystem
  45. (which comes with 4.0.5) you can save this snippet to a file, then read
  46. it into /usr/sbin/SceneViewer.
  47.  
  48. #Inventor V1.0 ascii
  49.  
  50. Separator {
  51.     Separator {
  52.     Material {
  53.         diffuseColor .6 .2 .1
  54.     }
  55.     Cube {
  56.     }
  57.     }
  58.     Separator {
  59.     Material {
  60.         diffuseColor .2 .3 .5
  61.     }
  62.     Transform {
  63.         translation 0 -.7 1.2
  64.         scaleFactor .2 .2 .2
  65.     }
  66.     Text3 {
  67.         string "A"
  68.         justification CENTER
  69.     }
  70.     }
  71. }
  72.  
  73. Writing an equivalent program using Inventor is very straightforward.
  74.  
  75. Hope that gives you some ideas.
  76.  
  77. Howard Look   Silicon Graphics   howardl@sgi.com   (415) 390-1780
  78. ..__   One of these :) after being run over by one of these O-O
  79.