[racket] Programmatic drawing

From: Jens Axel Søgaard (jensaxel at soegaard.net)
Date: Thu Oct 30 15:51:43 EDT 2014

MetaPict supports arbitrary curves and will produce picts.

   http://soegaard.github.io/docs/metapict/metapict.html

Given points p, q, r, ... and vectors (directions) d, e, f ... :

  (curve p .. q .. r .. s)  draws a "nice" curve from p through q and r to s
  (curve p .. q d .. r .. s)  draws a "nice" curve from p through q and r to s,
                                      and the curve leaves q in the direction d
  (curve p .. q .. r .. cycle) draws a closed curve through p, q and r
  (curve p .. q .. r -- s .. t) draws a curve from p through q to r then
                                        a line from r to s and finally
curves to t

There is a ton of examples here:
https://github.com/soegaard/metapict/blob/master/metapict/examples/metapost-examples.rkt

/Jens Axel



2014-10-30 19:16 GMT+01:00 C K Kashyap <ckkashyap at gmail.com>:
> Dear Racket folks,
>
> I'd like to use Dr Racket to generate some drawings. I liked the way I can
> compose and create images using slideshow. I could not figure how I could
> draw arbitrary curves though?
>
> When I looked for it I found the racket/draw package. Can the racket/draw
> functions be used along with slideshow?
>
> Or is there any other recommended package for achieving interactive drawing
> creation?
>
> Regards,
> Kashyap
>
> ____________________
>   Racket Users list:
>   http://lists.racket-lang.org/users
>



-- 
--
Jens Axel Søgaard


Posted on the users mailing list.