A more complex selection:


Picking doesn't handle transformations yet, that's next.
Technorati Tags: minara
A more complex selection:


Picking doesn't handle transformations yet, that's next.
Technorati Tags: minara
An unassuming square:

Clicked on with the select tool, highlighted in transparent red:

So selection works on a trivial case. I need to debug it on more complex cases, and then get drag and copy & paste working.
It works!
Technorati Tags: minara
The code that creates the selection buffer. This will act like a translucent drag or ghost drag rather than direct manipulation. Direct manipulation would be slow as we'd have to update the translation in the main buffer and render the whole thing each time. A minara written by a large team of programmers could split the buffer into layers of dragging and non dragging buffers then re-unite them after the drag (the main buffer must always be coherent for other tools or for saving). But currently it's just me so we do it this way.
(define (highlight-selection win)(let ((highlight-buffer (ensure-window-buffer win "_highlight")))(set-buffer-variable! highlight-buffer "x" 0.0)(set-buffer-variable! highlight-buffer "y" 0.0)(insert-buffer-text-undoablehighlight-buffer"(translate (buffer-variable (current-buffer) \"x\") (buffer-variable (current-buffer) \"x\")")(insert-buffer-text-undoablehighlight-buffer"(set-colour 1.0 0.0 0.0 0.0)\n(set! old-set-colour set-colour)\n(set! set-colour (lambda (a b c d) #f)\n")(copy-selection-ranges-to-buffer (main-buffer win) highlight-buffer)(insert-buffer-text-undoablehighlight-buffer"(set! set-colour old-set-colour)\n")))
Technorati Tags: minara
A code sketch for draw-something. Yes this is really how I work. The comments will be turned into code, and may or may not be kept. Ideally they won't, the code should be self-explanatory (stop laughing at the back).
;; Simple hierachical, loop-based figure drawing.(defmethod draw-something ()(let ((the-drawing (make-drawing)))(until (drawing-finished? the-drawing)(let ((drawing-bounds (find-space-for-figure drawing)))(if drawing-bounds(draw-figure the-drawing drawing-bounds))))))(defmethod drawing-finished? ((the-drawing drawing));; Do we have some of everything?;; Have we covered enough of the drawing?;; Do we have to?: Has allocating space failed or too many attempts failed?#f)(defmethod enough-of-everything? ((the-drawing drawing));; Count the number of small, medium and large objects;; Are they >= the required amount?#f)(defmethod drawing-coverage ((the-drawing drawing));; Iterate through all the figures;; Add the area of their bounds;; Divide 1.0 by the area of the drawing and multiply by the figure bounds sum#f)(defmethod draw-figure ((the-drawing drawing) (drawing-bounds rectangle))#f)(defmethod find-space-for-figure ((the-drawing drawing) (required-area real));; Step through x, y, step 10 units or whatever;; If inside bounds of an existing figure continue;; Grow the ltrb bounds of the box (start at 0 w/h) 1 step each direction,;; stopping when each line hits a figure bounds or the drawing edge;; Is it big enough for the requested area?;; No? Continue.;; Yes? Return it;; Finished without finding a big enough space? Let the caller know#f)
There are two interesting examples of commercial CC projects that pay for themselves. Loca Records license their music BY-SA and make money through CD sales and performances. It can be done. :-) And Elephants Dream, a short (11 minute) computer animated film, was paid for by pre-sales of DVDs (the "street performer protocol"). Elephants Dream is also a seed project, it has all the 3D files and other media needed to make a complete short film, but it is BY rather than BY-SA.
The most successful Free Culture project, one that has outperformed a proprietary alternative, is Wikipedia. It's FDL-licensed rather than BY-SA-licensed, and it is a community project rather than a commercial project. But its use of FDL is historical, and Wikipedia does help sell a for-profit company. Wikipedia could make lots of money from adverts and from sales of DVDs and print versions, although that might affect the willingness of people to contribute.
Wikipedia is instructive in another way. It, like the GNU C compiler and Emacs, is a "seed project". That is, it is a base project that other projects can build on. The BY-SA world is conspicuously devoid of seed projects. cc-mixter, which is BY, has acapellas and individual music tracks on, but without an FSF-style body driving the creation of work and policing the contributions, the tracks contributed to mixter may use samples from CDs that do not allow relicensing or other problem media.
There really should be a Free Music Foundation that pays session musicians an honest rate to lay down drum and guitar tracks, commissions songwriters to perform acapellas, and gets the documentation required to prove that the tracks are clean for use in other BY-SA work. They may accept contributions from commercial projects *if* they pass due diligence. This really is the sort of project that is needed, there are artistic and video and literary equivalents that are needed as well.
So:
1. We need seed projects for BY-SA work, done with the rigor of the FSF's work, and funded by the community (which may include commercial interests). There are non-SA projects such as Elephants Dream and Open Clipart that help, but we need BY-SA ones to build a commons.
2. We have realworld examples of free culture projects that pay for themselves, whether through sales and performance or through the street performer protocol. We need more people following these examples in more media. Hopefully seed projects and better education will help with this.
The problems we have are the profusion of restrictive CC licenses (imagine if the FSF had felt honor bound to release a non-commercial GPL...) that distract from copyleft, and the profusion of unfocussed "community sites" that are graveyards for media under restrictive licenses but that get a lot of publicity and goodwill.
This site was down for most of yesterday and today (24th-25th May 2006). I didn't receive any email sent to me during this time. So if you got bounced whilst trying to tell me that I've won any prizes, or that you need my bank details in order to transfer money out of Nigeria or anyone you have exciting news about how I can be the envy of the other guys in the locker room, you'll need to resend.
That's the search string that finally worked. I've had two orders for William Latham books via abebooks cancelled since the talk Latham gave last week, and prices on his books have gone up. Thank goodness for the internet.
The original research paper that describes Latham's IBM system:
http://www.research.ibm.com/journal/sj/284/ibmsj2804M.pdf
An implementation for PS2:
http://www.research.scea.com/research/pdfs/RGREEN_procedural_renderingGDC2001.pdf
A toy Java implementation:
http://www.evolutionzone.com/hardwork/old_form/java/horn.java
And a toy c implementation:
Technorati Tags: generative art, graphics
Selection is just about there:
(define (select-mouse-up win button x y)(let ((selection (pick-path-window win x y)))(when selection(if (= button 1)(set-selection-ranges-var (window-buffer-main win)
selection)
(append-selection-ranges-var (window-buffer-main win)selection)))))
The problem I have now is how to highlight the selection. Minara isn't meant to do outlining (there are very good reasons for this). I was going to just override the colour on the selection buffer to be translucent red (or something) but I'm worried that will be inefficient. Possibly I can cheat and have an outline-rendering-protocol that is private, but I'm worried if I put hooks in for that people will try to use it in the main buffer. So I think I'll have to take the inefficient but correct route, which seems to be the unofficial minara motto.
Technorati Tags: minara
Sometimes it's easiest to so something recursively:
(define (combine-ranges a b)(cons (min (car a) (car b))(max (car a) (cdr b))))(define (combine-selection-ranges-aux range ranges sorted)(if (ranges)(let ((next-range (car ranges))(rest (cdr ranges)))(if (selections-overlap? range next-range)(combine-selection-ranges-aux (car rest)(cdr rest)(cons (combine-ranges rangenext-range)sorted)))(combine-selection-ranges-aux next-range rest(cons range sorted))))(cons range sorted))(define (combine-selection-ranges ranges)(combine-selection-ranges-aux (car ranges) (cdr ranges)))
But I haven't debugged this yet and I think I may have missed a case. :-)
Working on copy & paste:
(define (cut-selection-ranges-to-copy-buffer-var buffer)(copy-selection-ranges-to-copy-buffer-var buffer)(clear-selection-ranges-var buffer))(define (paste-copy-buffer-var buffer)(buffer-insert-undoable buffer#f(buffer-to-string (ensure-copy-buffer-var buffer))));;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Copy;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;(define (do-copy-key)(copy-selection-ranges-to-copy-buffer-var (window-buffer (window-current))))(keymap-add-fun %global-keymapdo-copy-key"Cc")
Now when I think "I wish there was a function to do x...", more often than not I find I've already written it. :-)
Imagine a horror film about an insane ventriloquist who believes that his possessed dummy is talking. What he believes the dummy to be saying is not what the dummy is saying. The dummy can appeal to the audience, but the ventriloquist will not understand the audience's reactions. Especially when the dummy tells the audience that the ventriloquist thinks it wants him to murder his wife.
How can the ventriloquist silence the dummy? Even if he destroys it or exorcises it he will only silence its real voice. He will still hear what he thinks it is saying. And if his insanity is diagnosed and treated after this, he will still be unaware of what he has actually done.
Technorati Tags: aesthetics
Marie Antoinette on the Way to the Guillotine, by Jacques-Louis David 1793 Pen and ink, 150 x 100 mm Musée du Louvre, Paris
http://en.wikipedia.org/wiki/Image:Marie_Antoinette_by_David.jpg
Technorati Tags: aesthetics, art
1
Marie Antoinette was not French by birth.
Marie Antoinette did not say "let them eat cake", and that is a mistranslation anyway.
Marie Antoinette was executed during the French Revolution. She was the last queen of France.
2
Marie Antoinette had a dairy farm where she acted out the fantasy of being a milkmaid. She did not milk the cows, servants took care of that. They also made sure that the farm was kept spotlessly clean and that the animals were sweetly perfumed.
The spectacle of social virtue even in uneducated agricultural labourers is the genre content of the Pastoral. This bucolic sentimentality is a lullaby of social order even in those with least to gain from society, in this case the social order of a monarch who would later lose her head at the hands of the unwashed. Marie Antoinette's milkmaid fantasy was Pastoral as consumed experience rather than as viewed image or read text.
The experiences and relations of agricultural labourers stripped of necessity or untidiness and then aestheticised are - what exactly? Remove the power and satisfaction of the monarch from the equation and you have inept wannabe agricultural labourers who don't actually wannabe agricultural labourers. This must have filled a few spare afternoons but it told those who took part in it very little about country life, and nothing that they didn't want to hear.
Technorati Tags: aesthetics, art, relational art