Monday, June 21, 2010

Astrophotography in Curl markup: M13 (NGC 6205)

Over at aule-browser.com/astro there is now a page for Hubble's terrific M13 image.

This use of Curl markup involves embedding the image in a wrapper frame to ensure that it remains centered in a black background within a silver window.

The image - a JPG - is loaded only after the page appears in the browser, but the code to do so is very simple.

The class used is ImageGraphic and the key property set to "true" is that for preserving the image aspect-ratio.

This first page is using a 600px X 600px image.  Smaller and larger options with a resizeable frame will follow.

This magnificent star cluster is overhead in the northern hemisphere well-before midnight at this time of year (the first weeks of June) and can be spotted with a small telescope or good binoculars sometime after Mars and Saturn have set in the west.  Look for Hercules overhead between great orange-red Arcturus (follow the handle of the dipper in an "arc to Arcturus") and the great bright blue-white Vega.  Arcturus will be a bit west of the azimuth (the sky directly overhead) and Vega a bit east.  The core of Hercules is said to look like a "keystone" - but I see a flower pot. M13 is found in the westerly long "side" of that asterism.

To see individual stars rather than a grey cloud you may have to "look off the fovea" - so don't look AT the fuzzy object, relax and just "see" into the dark near the nebula: suddenly you will be aware that the fuzzy thing is stars - but as soon as you look AT IT they vanish into fuzzy grey.  Steady now!  Try not to stare! Or get access to a 10, 12 or 14" SCT or other reflector telescope.

Remember: you are not after magnification, but optical resolution and more light!  Otherwise, there are always these magnificent Hubble astrographs.

Thursday, June 17, 2010

Confidential Document Print Suppression in Curl applets

Over at developers.curl.com I have added a blog post on preventing the printing of material presented in a Curl applet.

One simple technique given in that example is to exploit the media attribute of the CSS style element.

I have a more elaborate working example of suppressing screen capture at LogiqueWerks.com where the user is mouse-and-keyboard constrained.

Dealing with actual camera capture of text material is another matter, but if the user hopes for quick transfer of a snapshot to PDF and then extraction with OCR, you can impede that by an overlay or a background.  In the case of Adobe, including marginal text in tiny font wrecks havoc with its text generation as does a zero margin with a visible border in a thickness near that of the letter "I" or "l".  An overlay with graphical lines is also somewhat effective in defeating OCR.

After that, anything eye-only is only as secure as the person viewing the material - in the presence of your lawyers and without cellphones, computing tablets and Q.

Sunday, June 6, 2010

Poetry markup with Curl: {poem {stanza } {stanza } }

I have posted a note over at bytes.com on using the Curl web-content language for poetry markup.

Poem markup is very simple and elegant in Curl - and leaves you with a readable text.

Some of my examples are at poets.aule-browser.com

Wednesday, June 2, 2010

ActionScript3 TextField

Over at http://as3.aule-browser.com/ I have been looking at ActionScript3 in SWF as a web-content language for text.

Text cannot be handled as it is in a Curl declarative-style file, but there are alternatives such as JSON (which Curl also handles well.)

The first challenge was in alignment of text: if a TextFormat is applied across only a range of a piece of text, the Flash TextField alignment, margins and indents break in peculiar fashion.

Anything that will use word-wrap should be multi-line with a TextFormat that is set with no range supplied.

The first thing you may miss are the Curl units which are not pixels.

If you build a Flex application instead of Flash (I am using FlashDevelop) there are other components available such as VBox, HBox and TExtArea much as in Curl.

It is hard to find anything to rival the Curl "live-code documentation" in the Curl IDE, but in the end the glitches ironed-out wrinkle-free.