[Fluxus] My first fluxus-powered project

mrk25 mrk250 at gmail.com
Thu Dec 6 08:10:19 PST 2012


Hi Kas, thanks for your suggestions, i'll try to explain a couple of things.

> I looked over it and I couldn't spot the "terrible hack". Could you
> explain what you are doing and why? I have a hunch it has to do with
> blur's effects on the background, I have at times wanted to do
> something like that, at least.

hope my english here isn't too weird to understand: please forgive me,
I'm Italian :)

The first big problem that I encountered is that I can't load .obj files
on-the-fly because it freezes the output for some seconds...

So i load them all when executing the first script ( _start_linux.scm +
the included lib/objects.scm ) and put all objects by default to -1000
on Y axis.

After that the function (shapeSchema) - which is called when pressing
keyboard letters to have a sort of control pad ( see lib/keys.scm file )
- passes to the function (pulse) the objects that must be moved up of
1000 on the y axis and animated.

Here comes another problem: once an object is passed to the (pulse)
function and substituted with another, I can still see the first moving
and rotating 1000 units far in the background... quite ugly, because
when loading many objects they become an irregular spot fluctuating in
the far background.

At this point I needed to fastly patch this behaviour before saturday
and introduced a bgPlane object in the (pulse) function, that is simply
a very big black plane, still placed at -75 untis on the Z axis. It
hides far objects keeping the nearest ones well visible.

I guess it's not the proper way to do such things, but for now it's the
better solution I found, and enough for saturday evening.

Any help on this issues will be much appreciated.


> Didn't look so terrible at all. What surprised me most was how you
> tend to use (define) inside of other (define) statements. I didn't
> think that was legal. You may want to look into using "let" for such
> local variables. It goes like this;
>
> (let ((x 1) (y 2) (z 3))
> 	(with-state
> 		(translate (vector x y z))
> 		(build-cube)))
>
> There x, y and z are named variables local to the "let" scope. If they
> would depend on each other you'd use (let* ) instead.
>
> But hey, if it works.. :-). Generally I think that the bigger your
> project becomes the more Racket itself will steer you towards "proper"
> code. I'm finding that a very pleasant process.


This is my very first experience with scheme/racket and in general with
functional programming languages, so many things are done with PHP or
Javascript and in general web development methods - the only which I
more or less know - in mind...

I'll surely try to adopt your suggestion for the next time.

Do you think it will let me better understand and solve the previous
background problem?

I feel that it has something to do with variable scopes, but i'm still a
bit confused on how to manage them.

> Good luck with your gig!
>
> Kas.

Thanks!
Hope to bring back from Milano some videos to put on youtube next
week... In case, I'll notify to the list to show the results of my code.

And many, many thanks again for the beautiful software you shared!

--
mrk25
https://twitter.com/subaddiction




More information about the Fluxus mailing list