[fluxus] build error: PDataArithmetic.cpp
james tittle
tigital at mac.com
Tue Nov 29 10:40:13 PST 2005
On Nov 29, 2005, at 10:32 AM, Dave Griffiths wrote:
>
> this one should do it:
>
> (clear)
> (point-width 3)
> (rotate (vector 0 90 0))
> (define p (build-particles 100))
>
> (define (init n)
> (pdata-set "p" n (vsub (vector 0 (flxrnd) (flxrnd)) (vector 0
> 0.5 0.5)))
> (let ((c (flxrnd)))
> (pdata-set "c" n (vector c c c)))
> (if (< n 1)
> 0
> (init (- n 1))))
>
> (define (update n)
> (let ((closest (pdata-op "closest" "p" n)))
> (let ((dir (vmul (vnormalise (vsub (pdata-get "p" n)
> closest)) 0.4))
> (centre (vmul (vnormalise (vsub (vector 0 0 0) (pdata-
> get
> "p" n))) 0.3)))
> (pdata-set "vel" n
> (vmul (vnormalise
> (vadd (vmul (vadd dir centre) 0.001) (pdata-get
> "vel"
> n))) 0.02 ))))
>
> (if (< n 1)
> 0
> (update (- n 1))))
>
> (define (anim)
> (grab p)
> (update (pdata-size))
> (pdata-op "+" "p" "vel")
> (ungrab))
>
> (grab p)
> (pdata-add "vel" "v")
> (init (pdata-size))
> (ungrab)
>
> (every-frame "(anim)")
>
> (blur 0.1)
...hmm, the good news is that it doesn't crash either way (with/
without "*"), but the bad news is that this script doesn't produce
anything here...
>> ...there are a coupla weird things I've noticed:
>>
>> 1. can't seem to get workspaces 2-8 working: ctrl-1, 9, and 0 work,
>> but any others have no effect
>
> has this gone wrong recently? works ok here but there is a horrible
> switch
> in main.cpp (104) that you might have to change - a bunch of
> numbers that
> seem to work with ctrl, I thought they might be different on
> another os,
> but no one seemed to complain :)
...I'll look into that: it has been a longtime problem for me, but I
just never mentioned it ;-)
>> 2. I need to reset the current working directory on osx, because atm
>> it's looking for files where the binary is, which is fluxus.app/
>> Contents/MacOS/fluxus...so, in order to access a file in a directory
>> of the same level as fluxus.app, you have to (load "../../../../../
>> examples/whatever.scm"), which is a bit of a pain ;-\
>
> If I get time I'd like to get rid of the examples and make some proper
> scripts which can also be used as tests in the future. The examples
> directory is full of stuff which may or may not be up to date.
>
> I might leave this till the next release though :)
...no prob: it really isn't a problem to make the default directory
external to the application package, it's just that I haven't done it!
james
More information about the Fluxus
mailing list