javascript

Core Image Questions

idlefon's picture

So I've been messing with CI filters for sometime and bumped to these questions/problems:

1- Isn't __color (defined both in JS editor and the kernel itself) a vec4? I'm asking this because I tested a simple dot function and the results were different. I attached the composition.

2- What is the best way to smooth the output especially in filters that are comparing a specific pixel with a bunch of others such as it's neighbors. I used pre-bluring the image and it worked (the output doesn't give the impression of being "noisy") but was wondering if something could be done inside the kernel. "smoothstep" maybe?

3- What are the first two arguments in the .apply command in the filter JS. I think the first one is the DOD (thanks to http://machinesdontcare.wordpress.com/2007/12/15/core-image-filters/ ) but the second one which is "null" usually I don't know. Is there a reference anywhere about the JS in CI.

4- Is there any resource for kernel examples. I would love to see apple's own CI filter's kernel (or any other "private" CI filter)?

I know, I know; Long and possibly silly questions :D

QRCode Generator (Composition by cradle)

Author: cradle
License: MIT
Date: 2010.11.30
Compatibility: 10.6
Categories:
Required plugins:
(none)

Generates QR Codes

Select the error correction rate, the QR Mode (numeric, alpha numeric, 8 bit byte) and enter some text.

& voilà. QR Codes back in Quartz Composer

© 2010 Glenn Francis Murray Creative Commons 3.0 Attribution ShareAlike

n.b. this is a recreation of another composition as the original (http://dasaq.wordpress.com/2009/07/01/qrcode-gen/) is no longer online. I originally wanted to recreate it as a CoreImage filter, but gave up as I couldn't find out how to treat a structure as an image for the sampler.

Javascript adaptation of Paul Bourke's Attractor (v.0.1) (Composition by benoitlahoz)

Author: benoitlahoz
License: (unknown)
Date: 2010.11.17
Compatibility: 10.6
Categories:
Required plugins:
(none)

Here is an adaptation of

  • Carotid Kundalini
  • Rossler
  • DeJong
  • DeJong (Svensson Variation)
  • Lorenz

attractors.

As I'm not a math addict I guess there may have some errors.

I may have missed it but I wasn't able to find this kind of adaptation anywhere. Also, OpenCL or GLSL may be betters for this kind of calculation, but I'm not used with it.

Now, I'm trying to adapt IFS Tree, but I have much more troubles to obtain some results. Any help would be really appreciated. :-)

mobile browser based osc multi-touch to qc

dust's picture

so the idea is you come up to an interactive display, lets say at some arbitrary store front, and your waiting for the bus etc... you notice a sign that says "your art here dot com :8080 " just browse to this website with your mobile to begin drawing.

in this simulation you see a mobile ipad web browser and a quartz composer view to simulate an interactive display.

this actually runs smoother on the device. the cool part is it totally works over the cell data network. so there is no need to join a network. obviously a wifi adhock is much faster but it does work via data.

Javascript Sprite Animation

jersmi's picture

Posted is a working little animation using sprites, iterator and javascript. I want the animation to add the sprites (random size and color) without overlapping, and scroll as the screen fills.

  1. Regarding, for ex., sprites filling screen but not overlapping, in javascript (or otherwise, i guess), how can a relationship be set up between queue indices, so current index uses values from previous index (or indices) to determine x position, y position, width and height?

  2. Would it be better (faster) to have the random values sampled in js?

  3. How can I generate the scrolling, say after the screen fills? Best way? Sometimes I see the "dummy" patch time patch input in js -- what is this for? Am I off the mark for thinking of this re: scrolling in js?

Any help is appreciated.