home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / graphics / 11967 < prev    next >
Encoding:
Text File  |  1992-11-17  |  3.0 KB  |  75 lines

  1. Path: sparky!uunet!charon.amdahl.com!pacbell.com!decwrl!sdd.hp.com!usc!sol.ctr.columbia.edu!ira.uka.de!fhg!igd!pfuetz
  2. From: pfuetz@igd.fhg.de (Matthias Pfuetzner)
  3. Newsgroups: comp.graphics
  4. Subject: Re: Porting Sun PHIGS programs using NURBS
  5. Message-ID: <1699@igd.fhg.de>
  6. Date: 17 Nov 92 09:20:06 GMT
  7. References: <1992Nov10.183112.17144@yc.estec.esa.nl>
  8. Sender: news@igd.fhg.de
  9. Reply-To: pfuetz@igd.fhg.de (Matthias Pfuetzner)
  10. Organization: Zentrum fuer Graphische Datenverarbeitung, Darmstadt, FRG
  11. Lines: 57
  12. Phone: +49 6151 155-150
  13. Room: B 013
  14. Operating-System: SunOS 4.1.2
  15. Machine-Type: sun4c
  16. Machine-Name: sokrates
  17.  
  18. Hello Neil!
  19.  
  20. Both your e-mail addresses (neil@yc.estec.nl,neil@gec-erc.co.uk) aren't valid!
  21. So I reply in this newsgroup!
  22.  
  23. In article <1992Nov10.183112.17144@yc.estec.esa.nl> you write:
  24. >    We currently have a large program that makes extensive use of NURBS
  25. >surfaces using Sun PHIGS.  Is there anyone out there who has any information 
  26. >on porting something like this to other platforms and/or PHIGS packages.
  27.  
  28. I've been using SunPHIGS, X11R5 libphigs.a (which was written by Sun and is a
  29. subset of SunPHIGS, but produces PEX (PHIGS Extension to X) protocol calls.
  30. This implies that you need an X-Server which is capable of PEX) and graPHIGS,
  31. the PHIGS library of IBM. The NURBS shall be no problem when using the Sun
  32. based products (e.g. SunPHIGS and the libphigs.a which comes with X11R5 from
  33. MIT). Furthermore the NURBS shall be no problem when using graPHIGS on the
  34. console a potent IBM RS/6000 (potent meaning one of the upper end graphics
  35. adapters). If displayed to a dump X-terminal you will only see a wireframe
  36. model of the NURBS, so no shading, lighting will be possible.
  37.  
  38. For references I include a part of my code (if #ifdefs etc.)
  39.    Pfloat_list       uknots;
  40.    Pfloat_list       vknots;
  41.    Ppoint_grid34     grid;
  42.  
  43.    /* Apply the weights */
  44. #ifndef USE_GRAPHIGS
  45.    for( ii = 0 ; ii < ii_end ; ++ii )
  46.    {
  47.       grid.points.point4d[ii].x *= grid.points.point4d[ii].w;
  48.       grid.points.point4d[ii].y *= grid.points.point4d[ii].w;
  49.       grid.points.point4d[ii].z *= grid.points.point4d[ii].w;
  50.    }
  51. #endif
  52.  
  53. #if defined( AIXV3 ) && defined( USE_GRAPHIGS )
  54.    GPNBS( (Pint)2, (Pint) 3, uknots.num_floats - 2, vknots.num_floats - 3,
  55.           uknots.floats, vknots.floats, 0, 0, 0, 1, 4, grid.points.point4d,
  56.           uknots.floats[0], uknots.floats[uknots.num_floats - 1],
  57.           vknots.floats[0], vknots.floats[vknots.num_floats - 1] );
  58. #else
  59.    pnuni_bsp_surf( (Pint)2, (Pint)3, &uknots, &vknots, PRATIONAL, &grid,
  60.                    (Pint) 0, (Ptrimcurve_list *) 0 );
  61. #endif
  62.  
  63. I haven't been using any other PHIGS, so I can't tell you anything about it.
  64.  
  65. Hoping having helped a bit,
  66. Sincerly,
  67.         Matthias
  68.  
  69. P.S.: If you have questions, ask me!
  70. -- 
  71.     Matthias Pfuetzner  |  @work:  +49 6151 155-150  | @home: +49 6151 75717
  72.     6100 Darmstadt, FRG | ZGDV, Wilhelminenstrasse 7 | Lichtenbergstrasse 73
  73.       pfuetzner@igd.fhg.de, pfuetzner@zgdvda.UUCP    |  Keith Packard said:
  74.       R5 is different from R4. That's why we changed the release number :-)
  75.