Member 1242
66 entries
290269 views

 RSS
(33)
US
Immortal since Dec 25, 2007
Uplinks: 0, Generation 3

( related blog / mirror )
All original media ( images, animations, videos, writing ) on this account is licensed creative commons non-commercial attribution share alike 3.0. Please contact the author (mrule7404 at gmail dot com) for permission for commercial use.
  • Affiliated
  •  /  
  • Invited
  •  /  
  • Descended
  • michaelerule’s favorites
    From abhominal
    Biostructure
    From feanne
    grow, grow
    From Andy Gilmore
    =========
    From feanne
    Venus, peacock moss, earth...
    From sarahs
    FINAL PRESENTATION
    Recently commented on
    From michaelerule
    ∞ zoom
    From gamma
    Ducks fractals
    From michaelerule
    Sun
    From Queston
    Physicists describe method...
    From eyeclipse
    WikiLeaks, you must know
    Now playing SpaceCollective
    Where forward thinking terrestrials share ideas and information about the state of the species, their planet and the universe, living the lives of science fiction. Introduction
    Featuring Powers of Ten by Charles and Ray Eames, based on an idea by Kees Boeke.
    From michaelerule's personal cargo

    Simulated linear optical feedback + unsharp mask | gaussian blur + resaturate | contrast enhance = elaborate fractal patterns.
    Simulated linear optical feedback + unsharp mask | gaussian blur + resaturate | contrast enhance = elaborate fractal patterns.

    {image 28}{image 29}

    Mathematical Recipe :

    Start with a square image plane ( RGB )

    Apply in order :
    2D scale + rotation ( reflected boundary conditions )
    gaussian blue or unsharp mask convolution
    resaturation or contrast enhancement
    maybe color inversion

    seed with color
    repeat
    watch flow

    I still don't quite understand how it works


    Thu, Oct 29, 2009  Permanent link

      RSS for this post
    47 comments
      Promote (2)
      
      Add to favorites (4)
    Synapses (1)
     
    Comments:


    gamma     Thu, Oct 29, 2009  Permanent link
    Hooray. Fantastic work.

    Did I mention I am interested in video feedback effects?, because I explore fractals. Compared to the escape time fractals - iteration of complex functions, Julia sets and IFS fractals, video feedback is a step back into a more general concept and into analog processing, almost an experimental setup.

    This program can simulate feedback:
    http://www.softology.com.au/voc.htm

    Relation to IFS fractals is explained here:
    http://classes.yale.edu/fractals/CA/VideoFeedback/VideoFeedback.html

    I don't understand you comment, your algorithm; what's the program in question?
    You could try connecting video card back to itself and use a square image to multiply it!
    michaelerule     Thu, Oct 29, 2009  Permanent link
    This is a recent addition to a simulated video feedback program I have been writing. Simulated video feedback has a more restricted range of fractals than escape time fractals, but can be rendered at frame-rates suitable for real-time visualization.

    The program architecture is as follows :

    - apply a conformal map to the current frame
    - apply some convolution to this result
    - apply some function to the pixel data
    - draw additional objects into the video feed

    The conformal map sometimes generates values that are out of the original frame. Fun things can be done by choosing the out of bounds values differently.

    gamma     Fri, Oct 30, 2009  Permanent link
    I understand. You might wish to throw your project in a public presentation at:
    http://www.fractalforums.com/index.php

    I presume that if the first mapping is out of frame, it is not taken into the feedback? I wonder, if your implementation could have a quick drawing mirror effect on the frame edges, so that everything you display can be duplicated as desired. That should make IFS fractals...

    VisionsOfChaos is slow, and I have know idea what he is trying to simulate (perhaps pixels of an old tv). Currently it does not work on my beautiful Windows 7. I have to WinKey+Tab away now.
    michaelerule     Fri, Oct 30, 2009  Permanent link
    How familiar are you with Java ? If I send you a Netbeans project with all the code I use bundled, could you get it to run ? its somewhat incomprehensible at the moment, but runs a variety of feedback systems at 20-50 FPS ( depending on the configuration ?
    gamma     Sat, Oct 31, 2009  Permanent link
    WOW! I thought I was going to make friends with those movie directors hanging around the Collective, but... no. JAVA is okay, you can send me your project at junkerade@gmail.com.

    Alas, I never worked with Java, because I expect it to be slow. I heard Eclipse IDE is better than Netbeans - both work for me.
    michaelerule     Sat, Oct 31, 2009  Permanent link
    I just tried e-mail, the application well exceeds the 25MB attachment size limit. I'm going to try to upload it to a server temporarily.

    I started using Netbeans before Eclipse came around, hopefully you can get it to run in something.

    The present incarnation is not user friendly, if you can get it to run it will just launch a confusing screeen which looks like a mess and has an outdated and therefore useless help menu overlaid.

    See perceptron/ControlSet.java for a gigantic switch statement that defines all the commands ( the second giant switch statement, the first is I think not active at the moment ).
    There is a config file in the /resource/ directory ( settings.txt ). Here you can adjust the screen size that the program expects. I used to have it automatically configure the screen size, but that appears to break on macs. This also doesn't run correctly in full graphics mode with Compviz on Ubuntu, but runs well with low/moderate visual effects turned on. I haven't tried it on Windows recently. Performance is probably contingent upon having a recent version of Java that somewhat mysteriously makes use of hardware acceleration for various parts of its graphics implementation.

    The following set of commands will get you to an interesting state :
    down arrow 5 times
    f4
    x
    comma twice
    move the blue eye close to the center of the screen

    After that just mess around I guess... it was designed for visualizations for a party, but has a huge range of possible states. Its probably impossible to control though. Q,W change the recursive mapping. Theres a way to add custom mappings in either the config file or by using a ghetto text editor that comes up on screen while running when you press control.

    download and other random things at http://www.andrew.cmu.edu/user/mrule/,  specifically HERE


    gamma     Sat, Oct 31, 2009  Permanent link
    Project downloaded and compiled with a single click. It works with 64-bit JDK. Graphics is very soft, like a good assembler demo. The logic is partially understandable and partially artificial, like a pile of presets and pictures... It is much bigger than I anticipated, but I will study it tomorrow.
    michaelerule     Sat, Oct 31, 2009  Permanent link

    I think the presets are turned off in this version ( there is no "stable" release ). You might be able to turn them on but I have no idea what they will do.

    the keys turn on/off various effects, mostly.
    there are cursors ( eyes and other things ) that control other floating point parameters.
    gamma     Sun, Nov 1, 2009  Permanent link
    Thanks a lot.

    The help screen does not match quite all the enabled options, but I used the text to feed its image into the video feedback and review the mappings. Arrows and clicks are not quite clear to me, although I can make a range of settings - positions of the "camera" with effect to the multiplication of images. The larger shapes are found behind the cursor, and they seem to replicate the "eye" circles, except at times the colored circles are not understandable.

    Artistic potential is severe. I can see optical effects, recursion, mirroring, spirals, fractal trees... with some spontaneous movements as the pointer slides. I did not have time yet to figure out the purpose of fractal map.

    F4 seems to work as you suggested, but is it not a preset?
    michaelerule     Sun, Nov 1, 2009  Permanent link
    These are the current key bindings, I change them often so I haven't written up what exactly they do :

    case VK_ESCAPE : System.exit(0) ; break ;

    case VK_TAB : percept.toggle_cursor() ; break ;
    case VK_Q : fractal.increment_map(1) ; break ;
    case VK_W : fractal.increment_map(-1) ; break ;
    case VK_E : fractal.increment_offscreen(1) ; break ;
    case VK_R : fractal.increment_visualiser(1) ; break ;
    case VK_T : setTree(!tree.is_active()) ; break ;
    case VK_Y : tree.toggle_fancy_graphics() ; break ;
    case VK_U : ; break ;
    case VK_I : fractal.toggle_interpolation() ; break ;
    case VK_O : draw_futures = !draw_futures ; break ;
    case VK_P : fractal.logMap2(); ; break ;
    case VK_OPEN_BRACKET : current_cursor.add_dot() ; break ;
    case VK_CLOSE_BRACKET : current_cursor.remove_dot() ; break ;
    case VK_BACK_SLASH : ; break ;

    case VK_CAPS_LOCK : ; break ;
    case VK_A : ; break ;
    case VK_S : percept.toggle_salvia_mode() ; break ;
    case VK_D : percept.rotate_automota() ; break ;
    case VK_F : fractal.increment_fader(1) ; break ;
    case VK_G : fractal.increment_gradient(1) ; break ;
    case VK_H : fractal.increment_accent(1) ; break ;
    case VK_J : fractal.toggle_color_inversion() ; break ;
    case VK_K : fractal.toggle_gradient_switch() ; break ;
    case VK_L : fractal.increment_renderer(1) ; break ;
    case VK_SEMICOLON : ; break ;
    case VK_QUOTE : fractal.increment_gradient_shape(1) ; break ;
    case VK_ENTER : ; break ;

    case VK_Z : percept.toggle_frame_rate_display() ; break ;
    case VK_X : fractal.increment_colorfilter(1) ; break ;
    case VK_C : draw_cursors = !draw_cursors ; break ;
    case VK_V : fractal.auto_rotate = !fractal.auto_rotate ; break ;
    case VK_B : percept.toggle_objects_on_top() ; break ;
    case VK_N : fractal.logMap(); ; break ;
    case VK_M : percept.increment_sketch(1) ; break ;
    case VK_COMMA : fractal.inc_ortho() ; break ;
    case VK_PERIOD : fractal.inc_polar() ; break ;
    case VK_SLASH : percept.help_screen() ; break ;
    case VK_SHIFT : ; break ;

    case VK_BACK_QUOTE : percept.save() ; break ;
    case VK_MINUS : current_cursor.increment_rate_constant(-1) ; break ;
    case VK_EQUALS : current_cursor.increment_rate_constant(1) ; break ;
    case VK_DELETE : current_cursor.toggle_wander() ; break ;
    case VK_BACK_SPACE : percept.rotateImages = !percept.rotateImages ; break ;

    case VK_CONTROL : ENTRY_MODE=percept.salvia_mode=percept.CURSOR_ON = true ; break ;
    case VK_ALT : ; break ;
    case VK_SPACE : percept.running = !percept.running ; break ;
    case VK_UP : ; ;
    case VK_PAGE_UP : fractal.setMotionBlur(fractal.motionblurp-32) ; break ;
    case VK_DOWN : ; ;
    case VK_PAGE_DOWN : fractal.setMotionBlur(fractal.motionblurp+32) ; break ;
    case VK_LEFT : fractal.setColorFilterWeight(fractal.filterweight-32) ; break ;
    case VK_RIGHT : fractal.setColorFilterWeight(fractal.filterweight+32) ; break ;

    case VK_7 : fractal.dampen_colors = !fractal.dampen_colors ; break ;
    case VK_8 : fractal.setMapping("(real(z)+i*ln(abs(imag(z))))*.3/(abs(imag(z)))*" +
    percept.buffer.output.W + "/" + percept.buffer.output.H )
    ; break ;
    case VK_9 : fractal.setMapping("(imag(z)*i+ln(abs(real(z))))*.3/(abs(real(z)))*" +
    percept.buffer.output.W + "/" + percept.buffer.output.H )
    ; break ;
    case VK_1 :
    //fractal.set_renderer(fractal.IRROTATIONAL_RENDERER);
    fractal.setMapping("1*ln(z)/p*(2.4*" +
    percept.buffer.output.W + "/" + percept.buffer.output.H + ")")
    ; break ;
    case VK_2 :
    //fractal.set_renderer(fractal.IRROTATIONAL_RENDERER);
    fractal.setMapping("2*ln(z)/p*(2.4*" +
    percept.buffer.output.W + "/" + percept.buffer.output.H + ")")
    ; break ;
    case VK_3 :
    //fractal.set_renderer(fractal.IRROTATIONAL_RENDERER);
    fractal.setMapping("3*ln(z)/p*(2.4*" +
    percept.buffer.output.W + "/" + percept.buffer.output.H + ")");
    ; break ;
    case VK_4 :
    //fractal.set_renderer(fractal.IRROTATIONAL_RENDERER);
    fractal.setMapping("4*ln(z)/p*(2.4*" +
    percept.buffer.output.W + "/" + percept.buffer.output.H + ")");
    ; break ;
    case VK_5 :
    //fractal.set_renderer(fractal.IRROTATIONAL_RENDERER);
    fractal.setMapping("6*ln(z)/p*(2.4*" +
    percept.buffer.output.W + "/" + percept.buffer.output.H + ")");
    case VK_6 :
    //fractal.set_renderer(fractal.IRROTATIONAL_RENDERER);
    //fractal.setMapping("5*ln(z)/p*(2.4*" +
    //percept.buffer.output.W + "/" + percept.buffer.output.H + ")");
    fractal.setMapping("z/abs(sqrt((absz)^2-1.5))");
    ; break ;

    case VK_F1 : fractal.setMapping("z*z"); ; break ;
    case VK_F2 : fractal.setMapping("z*abs(z)"); ; break ;
    case VK_F3 : fractal.setMapping("f/z+i*z"); ; break ;
    case VK_F4 : fractal.setMapping("z"); ; break ;
    case VK_F5 : fractal.setMapping("1/z"); ; break ;
    case VK_F6 : fractal.setMapping("e^z+e^(iz)"); ; break ;
    case VK_F7 : fractal.setMapping("conj(e^z+e^(z*e^(i*p/4)))"); ; break ;
    case VK_F8 : fractal.setMapping("z*z*e^(i*abs(z))"); ; break ;
    case VK_F9 : fractal.setMapping("abs(z)*e^(i*arg(z)*2)*2"); ; break ;
    case VK_F10: fractal.setMapping("z*e^(i*abs(z))*abs(z)/f"); ; break ;
    case VK_F11: fractal.setMapping("(real(z)+i*ln(abs(imag(z))))*.3/(abs(imag(z)))*" +
    percept.buffer.output.W + "/" + percept.buffer.output.H )
    ; break ;
    case VK_F12: fractal.setMapping("(imag(z)*i+ln(abs(real(z))))*.3/(abs(real(z)))*" +
    percept.buffer.output.W + "/" + percept.buffer.output.H )
    ; break ;
    michaelerule     Sun, Nov 1, 2009  Permanent link
    The eyes are cursors
    they are bound to parameters

    left/right click cycle through the cursors, and you can drag them around

    two-tone eye : camera shift

    blue eye : camera rotation / distance

    green eye : gradient / fog effect control ( 'g' and single-quote control more fog parameters, f,h,k control aspects of fog color )

    dragonfly : contrast enhance effect ( up is "more effect", left/right crossfade between effects ). press 'x' to enable contrast enhancement effects ( pres x repeatedly for a variety of color mapping functions ).

    up arrow : increase motion blur
    down arrow : decrease motion bluy
    left : increase sharpening / decrease blur
    right : decrease sharpening / increase blur

    q/w cycle through other effects

    e,r determine aspects of "video input" and reflection modes in the feedback

    that should get you working with most of what this can do.. other buttons do other things.
    gamma     Mon, Nov 23, 2009  Permanent link
    I have completed several hypnotic seances one hour long. I was counting on my mathematical skills too. The usage is much simpler with the instructions you sent. I can say that the program works without a bug, without getting stuck or a missed key association.

    The entrance to the program is not what I would call user unfriendly. It is a little bit raw and the circle looks like a raw egg splashed on the LCD monitor. The visibility of the help screen is good with the given INITIAL PRESET, although it seems like a state with little use. Activating and deactivating the help screen along with a status (info) screen would be a killer.

    All things currently on screen tend to get drawn into the feedback, which makes it a bit of a simplistic program that treats everything as the video buffer. For mathematician, this is very good, since we can see the mapping represented with the repeating pattern of text, bent and glued to fractals. However, it would be useful to turn it off at will; for example, adding a custom fractal equation leaves the text editor on constantly (...and with psychedelic color cycling letters).

    I examined the code for fast, real time Julia sets and they seem like typical textbook fractals. You could add a custom boundary condition check, that is, the selection of conditions used to check if a point belongs to the Julia set. For example, if the Julia set is a quadratic map, z=z^2+c, then the condition is |z-zold|>0.00001. Sometimes I combine both - bailout condition is (|z - zold| > @bailout) && (|z|<100) (true for stop or false). The coloring for all these fractals is according to the iteration count or anything convenient, although Newtons could use the root-basin method (using the atan2(z) to estimate the number/density of roots presumably all around the coordinate zero and assign each one a unique color domain), if it concerns you for any reason. These conditions combine with the iteration count condition or any other limit there is in the loop.

    When the formulas are created they might be saved in a file perhaps? along with the entire state/position? I tried saving a screen shot, but I could not find the output file.

    Shuffling through the eyes-cursors was only slightly difficult, during episodes of ... flashing colors. It seems that all cursors "controlling the fractal parameters" are simply dictating the complex parameter c.

    I don't understand quite the relation between the classical video feedback and these Julia sets. Visually the answer is hidden, because I see that the "lakes" of Julia sets (that possess lakes anyway) are flickering and possess repeating "classical" video feedback patterns. The question is what was the input that entered the feedback loop exactly? I expect that everything, the whole screen entered the replication, but at other times it seems that only a contour or a corner of a Julia set close to the lake went in and became psychotic. That effect, the mixture of everything at once by default, seem a little bit user unfriendly. IFS fractals are definitely an indication of the classical feedback running wild, colored beautifully and so on.

    Yes the colors, I am not sure what I wanted to say about the colors. There are more colors closer to the flickering regime? Its good for art.

    I am now hooked and I decided to learn Java. It seems readable, so I'll call to report the news.
    michaelerule     Mon, Nov 23, 2009  Permanent link
    Here is an updated link to a version which I think should be more usable.

    http://www.andrew.cmu.edu/user/mrule/Perceptron(200911211824).zip

    This link should be considered volatile : I have limited webspace. I'll try to keep it up for a few weeks.

    This version should have a more reasonable set of presets ( preset mode is toggled by pressing Enter ). You should be able to save new presets by pressing backquot/tilde, although the save dialog might not be visible ( blindly type a name and press enter ?). Presets become available once moved into the presets sub directory of the resource directory.

    michaelerule     Mon, Nov 23, 2009  Permanent link
    also.. ah, with respect to learning Java : java doesn't seem to be a well respected language anymore. However, Java is the basis for the art language Processing, so learning java will give you skills that transfer to Processing, which will let you do a lot of fun computer graphics art.

    http://processing.org/

    As for the modified coloring algorithms for the fractals : Perceptron uses a feedback system to render fractals, I do not know how to extend coloring algorithms from the iterated function methods to the feedback methods, although I can not rule out the possibility. However, there is much unexplored flexibility in the feedback system, other interesting coloring algorithms exist.

    It is easy to have the drawn objects not get sucked into the feedback buffers, but I liked it better this way. It lets you reflect the eyes around. Once you are done typing in a custom fractal equation, pressing control to return to effects mode, and pressing 's', will turn off the text.

    In my experience the output files from saving screenshots usually end up in my home ~/ directory. Not what platform your using though.

    As for what things get stuck in the Julia attractor wells/lakes as you call them... Each fractal has its own iteration map. Depending on the settings ( switching to nearest neighbor interpolation tends to preserve more information ), portions of this map can acquire state while others go dark. Its all very nonlinear and path dependent.

    again, presets in the latest version should be marginally more use friendly.



    gamma     Tue, Nov 24, 2009  Permanent link
    I see it has a new momentum, more balanced color versus black and white mode. There are some bugs I think, the ESC button does not work (cannot shut down). There are some error messages from NetBeans... tens of pages of similar messages....

    could not open image .DS_Store
    Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
    at perceptron.ControlSet.mouseMoved(ControlSet.java:434)
    at java.awt.Component.processMouseMotionEvent(Component.java:6308)
    at java.awt.Component.processEvent(Component.java:6032)
    at java.awt.Container.processEvent(Container.java:2041)
    at java.awt.Window.processEvent(Window.java:1833)
    at java.awt.Component.dispatchEventImpl(Component.java:4630)
    at java.awt.Container.dispatchEventImpl(Container.java:2099)
    at java.awt.Window.dispatchEventImpl(Window.java:2475)
    at java.awt.Component.dispatchEvent(Component.java:4460)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
    Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
    at perceptron.ControlSet.mouseMoved(ControlSet.java:434)
    at java.awt.Component.processMouseMotionEvent(Component.java:6308)
    at java.awt.Component.processEvent(Component.java:6032)

    The save preset and save image WORKS - it saves to My Documents, but the menu is invisible (I typed test [enter]).

    The help menu flashes in an instant when program loads, but then disappears. Actually, the font is terribly small (nanotech).

    I don't think that ENTER key does anything.

    The program in overall functions excellent, blows my mind completely. (I think I exited with Ctrl+Esc+Esc+...)

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    As for the boundary condition of Julia sets... Here's the thing. The boundary condition is our human attempt to check by a short fast equation if a point belongs to the Julia set. They usually say "if it converges or diverges from the limit circle", but that is just one variant. Some types - maps you cannot draw at all using this check. Hence, entering just a map could produce unexpected image for some formulas. It does not affect the coloring scheme, but the very contours - curvy lines of a Julia set.

    As for the coloring method, I did not study the implementation yet, so I sustain myself from further comments.
    michaelerule     Tue, Nov 24, 2009  Permanent link
    Ah, so lets see... there are a lot of exception which are not bugs but rather conditions I was too lazy to check for. These exceptions are caught ( or just cause an input event thread to die ), and are not fatal. Some day I might remove them, but thats all the junk that gets printed to console when its running.

    I disabled escape because I was running this thing for a band and having the thing quit with an accidental key-press would be embarrassing. I can still exit using command+Q on my mac. You should be able to re-enable escape in the ControlSet class : I believe its just been commented out.

    Perhaps I should add some indicator that preset mode it active. Preset mode does work in my build, but its possible something is going wrong in your installation ( perhaps it can not load the presets from the directory ? ). Try pressing enter once after the program loads, then pressing the numbers 0-9 and waiting to see if the program goes into one of the interesting saved states.

    The text is small because I usually work at reduced resolution ( set my monitor to 640x480 ). Rendering is too slow to do full screen in real time at higher resolutions. I also don't think the entire control set fits on screen at larger font sizes. It could certainly use some work.



    gamma     Wed, Nov 25, 2009  Permanent link
    The previous version had no bugs. But now I will help you... or not.
    These two lines were commented out:

    case VK_ESCAPE : System.exit(0) ; break ;
    case VK_STOP : System.exit(0) ; break ;

    but the esc button still does not work. Enter also does not work. CTRL presents the cursor on or off, but the color cycling equation always stays on the screen. Maybe the key bindings in file perceptron overpower those at controlset.java. Acctually just a moment ago, Esc worked, and little time later F1 and F2 worked, but then perished.

    case VK_ENTER : PRESETS_MODE = false ; break ;

    F1, F2 seem to have no function, but other F's change the map or preset, the whole thing. Q, W cycle through maps.

    The help screen was with larger font, but now is small. The text area is on a finite square, but it could resample to a new resolution for more room.

    On the bottom of my Microsoft Natural Ergonomical Mighty keyboard says, "119 keys, specifically without the Command key".

    :-)
    michaelerule     Wed, Nov 25, 2009  Permanent link
    shoot... I'm debugging this on a mac, might have different keyboard behavior. I'll take a look at it on a PC at some point.
    gamma     Fri, Dec 25, 2009  Permanent link
    I was wondering if you could explain to me the number of iterations when simulating videofeedback and the number of iterations when drawing a fractal.

    I am looking for the location in code where different bailout conditions could be set. Bailout conditions prevent the algorithm for Julia set from iterating too many times. They approximate convergence or divergence or any other type of behavior of an orbit (per point of complex plane, times the number of iterations or less if the condition is met timely). I understand that each point of the square on the screen enters the iterated map until it exists somewhere else (the map is skewing, transforming the plane into the resulting shape). The original color of the original point is partially preserved given that we can see the eyes mapped repeatedly onto the fractal contours (although with some special effects). I still do not understand where is the place that determines the shape of quasi-concentric contours of Julia set!

    Yesterday it struck me that this "clearly understandable program" would vary the number of iterations depending from the bailout condition. Instead of images within images (lets say 10 times so recursively and call it "10 iterations of the videofeedback") there would be points that passed through lets say, 100 or just 3 iterations due to the iteration of the fractal map with certain bailout condition.

    This is brainstorming with pain. Well, if you have any ideas - I realize it is hard to tell in the end what comes out of that thing...
    gamma     Sat, Dec 26, 2009  Permanent link
    I was just being anxious, so I checked for my answer (which I deserve) every hour. However, meanwhile I googled for "video feedback fractal" and among the first 20 or so hits was our conversation. I realized that you wrote many posts before this one. I am sincerely sorry and I apologize for missing your entire life on the Collective. I had a feeling that I am surrounded with rather great number of posts. I missed them completely.

    The explanation of the Perceptron is good, although not fantastic, but completely understandable. The color explanation appear unclear: (in the following iteration, the color is determined by....)
    l[n]f(z)
    The color is primarily original - unchanged after mapping, then come the color functions: the contouring (e.g. iteration count, the bailout condition I was asking you about), and then the special effects.

    Interestingly, I did not indulge much into what happens with the mapped pixels outside of the screen. If you return them by mirroring or any other simple procedure, you get IFS fractals - which seems obvious, because those are the trees. Using a camera and mirror you would be able to obtain IFS trees with crude straight lines over-saturated with shine from the amplification by feedback (recursion). In fact, every point of an IFS fractal is a fixed attractive point of that set. Your trees are curvy and with Julia-alike details. Practically, this is a Glynn set (z^1.5 - 0.2), which is produced despite the choice of conformal map!

    (For some background information about the conformal mapping without much fractals, see http://en.wikipedia.org/wiki/Conformal_pictures  )

    Glynn set is an example of non-conformal map. I tried entering Glynn set as a map for experiment, but the result is not good. I know that we cannot draw it in Ultra Fractal without a different bailout condition. Few other maps I entered were: Newtons of the simple polynomial type: z - (z^3 - 1) / (3*z^2), Sierpinski curve Julias: z^2 + c / (z^p). I realize that we do not have all the control over parameters (c in this specific context, p), but I positioned the parameter eye to the middle of screen to set c as an addend to the map (any map) to zero. Next I varied only the camera eye, blue one and found an unusual thing. All the results were approximately the same regardless of the choice of maps, from my list of maps. I suppose they all asked just those easy maps, eh?

    :-)

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    As for the (little in reverse) the brain hallucinations and video animations... I think that since the hippies everyone was using video feedback to emulate, (or is it simulate?), the psychedelic experience. I am convinced that they are on the right track. There is feedback in the brain! One small point though. The feedback fractals and such produce fixed points and basins of pile-ups. Essentially, regardless of what you start with (e.g. in IFS theory, the "condensing set" is random), when you enter it into the feedback loop, you end up with the same old fractals as something universal. Process of thought does not appear to be included in the psychedelic feedback. Mental images would repeat themselves, and ability to think would seize.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    Anyhow, wonderful program, but personally I am troubled by what is mapped into what and so I've been thinking about it.... in circles probably.
    michaelerule     Sat, Dec 26, 2009  Permanent link
    the boundary / escape condition in iterated complex fractals ( e.g. traditional mandelbrot ) is equivalent to the "offscreen boundary" in perceptron. For example, a point leaving radius 2 in rendering a mandelbrot is equivalent to the feedback mapping leaving radius 2.

    Perceptron defines several boundary conditions in the "Operator[] Blendings" array. I should re-factor this array to "Boundary conditions"

    There is no notion of "bait out" iteration count in Perceptron. Each frame is a new iteration, and the number of framed rendered at a particular state determined the "iteration depth" of the fractal rendering. The program will continue to render finer spatial scales until the resolution of the screen is exceeded. Points that are part of cycles, or closed/ infinite loops, simply cycle color information around the space indefinitely, and the evolution of the color data is determined by the interplay of interpolation/convolution/color-mapping operators applied to the image data.

    your intuitions on feedback fractals seem largely correct, at least based on my experience. However, I have a little trouble following some of your arguments and terminology. I myself have trouble articulating perceptron's operation.

    gamma     Sat, Dec 26, 2009  Permanent link
    the boundary / escape condition in iterated complex fractals ( e.g. traditional mandelbrot ) is equivalent to the "offscreen boundary" in perceptron. For example, a point leaving radius 2 in rendering a mandelbrot is equivalent to the feedback mapping leaving radius 2.

    Hello! It sounds very logical! I opened the FractalMap.java and found the line 1044 "Horozontal Window". I presume that is the section describing the screen boundary (="offscreen boundary"). I'll have some difficulty reading java, so I'll return to the interpretation tomorrow...

    "Boundary condition" and the "limit circle" go hand in hand I suppose, but the intention of the "bailout" (in Ultrafractal) is to approximate where the orbit (iteration of f(z)) tends to, sort of. In Newton's method neighboring members of the array (orbit) converge on some value or do not converge. Calculation stops when we had enough of converging. For some of the divergent and oscillating cases, Newton's method does not function, but you could draw a fractal for fun. I'll think about this too in relation to the window boundary. I am already entangled into a knot.
    michaelerule     Sun, Dec 27, 2009  Permanent link
    yes.. part of the whole point of perceptron was to avoid the "bailout" count, it renders one frame per iteration, and continues iterating as long as the program is running.

    I tried those other fractals you mentioned; they seem to work. The tree like structures are formed by a branch cut ( which is arbitrary, but consistently defined for most complex functions ), so they aren't really a feature of the mathematics, more of a nice rendering artifact. Don't worry if that made no sense.

     http://spacecollective.org/michaelerule/5451/ 
    gamma     Mon, Dec 28, 2009  Permanent link
    Amazing success! I thought I was typing the problematic maps correctly... but I cannot seem to bring them on the surface. I am swimming in the sea of fractals.

    Glynn set - approximately, can appear independently from the choice of input map (e.g. by using one mirror next to the screen and a camera). At the moment, I do not know why I wanted to input the Glynn set as a map.

    By branch cut you probably imply the complex functions that possess many values or several solutions for a single input z? You mean they are the mirror?

    Its all mathematics you know, it is just that some of the fractals are not defined with input map alone. I mean, I agree with you.

    ~~~~~~~~~~~~~~~~

    Condensing set is any starting image taken into a recursive algorithm that diminishes the whole image, copies and arranges it somehow by using affine transformations. IFS fractals are produced in deterministic way. Anything taken into a feedback like that would shrink down to dots that form IFS.

    ~~~~~~~~~~~~~~~~

    I am thinking: if a simple Newton set maps any starting z to the nearest root, then it must be mapping large surfaces into points, thus leaving most of the result up to the "rendering artifacts".
    michaelerule     Mon, Dec 28, 2009  Permanent link
    agreed, right-on with the branch cuts causing the mirroring & a lot of the effects being 'artifacts'

    there are two control points which effectively add terms to the complex map.

    the brown&blue eye control adds a constant (which manifests as a shift in the map), and the blue eye add a complex multiplication (which manifests as a scaling and rotation). The values of these control points do change the mapping function, so they might cause a map not to appear as you expect.

    if u is the rotation, v is the shift, and z is your input point
    f(z) in the mapping
    is really
    f(u*z)+v
    or maybe its
    u*(f(z)+v) or u*f(z)+v
    I actually don't remember

    I think you have the latest version, in which case the [comma/lessthan] and [period/greaterthan] switch these two parameters between the following states : [mouse control, drifting(animated), disabled]. In the disabled states, the maps will be stable and unperturbed by the control points. You can then manually control additive parameters when setting the map (by just typing+constant or whatever)

    gamma     Tue, Dec 29, 2009  Permanent link
    the brown&blue eye control adds a constant (which manifests as a shift in the map), and the blue eye add a complex multiplication (which manifests as a scaling and rotation). The values of these control points do change the mapping function, so they might cause a map not to appear as you expect.

    Yes. The brown eye = "two-tone eye" or in my case, since I am colorblind especially for the light green color, the non-green eye.

    if u is the rotation, v is the shift, and z is your input point
    f(z) in the mapping
    is really
    f(u*z)+v
    or maybe its
    u*(f(z)+v) or u*f(z)+v
    I actually don't remember


    Agreed. I cannot verify the formula either in a flash (...of the last half an hour), but I am sure it is correct and logical. I saw somewhere before the camera scaling/rotation effect...

    I think you have the latest version, in which case the [comma/lessthan] and [period/greaterthan] switch these two parameters between the following states : [mouse control, drifting(animated), disabled]. In the disabled states, the maps will be stable and unperturbed by the control points. You can then manually control additive parameters when setting the map (by just typing+constant or whatever)

    I am still using the first version, because it seems to be bug-free. It too possesses key bindings with ",", "." similar to what you described. The latest version on your server is still a little stuck on the exit: I typed ctrl+c and Escape to exit. I tried those buttons in both versions, one option is automated shifting, while two others both seem to shift the parameter via the two-tone eye. However, the blue ball can be deactivated in one mode. At the same time, there is a sort of a reset of the parameter - the two-tone eye remains bound to the parameter, but it could be that it moves over to some unspecified value.
    michaelerule     Tue, Dec 29, 2009  Permanent link
    yeah, I disabled exit because I didn't want the thing to quit unexpectedly during shows.

    I'm able to close the latest version using either command+q on mac, or alt+f4 on win/linux
    gamma     Tue, Dec 29, 2009  Permanent link
    I'll resume my work tomorrow, and for the new years eve. I am in fact Santa.

    Do you have any suggestions about following what is happening with the points of the plane, z, after the map is applied and then later after the screen boundary and so on? Maybe you know something about reading the code or watching the flow of data in java?
    michaelerule     Tue, Dec 29, 2009  Permanent link
    I would stay clear of the java debugger... that thing is evil (well, no, just way too slow for this app). honestly I just mess around with things until they work. sometimes you can debug just by looking at the image output or printing things to screen.
    gamma     Thu, Dec 31, 2009  Permanent link
    I ran some experiments with changing the bounds or boundary conditions for Rectangular Window and Elastic Oval... although I changed the code itself. Alas, where do you call them anyway?
    Here:

    boolean RectangularBounds(RenderStateMachine m) {
    return m.f_x = 0;
    }

    boolean OvalBounds(RenderStateMachine m) {
    float x = (float) m.f_x * overW7 - 1;
    float y = (float) m.f_y * overH7 - 1;
    return x * x + y * y < 1;
    }

    boolean ElasticOvalBounds(RenderStateMachine m) {
    float x = (float) m.f_x * overW7 - 1;
    float y = (float) m.f_y * overH7 - 1;
    return x * x + y * y < this.boundRadius;
    }

    ....

    and here:

    Operator[] Blendings = {
    new Operator("Rectangular Window") {

    void operate(RenderStateMachine rsm) {
    if (RectangularBounds(rsm)) {
    rsm.color = rsm.old_color = buffer.output.get(rsm.f_x, rsm.f_y);
    } else {
    offs_opr.operate(rsm);
    }
    colf_opr.operate(rsm);
    }
    },

    ....etc. But I don't know where do you chose one to use?

    (I saw Sierpinski carpet, trees of all kinds, triangles...)

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    I think that for Newton's fractals we need to check if one point z is mapped onto nearly that same z point as to estimate the convergence. If there is convergence, |z - zold| < 0.001, then color the point with the number of the iteration when it bailed out. It sounds as though portions of the screen/buffer are converging into few points - roots, draining out the art of the painting. On the second thought, over time we should keep setting the color to z from a standpoint of where it will end up (and never stop for that matter). If over short time signs of convergence appear, gradient should attach to the z over time.
    michaelerule     Thu, Dec 31, 2009  Permanent link
    The "R" key is set to cycle through the different boundary conditions (R for "region" I think ?)
    gamma     Fri, Jan 1, 2010  Permanent link
    No way... Oh, happy new year. We had two big screens for VJ, but I think this year you could come visit and bring the "Mac".

    I was just going to correct my original post about Newtons... We should measure the speed of convergence and record it in time, make a movie out it, then there is a chance for the additional boundary condition.
    michaelerule     Fri, Jan 1, 2010  Permanent link
    I have no idea how to measure rate of convergence in this algorithm, I mean, if you find a way please tell me. There really isn't a concept of a "point" in perceptron, its all approximations of conformal maps. I don't really understand newton's method fractals.
    gamma     Fri, Jan 1, 2010  Permanent link
    Ok, nevermind the Newtons; I've been working with them lately, so I am overflowing work over here. Do you happen to know a book regarding videofeedback fractals and such?
    michaelerule     Sat, Jan 2, 2010  Permanent link
    What languages and environments do you use currently ?

    I would wager that fractal feedback can be rendered in just about any program that can do graphics, and can support feeding the output of a rendering back in as an input buffer.

    Basically, you start with the concept of "pointing the camera back at the television screen", and just experiment creatively from that point. How you phrase "pointing the camera back at the television screen" probably depends on your programming environment.

    If you were using a 3D programming environment similar to OpenGL, it would look something like a quadrilateral that is texture mapped by the output rendering buffer, and iterated under repeated renderings.

    I think I would be remiss to actively recommend Java and Netbeans to someone as a programming environment. I use it because it was the only thing available when I was learning. Java is kinda verbose as a language, and you can't use hardware acceleration fully within the standard Java libraries.

    C and OpenGL will give you access to the most powerful graphics programming environment I know of. However, I wouldn't wish writing shader programs on on anyone. ( one day I will convert my code to OpenGL, I have a friend who has written an OpenGL renderer ).

    It would be interesting to see if someone could implement a fractal feedback renderer in Processing. Processing is based on Java, but is much nicer to use in practice. I am not familiar with all its capabilities, but have found it very friendly for 3D experiments.

    Understanding the rendering principles behind the mandelbrot and julia sets, as well as conformal mapping, might give you better intuition into how mathematical equations transform into fractals.

    michaelerule     Sat, Jan 2, 2010  Permanent link
    My project is un-documented, and so far gamma has been the only person to dare wander into the source code.

    I would recommend implementing your own from scratch in your favorite graphics framework, if only because you are likely to stumble upon new techniques which will, well... possibly entertain me ?

    Perceptron does live in a Netbeans project. I have some snapshots up at

    http://www.andrew.cmu.edu/user/mrule/Perceptron/

    Whichever has the latest date at the end is the most recent (but gamma says that one has some bugs, so maybe go with the earlier one). You will want to download Netbeans with the Java JDK to compile and run this project.
    gamma     Sun, Jan 3, 2010  Permanent link
    Heya,
    Perceptron is a 2D program for video feedback fractals. Video camera works with mirrors to generate IFS fractals and some complicated forms, which we can simulate easily and accurately in 2D:
    http://classes.yale.edu/fractals/CA/VideoFeedback/VideoFeedback.html
    by using perhaps IFSTools in Java (somewhere on Sourceforge) or with Xenodream.

    Images passing through video camera are not transformed in any way (bending, skewing...), but in Perceptron they are going through a 2D equation written in complex numbers. Fractals are formed in relation with the feedback - recursion, and the window frame; colors are attached with the window frame, iteration count, who knows what...

    Processing language would not be sufficient for Perceptron, I think. It could use DirectX even via Java for operations with graphics. The main loop could benefit from being written in C++, but I don't know how much. It seems that there is nothing altogether better than Java. My computer has no problem running this.
    gamma     Sun, Jan 3, 2010  Permanent link
    It is late here, after 3 consecutive days of partying, but here are some images.

    The Newton set with 3 roots visible in the corners of equilateral triangle.


    Some Julia set transforming into an IFS fractal, as an artifact of window boundary, returning the point into window and branch cuts.
    michaelerule     Wed, Jan 6, 2010  Permanent link
    Hey, thats a realy nice function. I might have to steal it. (finally got an internet connection fast enough to use SpaceCollective again).
    gamma     Sat, Jan 9, 2010  Permanent link
    Sierpinski triangles pop out in color:



    using:

    preset striangle2.state {
    anti_alias true
    show_cursors true
    cursor_trails true
    velocity_mode false
    autopilot false
    fractal_map z*z
    edge_extend_mode 2
    bounding_region 3
    fade_color_mode 3
    gradient_mode 2
    color_accent 0
    interpolation true
    invert_colors 16777215
    gradient_direction 255
    draw_tree false
    anti_alias_tree false
    background_objects true
    cap_frame_rate true
    show_frame_rate false
    salvia_mode false
    XOR_salvia_mode false
    text_entry false
    life false
    cellDrawer 0
    coloredLife false
    mainRenderer 0
    sketch 0
    rotateImages false
    XBranchingCursor 286.0
    XAlphaCursor 424.0
    XBranchLengthCursor 142.0
    XTreeOrientationCursor 306.0
    XMapCursor 510.0
    XMapRotationCursor 390.0
    XGradintCursor 255.0
    XTreeLocationCursor 308.0
    YBranchingCursor 178.0
    YAlphaCursor 241.0
    YBranchLengthCursor 312.0
    YTreeOrientationCursor 13.0
    YMapCursor 510.0
    YMapRotationCursor 145.0
    YGradintCursor 252.0
    YTreeLocationCursor 31.0
    }

    and in black and white:



    preset triangle.state {
    anti_alias true
    show_cursors true
    cursor_trails true
    velocity_mode false
    autopilot false
    fractal_map z*z
    edge_extend_mode 2
    bounding_region 3
    fade_color_mode 3
    gradient_mode 2
    color_accent 0
    interpolation true
    invert_colors 16777215
    gradient_direction 255
    draw_tree false
    anti_alias_tree false
    background_objects true
    cap_frame_rate true
    show_frame_rate false
    salvia_mode false
    XOR_salvia_mode false
    text_entry false
    life false
    cellDrawer 0
    coloredLife false
    mainRenderer 0
    sketch 0
    rotateImages false
    XBranchingCursor 286.0
    XAlphaCursor 424.0
    XBranchLengthCursor 142.0
    XTreeOrientationCursor 306.0
    XMapCursor 509.0
    XMapRotationCursor 359.0
    XGradintCursor 0.0
    XTreeLocationCursor 308.0
    YBranchingCursor 178.0
    YAlphaCursor 241.0
    YBranchLengthCursor 312.0
    YTreeOrientationCursor 13.0
    YMapCursor 509.0
    YMapRotationCursor 135.0
    YGradintCursor 511.0
    YTreeLocationCursor 31.0
    }
    michaelerule     Sat, Jan 9, 2010  Permanent link
    that is seriously awesome, (you should do a formal post so these images get arranged in "recent images")?
    gamma     Sun, Jan 10, 2010  Permanent link
    Alright. BTW, Can you believe that these are just the plain old Julia sets z^2 ??
    gamma     Wed, Jan 27, 2010  Permanent link
    Well, the time has come for me to write. I was working on the code for the program and I have a few notions and questions.

    My version of the program starts off with the following parameters:

    E=2 what happens with the offscreen points
    R=3 what is the boundary condition (window or limit circle related)
    F=3 fade color
    G=2 gradient mode
    H=0 color accent

    All of these are arrays that contain functions with the same name
    void operate(RenderStateMachine rsm)
    that return no value.

    Member number one of the Operator[]Blendings array is the "Rectangular Window". Although the member count is set to 1 (by setting which visual function to use in line 63: /** Which visual function to use */ int visu_num = 1;), the program starts with 3. From there on, the "Rectangular Window" is marked as "3" and the consecutive members are counting in circles (including zero in the count). For example, the "Oval Bound" is member R=1 in practice.

    When the program starts, E=2 means apply "Reflect" function to the offscreen point. Somehow this is the third member in the array Operator[] Offscreen in the line 1120 (unless I made an error).

    I think that it would be useful to start the count from 1 - default to ones, and ones should denote the first members in the array, although maybe the start up is already perfect as it is when it comes to the beauty of the initial settings. Anyhow, I am confident that eventually I will be able to program the status window myself.

    "Blendings" term is a little unclear to me, nevermind, I already said that, I would put "BoundaryConditions". Excuse me.

    In line 869, OvalBounds check - boundary condition implies the circle with the radius 1. (Setting R=1). After dragging the green eye to the lower left corner I obtain the black and white map and the round contours of the classical Julia set - uninteresting, but mathematically perfect. I press few times the down arrow, and one or two times the left arrow for speedy cycling through the feedback and for the sharp edges. The blue cursor is sufficiently far from the center of the screen, about the half way through. There are no offscreen effects visible, because the gradient hid them. My question is, how do you instruct or where do you instruct the program to use interchanging black and white color? as to specifically obtain the black and white contours and the black and white flickering basin within the Julia set?

    I did not experience any need to work with loading images (photographs), but it seems that this option is possible - what is the route to that? (is it called the image mode?)

    One of the offscreen functions is displaying the image from Escher, but I am not sure where it loads? It does not matter, I am just trying to recall everything I had on my mind.

    I did not have time to visit the topic of Newton fractals. The interesting point with some Julia maps is that they use different boundary conditions to appear on the screen...

    boolean OvalBounds(RenderStateMachine m) {
    float x = (float) m.f_x * overW7 - 1;
    float y = (float) m.f_y * overH7 - 1;
    return x * x + y * y 0.001f;
    as the boundary check. However, it could be imprecise.

    One of my great interests lies in the application of IFS fractals. I know that it sounds implausible that I spent all this time and did not progress yet to that topic, but I think that the "Reflect" function is very interesting.

    new Operator("Reflect") {

    void operate(RenderStateMachine rsm) {
    rsm.color = rsm.old_color = buffer.output.get(rsm.f_x, rsm.f_y);
    grad_opr.operate(rsm);
    }
    },

    Where does the grad_opr.operate(rsm) lead to find all the offscreen point transforms such as reflection or some other hidden one?
    michaelerule     Wed, Jan 27, 2010  Permanent link
    complicated internal workings

    - values for the active rendering operators are reset from the hard coded values on program launch. the program automatically ties to load the first preset, but its a bit buggy

    - 0 start array indexing is used in C like languages, and indeed 99% of modern programming languages. This lets you do fun things like array wrap with the modulo operator

    - The reflection mode is hidden in the code that pulls pixels from the source buffer. Linear interpolation and mirror tiling are implemented in the same place. In openGl these would be texture settings. I have implemented them in DoubleBuffer.

    gamma     Thu, Jan 28, 2010  Permanent link

    - values for the active rendering operators are reset from the hard coded values on program launch. the program automatically ties to load the first preset, but its a bit buggy


    Right, I forgot about the presets.

    - The reflection mode is hidden in the code that pulls pixels from the source buffer. Linear interpolation and mirror tiling are implemented in the same place. In openGl these would be texture settings. I have implemented them in DoubleBuffer.

    I promise to examine it later.

    ~~~~~~~~~~~~~~~~~~~~~~

    What about the interchanging black and white colors of contours in the situation I described? Do you care to put a comment on that?

    In line 869, OvalBounds check - boundary condition implies the circle with the radius 1. (Setting R=1). After dragging the green eye to the lower left corner I obtain the black and white map and the round contours of the classical Julia set - uninteresting, but mathematically perfect. I press few times the down arrow, and one or two times the left arrow for speedy cycling through the feedback and for the sharp edges. The blue cursor is sufficiently far from the center of the screen, about the half way through. There are no offscreen effects visible, because the gradient hid them. My question is, how do you instruct or where do you instruct the program to use interchanging black and white color? as to specifically obtain the black and white contours and the black and white flickering basin within the Julia set?
    michaelerule     Thu, Jan 28, 2010  Permanent link
    J key toggles inversion mode.
    gamma     Thu, Jan 28, 2010  Permanent link
    J key toggles inversion mode.

    Well, now I am confused. In one mode I have the recursive transformation of the help screen photograph onto the Julia set, and in the other one the classical contoured Julia set together with the recursive transformation of the help screen. My question was at which place in the program code (or symbolic algorithm) we choose the color black or white to color the contours?

    public void toggle_color_inversion() {
    grad_invert ^= 0xFFFFFF;
    }

    The question is of essential importance to understanding how natural the emergence of the Julia set is. We cannot obtain a smooth contour around the connected Julia set (not Fatou) starting with any initial set that enters the recursive transformation.
     
          Cancel