Pleated Hyperbolic Paraboloid
src/origami/tri.util.lisp
Mon Jul 6 23:50:38 CEST 2009 Tobias Rautenkranz <tobias@rautenkranz.ch>
* Pleated Hyperbolic Paraboloid
--- old-qt.examples/src/origami/tri.util.lisp 1970-01-01 01:00:00.000000000 +0100
+++ new-qt.examples/src/origami/tri.util.lisp 2014-10-30 07:37:26.000000000 +0100
@@ -0,0 +1,19 @@
+(defun expression-defun (name variables expressions)
+ `(defun ,name ,variables
+ (values ,@(rest expressions))))
+
+(defun print-to-file (file expression)
+ (with-open-file (out file :direction :output
+ :if-exists :append :if-does-not-exist :create)
+ (let ((*print-case* :downcase))
+ (print expression out)
+ (terpri out))))
+
+(defun printexpressionsdefun (name function-names variables expressions)
+ (loop
+ for function-name in (first (rest function-names))
+ for expression in (rest (first (rest expressions))) do
+ (print-to-file name (expression-defun function-name
+ (rest variables)
+ expression))))
+