From cf58219414ef46b70889de7e1e89c8f9478fa365 Mon Sep 17 00:00:00 2001 From: Kaustubh Maske Patil <37668193+nikochiko@users.noreply.github.com> Date: Wed, 17 Jan 2024 03:30:46 +0530 Subject: [PATCH] Add donut-with-scaling example --- examples/donut_with_scale.ml | 8 ++++++++ examples/dune | 5 +++++ 2 files changed, 13 insertions(+) create mode 100644 examples/donut_with_scale.ml diff --git a/examples/donut_with_scale.ml b/examples/donut_with_scale.ml new file mode 100644 index 0000000..8ed4bcb --- /dev/null +++ b/examples/donut_with_scale.ml @@ -0,0 +1,8 @@ +open Joy + +let () = + init (); + let c = circle 100. in + let hole = scale 0.5 c in + show [ c; hole ]; + write ~filename:"donut_with_scale.png" () diff --git a/examples/dune b/examples/dune index 4029bf3..ca6ebee 100644 --- a/examples/dune +++ b/examples/dune @@ -92,3 +92,8 @@ (name repeat) (modules repeat) (libraries joy)) + +(executable + (name donut_with_scale) + (modules donut_with_scale) + (libraries joy))