Moiré Demo
-
-
Mesmerising! Wait...what was I going to say? ...
-
How is it done? Let me tell you:
I draw two images with lots of concentric circles on them, and then I would like to XOR them while moving them around in Lissajous curves.
It would have been so much easier if setBlend() had an XOR mode, but alas, it does not.So I knew that a XOR b can be described as (a AND NOT b) OR (b AND NOT a), and I didn't want to do this operation for each pixel.
Solution:- Use setBlend(3), meaning subtraction, to subtract image b from image a. This represents the (a AND NOT b) part of the formula.
- Use setBlend(3) again, to subtract image a from image b. This corresponds to (b AND NOT a).
- Lastly, just draw the resulting images on each other using the mix mode, setBlend(1), This is the OR part of the formula.
So I just do this for each frame, and also update the positions by adding some cos() and sin() to get smooth movement curves.
-
If there was one thing I hoped for at the very beginning of FUZE, it was that a 'scene demo' community would develop. With this and the Plasma demo, we are on our way.
Hmm.. I feel a competition coming on!
-
@spt-games said in Moiré Demo:
Mesmerising! Wait...what was I going to say? ...
You are beginning to feel very sleepy... So very sleepy...
-
@vinicity said in Moiré Demo:
@spt-games said in Moiré Demo:
Mesmerising! Wait...what was I going to say? ...
You are beginning to feel very sleepy... So very sleepy...
Zzzzz.
-
@Jonboy said in Moiré Demo:
If there was one thing I hoped for at the very beginning of FUZE, it was that a 'scene demo' community would develop. With this and the Plasma demo, we are on our way.
Hmm.. I feel a competition coming on!
I would love that!
-
@vinicity said in Moiré Demo:
I would love that!
So would I but I'd have no idea how to write one. I have spent many, many hours just watching Amiga demos.
-
I just re-shared a new version (2.0) of this. It is now much smoother and better optimised than before...