[racket] Function composition in Racket

From: Gregory Woodhouse (gregwoodhouse at me.com)
Date: Tue Oct 16 20:03:13 EDT 2012

Indeed it does! These plots are very nice.

On Oct 16, 2012, at 1:35 PM, Neil Toronto <neil.toronto at gmail.com> wrote:

> On 10/16/2012 12:02 PM, Michael Wilber wrote:
>> Does surface3d and isosurface3d from racket/plot do what you want?
>> 
>> file:///usr/share/racket/doc/plot/renderer3d.html?q=isosurface#(def._((lib._plot/main..rkt)._isosurface3d))
> 
> In particular:
> 
> #lang racket
> 
> (require plot)
> 
> (define (f x y)
>  (+ 2 (* 2 x) (* 5 y) (* 1/2 x y y) (* 6 x x)))
> 
> (plot3d (surface3d f -1 1 -1 1))
> (plot3d (contour-intervals3d f -1 1 -1 1 #:label "f(x,y)"))
> 
> (define (g x y z)
>  (+ (* x y) (* y z) (* z x)))
> 
> (define c 0.25)
> 
> (plot3d (isosurface3d g c -1 1 -1 1 -1 1))
> (plot3d (isosurfaces3d g -1 1 -1 1 -1 1 #:label "g(x,y,z)"))
> 
> 
> Isosurfaces are visualized using marching cubes, whose patent finally ran out a few years ago.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20121016/2db267ca/attachment-0001.html>

Posted on the users mailing list.