1. NodeBox 1
    1. Homepage
    2. NodeBox 3Node-based app for generative design and data visualization
    3. NodeBox OpenGLHardware-accelerated cross-platform graphics library
    4. NodeBox 1Generate 2D visuals using Python code (Mac OS X only)
  2. Gallery
  3. Documentation
  4. Forum
  5. Blog

Core image // layer origin

Posted by Paul T on Oct 15, 2007

Hi i've been try to use the kaleidoscope effect in core image.

##
for i in range(5):
   
    l = canvas.layer("BMW_t.tif")
    l.origin_center()
    l.filter_kaleidoscope(count=1)
    l.blend(i*50)
    l.rotate(90)
##
At the moments it uses the centre of the image as the origin. I tried altering the origin of the layer but this just moves the layer to another area on the canvas.


 
Posted by Paul T on Oct 15, 2007

I suppose what I really mean is that I would like to change the origin of the kaleidoscope, not the layer.



Posted by Tom De Smedt on Oct 15, 2007

You can use the dx and dy parameters, which defines the origin of the kaleidoscope from the image's center:

l.filter_kaleidoscope(count=1, dx=50, dy=50)



Posted by Paul T on Oct 16, 2007

Awesome! Thanks..