In case you didn't know, pixelpusher (evan.raskob) is a live video performance artist, or "pixelist" based in London, UK. Click the Info button above for hiring and contact info.
3D

Smooth Hands

by pixelpusher on Tuesday 5 January 2010
[Blog, Visuals, images]

hands-smooth-inner02

Originally uploaded by da mad pixelist

I’ve been experimenting with extruded shapes, with the end goal of fabricating some interesting ones using a 3D printer at the University I teach at, University for the Creative Arts, Farnham (UK).

So far, it has been a long learning process – first, making extrusions of my hands using Fluxus and a custom-written OpenCV-based image-outline-tracer in C++ (using some OpenFrameworks); then, using Dave’s extrusion functions in fluxus mixed with my live-drawing sketches, coupled with the OBJ-file export, and finally imported into Blender (for some nice ray-tracing).

The trouble is, I can create 3D shapes but hey have no “solidity,” which means their outlines have no thickness. Apparently you can’t 3D print objects and just hope that they are thick enough, or tweak it on the machine, as I’d hoped. No, as with all computers and electronic devices, they only do EXACTLY what you tell them to do, and nothing more or less.

The image here is a reject from Fluxus/Blender, where I created an inner shape by duplicating the original shape and growing it outward along its normals (used for lighting, normals are perpendicular to the surface of the object, meaning they point exactly outwards and are useful for expanding shapes). The problem is that my shape is so complex, I can’t get away with simply growing it. I’m going to need to do some horrible maths, I can feel it…

Still, I really like this image.  I’m a big fan of Salvador Dali (don’t laugh) and the infinite blue background and contrasting, surreally-melted hand shape in front lends this image a particularly Dali-esque quality, I think.

2 Comments Digg del.icio.us

messing about with solid 3D geometry

by pixelpusher on Thursday 10 December 2009
[Blog, Visuals, video]

Just a sketch, playing with “extruded shapes” – basically, 3D geometry in a big long cheese log, doped up with some sinusoidal harmonics.

Some code:

(require fluxus-016/shapes
scheme/list)

(clear)

(define l (build-list 20 (lambda (i)
(vector 0 0 (+ 10 (* -1 i))))))

(define w (build-list 20 (lambda (i)
(* 1 (+ 1 (sin (* 3.14156 (/ i 20))))))))

;(define w (build-list 10 (lambda (i) 4)))

(hint-wire)

(define (sinuside circ complexity)
(define (_ c n)
(cond [(< n 1) empty]
[else
(cons (vadd (car c) (vmul (car c)
(* 0.3 (sin (* (* complexity 3.1415) (/ n (length circ)))))))
(_ (cdr c) (- n 1)))
])
)
(_ circ (length circ))
)

(define circle (sinuside (build-circle-points 80 1) 16))

(define pe
(with-state
(rotate (vector 0 0 90))
(build-partial-extrusion circle l 1)))

(recalc-normals 1)

(define (draw-extr e)
(with-primitive e
(partial-extrude
;(* (length l) (+ 0.5 (* 0.25 (+ (sin (time)) 1))))
(length l)
(sinuside (build-circle-points 80 1) (round (* (time) 16)))
l
w
#(0 1 0)
1)
)
)

(define (animator)

(draw-extr pe)
)

(every-frame (animator))
No Comments Digg del.icio.us

Toad Circle particle system

by pixelpusher on Friday 4 December 2009
[Blog, Visuals, video]

