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

  1. Newsgroups: comp.graphics.gnuplot
  2. Path: sparky!uunet!caen!hellgate.utah.edu!irit.cs.utah.edu!gershon
  3. From: gershon%irit.cs.utah.edu@cs.utah.edu (Elber Gershon)
  4. Subject: Re: Locus
  5. Date: 17 Nov 92 16:00:12 MST
  6. Message-ID: <1992Nov17.160012.29870@hellgate.utah.edu>
  7. Organization: University of Utah CS Dept
  8. References: <1992Nov16.013111.11911@en.ecn.purdue.edu>
  9. Lines: 31
  10.  
  11. In article <1992Nov16.013111.11911@en.ecn.purdue.edu> kwan@en.ecn.purdue.edu (Yik-Yin Edwin Kwan) writes:
  12. >Is there a way to plot a locus with Gnuplot?  For example, how can I
  13. >plot x**2 + y**2 = 1 as a circle, without using the parametric form?
  14. >
  15. I have seen this question several times, so it might be a candidate for
  16. FAQ.
  17.     What you call locus is an implicit curve representation and gnuplot
  18. does not support it explicitly... However you can draw this curve as follows.
  19. Splot the explicit surface x**2 + y**2 - 1, and contour it at z = 0 (a
  20. single contour at z = 0). 'set view 0,0' and 'set nosurface' will give
  21. you the 2D plot of the contour you need without the surface.
  22.     Mathematically speaking, an implicit object is the zero set of an
  23. explicit object of one dimension up. An implicit curve is the zero set
  24. of an explicit surface, and implicit surface is the zero set of an 
  25. explicit hypersurface in 4d. Contouring is just constant sets of the
  26. surface, and so the zero set of an explicit surface (=implicit curve)
  27. is the contour at z = 0.
  28.  
  29. Here is a gnuplot script:
  30.  
  31. set contour
  32. set cntrparam discrete 0 # may be off here 
  33. set view 0,0
  34. set nosurface
  35. splot x**2 + y**2 - 1
  36.  
  37. Gershon
  38. /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
  39. Elber Gershon                            gershon@cs.utah.edu
  40. 918 University village                   Tel: (801) 582-1807 (Home)
  41. Salt Lake City, Utah 84108-1180          Tel: (801) 581-5642 (Work)
  42.