Permalink
Browse files

Added gox sketch.

  • Loading branch information...
1 parent 052fc50 commit d61c9a6f649ba005b0804c0b98da80dc3afe1bb7 @technomancy committed Sep 20, 2009
Showing with 30 additions and 4 deletions.
  1. +1 −1 project.clj
  2. +27 −0 src/sketchbook/gox.clj
  3. +1 −2 src/sketchbook/log.clj
  4. +1 −1 src/sketchbook/pop.clj
View
@@ -4,5 +4,5 @@
:dependencies [["clojure" "1.0.0" "org.clojure"]
["clojure-contrib" "1.0-SNAPSHOT" "org.clojure"]
["processing.core" "1.0.6" "org.processing"]]
- :source-dependencies [["clj-processing" "applet"
+ :source-dependencies [["clj-processing" "master"
:git "git://github.com/technomancy/clj-processing.git"]]}
View
@@ -0,0 +1,27 @@
+(ns sketchbook.gox
+ (:use [rosado.processing]
+ [rosado.processing.applet]))
+
+(defn rotator [x y x-spin y-spin]
+ (ellipse (+ x (* (sin (/ (frame-count) 10.0)) (* 100
+ x-spin)))
+ (+ y (* (cos (/ (frame-count) 10.0)) (* 100
+ y-spin)))
+ 50 50))
+
+(defn draw []
+ (fill-int 0 10)
+ (rect 0 0 (width) (height))
+
+ (fill-int 255)
+ (rotator 100 100 1 1)
+ (rotator 350 100 1 -1)
+ (rotator 100 350 -1 1)
+ (rotator 350 350 -1 -1))
+
+(defapplet gox :title "Maybe something involving trig."
+ :setup (fn [] (smooth) (no-stroke))
+ :draw draw :size [640 480])
+
+;; (run gox)
+;; (stop gox)
View
@@ -58,10 +58,9 @@
(fade-background)
(swap! lines rest))
-
(defapplet log :title "Log visualizer"
:setup (fn [] (no-stroke) (background-int 0)) :draw draw
:width 510 :height 510)
-(run log)
+;; (run log)
;; (stop log)
View
@@ -27,4 +27,4 @@
;; To make things go:
;; (run pop)
-;; (stop pop)
+;; (stop pop)

0 comments on commit d61c9a6

Please sign in to comment.