Playing with a circular particle system based on a water simulation, done using Fluxus (http://pawfal.org/fluxus). Energy is tranferred between adjacent toads, so after time they start to bounce back and forth chaotically.

Code:

; a simple script that looks like it could be made into a
; water simulation of some kind

(clear)

(require fluxus-016/shapes)

(hint-ignore-depth)

; dimensions of the circles
(define elems 20)
; angle between each element
(define elem-angle (/ 3.14156 elems))

; simulation constants
(define max-dist 10)
(define max-dist-sq (* max-dist max-dist))

(define min-dist 4)
(define min-dist-sq (* min-dist min-dist))

(define max-vel-mag 0.1)

; stops the simulation going out of control
(define max-vel (vmul (vector (cos elem-angle) (sin elem-angle) 0) max-vel-mag))
(define max-vel-sq (vdist-sq max-vel (vector 0 0 0)))
(define trans 0.008)  ; the amount the energy transmitted to
; the neighboring vertex

; feedback velocity per frame
(define feedback 0.1)

; complexity of initial positions (sin peaks, basically)
(define complexity 4)

; make a list of points in a circle
(define circle-points (build-circle-points elems 1))

(define tex (load-texture "/Users/evan/cvs/newflx/fluxus/textures/whitetoady.png"))

(define s (build-particles elems))

(with-primitive s

    (pdata-add "vel" "v")
    (pdata-add "v0" "v")
    (pdata-add "p0" "v")

    (pdata-index-map!
        (lambda (i p)
            (list-ref circle-points i))
        "p")

    ; copy default pos at radius 1
    (pdata-copy "p" "p0")

    ; scale circle radius
    (pdata-index-map!
        (lambda (i p)
;            (vmul p (+ (* (* 0.5 (+ 1 (sin (* 3.4156 (/ i elems)))))
;                (- max-dist min-dist)) min-dist)))
            (vmul p (* (* 0.5 (+ 1 (sin (* complexity (* 3.4156 (/ i elems)))))) max-dist))) 

        "p")

    ; start off the simulation with random point distances
;    (pdata-index-map!
;        (lambda (i p)
;            (vadd p (vmul p (* (* max-dist 0.4) (crndf)) )))
;        "p")

    (pdata-index-map!
        (lambda (i vel p)
            (vmul p (/ max-dist 10)))
        "vel" "p")

    ; store initial velocity
    (pdata-copy "vel" "v0")

    ; start off the simulation with random colours
    (pdata-map!
        (lambda (c)
            (rndvec))
        "c")

    ; start off the simulation with random colours
    (pdata-map!
        (lambda (s)
            (vector 2 2 0.6))
        "s")
    )

(define (simulate n)
    (cond [(< n 0) 0]
        [else

            (let* [(result (pdata-get "vel" n))
                    (p (pdata-get "p" n))
                    (p-sq (vdist-sq p (vector 0 0 0)))]

                (cond [(> p-sq max-dist-sq)
                        ;                        (display "max")(newline)
                        ; we are above "sea level" head down
                        (pdata-set "vel" n (vmul (pdata-ref "vel" n) -0.9))
                        ;                        (pdata-set "vel" n (vmul (pdata-ref "v0" n) -1))
                        (pdata-set "p" n (vmul (pdata-ref "p0" n) max-dist))
                        ]
                    [(< p-sq min-dist-sq)
                        ;                        (display "mIN")(newline)
                        ; we are below "sea level" head up
                        ;                        (pdata-set "vel" n (pdata-ref "v0" n))
                        (pdata-set "vel" n (vmul (pdata-ref "vel" n) -0.9))
                        (pdata-set "p" n (vmul (pdata-ref "p0" n) min-dist))
                        ]
                    [else

                        (let [(pv (* (vdist (pdata-get "vel" (- n 1)) (vector 0 0 0)) trans))
                                (nv (* (vdist (pdata-get "vel" (+ n 1)) (vector 0 0 0)) trans))]

                            ; mix in the surrounding verts to transmit energy around
                            (set! result (vadd result
                                    (vmul result pv)))

                            (set! result (vadd result
                                    (vmul result nv)))

                            ; add the result to the existing velocity

                            (pdata-set "vel" n (vadd (pdata-get "vel" n) (vmul result feedback)))
                            ;(pdata-set "vel" n (vadd (pdata-get "vel" n) result))
                            )
                        ]
                    )

                (let* [
                        (v (pdata-get "vel" n))
                        (v0 (pdata-get "v0" n))
                        (vmax (vmul v0 max-vel-mag))
                        (v-sq (vdist-sq v (vector 0 0 0)))]
                    ; clamp the velocity - this stops the
                    ; simulation going too fast and blowing up
                    (cond [(> v-sq max-vel-sq)
                            ; divide by mag to get sign, mult by max-vel
                            (pdata-set "vel" n (vmul (vmul v (/ 1 (vmag v))) max-vel-mag))
                            ]
                        )
                    )

                )

            (simulate (- n 1))
            ]
        )
    )

