<div dir="ltr"><div>In the plot collection, it currently seems possible to plot only in the z-dimension, i.e. plot functions where the z value is derived from some f(x,y) <br></div><div><br>I needed the ability to plot functions where: x is derived from some f(y,z); and y is derived from some f(x,z). In case it is useful to others, my solution is on github at <a href="https://github.com/khardy/racket-surface3d.git">https://github.com/khardy/racket-surface3d.git</a><br>
<br>I copied intact the existing surface3d form to create surface3d/z (i.e. calculate z from x and y) and then derived two new forms, surface/x and surface/y, that calculate values for the x and y dimensions respectively. Some refactoring could be useful, since the three forms differ only in the various permutations of which dimension's min's and max's and values get used where, but maybe not worth the effort for just those three.<br>

<br></div><div>The new forms are in surface3d-xyz.rkt. The demo (surface3d-xyz-demo.rkt) below show drawing three surfaces, one each for part of the x, y, and z axes around the origin.<br></div><div><br></div><div>Cheers,<br>

<br></div><div>Kieron.<br><br></div>****<br><br>#lang racket/base<br><br>(require plot)<br>(require "surface3d-xyz.rkt")<br><br>(plot3d<br>  (list<br>    (surface3d/x <br>      (lambda (y z) 0) ; plot x = 0<br>
      -2 2 ; y-min/y-max<br>
      -2 2 ; z-min/z-max<br>      #:label "x = 0"<br>      #:color 3<br>      )<br>    (surface3d/y<br>      (lambda (x y) 0) ; plot y = 0 <br>      -2 2 ; x-min/x-max<br>      -2 2 ; z-min/z-max<br>      #:label "y = 0"<br>

      #:color 5<br>      )<br>    (surface3d/z<br>      (lambda (x y) 0) ; plot z = 0 <br>      -2 2 ; x-min/x-max<br>      -2 2 ; y-min/y-max<br>      #:label "z = 0"<br>      #:color 7<br>      )<br>    )<br>
  #:x-min -3 #:x-max 3<br>
  #:y-min -3 #:y-max 3<br>  #:z-min -3 #:z-max 3<br>  #:altitude 25<br>  )<br><br></div>