minara – minara selection

A more complex selection:



Picking doesn’t handle transformations yet, that’s next.

Technorati Tags:

minara – selection

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 – selection buffer code

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)
"(translate (buffer-variable (current-buffer) \"x\") (buffer-variable (current-buffer) \"x\")")
"(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)
"(set! set-colour old-set-colour)\n")))

Technorati Tags:

draw-something sketch

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?

(defmethod enough-of-everything? ((the-drawing drawing))
;; Count the number of small, medium and large objects
;; Are they >= the required amount?

(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

(defmethod draw-figure ((the-drawing drawing) (drawing-bounds rectangle))

(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

“Seed Projects”, via cc-community

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.


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.

Joshua Davis Workshop – Flashmagazine

Joshua Davis Workshop – Flashmagazine

L systems.

Rhizome.org: Art, Emergence, and the Computational Sublime

Rhizome.org: Art, Emergence, and the Computational Sublime

There was a big (diverse and informative) debate on eu-gene recently about how turing machines may or may not be able to be creative, so this looks interesting.

New Art: Trading Sheep

New Art: Trading Sheep

Someone else gets the sheep! This is the best artwork I’ve seen this year. It moves the content of art on, expanding what and how you can show. You can look at it conceptually or relationally, but that its aesthetics is thought provoking (and in part provoked by thought) leads to the internal complexity of the artwork, not any tedious essays about it. This goes to the audience, and it takes the audience new places.

Notes Towards Free Culture

Charging Ansel Adams to Shoot in the National Parks

At least they’re not asserting copyright on scenes of natural beauty yet, although you can see how they could be trademarked obviously. 😉

France Considers Anti-DRM ‘iPod Law’

Go France! It’s funny how media companies describe interoperable DRM as “piracy”. How about I pay them in money they can’t use with anyone but me, would that be OK?

This Site Was Down…

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.