(define (render)
    (set! feedback (* 0.4 0.5 (+ 1 (sin (* 0.3 (time))))))
    (with-primitive s
     (rotate (vector 0 0 2))
        (texture tex)
        (simulate (pdata-size))
        (pdata-op "+" "p" "vel")
;        (recalc-normals 1)
        )
    )

(every-frame (render))
No Comments Digg del.icio.us

medusa – extruding drawing

by pixelpusher on Wednesday 29 July 2009
[Blog]

medusa

Originally uploaded by da mad pixelist

I was playing around with Fluxus today and Dave’s new extruding library. Now I can make drawings out of a collection of different 3d shapes along a path, and animate them growing… very fun stuff. Hopefully this will make its way into a music video soon. Code included – needs cleanup for the web, references a list of texture images that I’m sure you don’t have (unless you hacked my precious laptop).

Oh, by the way, there is a subtle bug in the code where points get added to a “stroke” when they don’t exist – that’s why all lines connect to the center of the screen.  I didn’t fix it, though, because I like the effect (for now, anyway).  Happy scheming!

(clear)

(define (empty? l) (null? l))

(define txtr-path “/Users/evan/cvs/tmpflx/fluxus/drawing/textures/”)

(define txtr-names (list “truck-front.png” “kittenhead.png”
“car-front.png” “tv.png”
“circlt.png” “ol-fish.png”
“piece9.png” “routmastergrill.png”
“leatherchair.png” “cathair.png”
“texture_4.png” “moonclr.png”
“grillhair.png” “grillteeth.png”
“rose.png” “rustytextr.png”
)
)

; build texture list from file names and return it
(define (build-txtr-list txtr-names)
(for/list ([s txtr-names])
(load-texture (string-append txtr-path s))
))

(define txtrs (build-txtr-list txtr-names))

;— mix two numbers based on percent of first
(define (mix val1 val2 amt)
(+ (* val2 (- 1 amt)) (* val1 amt))
)

;—– return a vector on a circle based on index

(define (calc-xyz index max-index r)
(let*
( [angle (* 6.28312 (/ index (- max-index 1)))]
[x (* (cos angle) r)]
[y (* (sin angle) r)] )
(vector x y 0))
)

; gets a line representing a segment of the projection of the mouse into 3D space
; should move this into the fluxus scheme library
(define (get-line-from-mouse)
(let* ((ndcpos (vector (* (- (/ (mouse-x) (vx (get-screen-size))) 0.5) 2)
(* (- (- (/ (mouse-y) (vy (get-screen-size))) 0.5)) 1.5) -1))
(scrpos2 (vtransform (vmul ndcpos 50) (minverse (get-camera-transform))))
(scrpos (vtransform ndcpos (minverse (get-camera-transform)))))
(list scrpos scrpos2)))

; we’ll just use the end of the projection line here
(define (mouse-pos)
(cadr (get-line-from-mouse)))

; converts a 2D vector into an angle, with some dodgy dave maths
(define (2dvec->angle x y)
(let ((q (/ 3.141 2)))
(when (zero? y) (set! y 0.0001))
(cond
((>= y 0)
(fmod (* (+ q q q (- q (atan (/ x y)))) 57.2957795) 360))
(else
(fmod (* (+ q (- q (atan (/ x y)))) 57.2957795) 360)))))

;—–
;– extrusion builder funcs

(define profile (build-circle-profile 12 0.5))

(define empty-path ‘( (vector 0 0 0) (vector 0 0 0) ))

(define (extruder path)
(define a
(with-state
(wire-colour 0)
(colour (vector 1 1 1))
(specular (vector 1 1 1))
(shinyness 20)
(hint-wire)
(build-partial-extrusion profile path 1)))
a)

;——————————————————
; strokes are collections of points representing mouse movement

(define-struct stroke (points extr txtr rot) #:mutable)

(define (build-stroke)
(make-stroke (list) (extruder empty-path) (car txtrs) (vector 0 0 0)))

(define (stroke-clear stroke)
(set-stroke-extr! (extruder empty-path)))

(define (stroke-add stroke pos)
(set-stroke-points! stroke (append (stroke-points stroke) (list pos))))

(define (stroke-last-point stroke)
(cond
[(not (empty? (stroke-points stroke)))
(car (reverse (stroke-points stroke)))]
[else (vector -999 -999 -999)]
)
)

(define (stroke-update stroke)

; make a new point when the mouse is suitibly far from the last point
(when (> (vdist (stroke-last-point stroke) (mouse-pos)) 0.5)
(stroke-add stroke (mouse-pos))
;        (printf “point: ~a / ~a” (mouse-pos) (stroke-last-point stroke))(newline)
)

(destroy (stroke-extr stroke))
(set-stroke-extr! stroke (extruder (stroke-points stroke)))
)

(define (stroke-rotate stroke r)
(set-stroke-rot! stroke (vector 0 0 (fmod (+ (vector-ref (stroke-rot stroke) 2) r) 360)))
)

(define (stroke-advance stroke)
(cond ([not (empty? (stroke-points stroke))]
(let*
((lst (stroke-points stroke))
(1st (car lst))
(l (- (length lst) 1))
(last (list-ref lst l))
(prv (list-ref lst (- l 1)))
(diff (vsub prv last))
)
(set-stroke-points! stroke (append (cdr lst) (list diff)))
)
(stroke-update stroke)
))
)

;——————————————————

; a fluxus mouse pointer!
(define (draw-mouse)
(with-primitive mp
(identity)
(colour (vector 1 1 0))
(translate (mouse-pos))
(hint-unlit)
))

(define strokes (list))
(define mouseIsDown #f)

(define cstroke ‘())

(define last-txtr (car txtrs))

(define (draw-stroke s)
(with-state
(texture (stroke-txtr s))
(rotate (stroke-rot s))
(with-primitive (stroke-extr s)
(partial-extrude
(* (* 0.5 (+ 1 (sin (* 4 (time))))) (length (stroke-points s)))
profile
(stroke-points s)
(build-list (length (stroke-points s)) (lambda (n) 4))
(vector 0 0 1)
0.05)))
)

(define (draw-strokes strokes)
(cond [(not (empty? strokes))
(for/list ((s (reverse strokes)))
(draw-stroke s)
(stroke-rotate s rotz))
]
)
)

(define (print-stroke-points s)
(define points (stroke-points s))
(for/list ((p points))
(display p)(newline)))

;(start-audio “system:capture_3″ 512 44100)

(define speed -20)

(define e (build-plane))

;——– useful state vars

(define rotz 0)
(define txoffset 0)

;——— where the drawing gets done!!!!

(define (animate)

;(hint-unlit)
(blur 0)
;(texture last-txtr)
(opacity 0.5)
;   (blend-mode ’src-alpha ‘dst-alpha)
;    (blend-mode ’src-alpha ‘one)

(hint-ignore-depth)
(colour (vector 1 1 1))

;   (draw-mouse)
(cond [(mouse-button 1)
;(display "down")(newline)
(cond [(not mouseIsDown)
(set! mouseIsDown #t)
(set! cstroke (build-stroke))
(set-stroke-txtr! cstroke last-txtr)
]
)
(stroke-update cstroke)]

[else
(cond [ mouseIsDown
(set! strokes (cons cstroke strokes))
])
(set! mouseIsDown #f)
]
)

;            (audio-distort cstroke)

(draw-strokes strokes)

)

(set-camera-transform (mtranslate (vector 0 0 -10)))
(light-diffuse 0 (vector 0 0 0))
(define l (make-light ‘point ‘free))
(light-diffuse l (vector 1 1 1))
(light-position l (vector -10 10 0))

(every-frame (animate))

No Comments Digg del.icio.us

Sine-Line visual experiments

by pixelpusher on Tuesday 1 April 2008
[Blog]

sine line sketch 01

Some works-in-progress I’ve been experimenting with – simple, colorful audio streams filtered according to frequency, sometimes rendered as 3D geometric shapes. I’ll be performing this with Rob A. and Jag at the Minesweeper gig coming up.

Read on for more images

No Comments Digg del.icio.us
pixelpusher

Promote Your Page Too