« Older Home
Loading Newer »

blinking

andalou.jpg
Download code.
This is a version of eye blinking code that requires that nothing else is moving but your eyes. Its based on the simple idea of image differencing: it checks the difference between one image and the next. If there is motion, then a blink has occurred. However, if you move your head around, it also tracks that, so… you have to keep your head still. You can either use that as a design constraint… or improve the code so that it can distinguish between eye motion and head motion.

renaming, deleting, levitating, exterminating…

mirror301004.jpg
Download code.
A while back I learned how to rename and delete files dynamically from c++, to access your computer’s hard drive. You can use a system call to do it..

blending in with the background.

learnedbgwithbuddha.jpg

download code.
Life is such that I haven’t needed to use background learning, really, until now. I’ve been putting it off THAT long. Chris had this code up for a while, but for a previous version of OF, and with separated files. I’m reposting this in the event that it will be useful to myself or others in the future.

If you don’t know what this is, this is the deal: if you are using a video camera in an installation, and want any objects that get added to the “background” to blend in over time, this takes a percentage of the current image and blends it with the original background image, so that the camera eventually doesn’t “see” new objects that have been there for a while.

from a to z


























my spectrum

my_spectrum.jpg

facebook is no longer relevant to my life.

Confirm Facebook Account Deactivation
Please let us know why you are deactivating. (required)
Other
Please explain further:

i am becoming increasingly fascinated inwards. the static hum of society is no longer relevant to my existence. meaningful contact only seems to exist now in long, potent doses of humanity through individuals.

“The Case for the Artist” by A.A. Milne

By an “artist” I mean Shakespeare and Me and Bach and Myself and
Velasquez and Phidias, and even You if you have ever written four
lines on the sunset in somebody’s album, or modelled a Noah’s Ark for
your little boy in plasticine. Perhaps we have not quite reached the
heights where Shakespeare stands, but we are on his track. Shakespeare
can be representative of all of us, or Velasquez if you prefer him.
One of them shall be President of our United Artists’ Federation. Let
us, then, consider what place in the scheme of things our federation
can claim.

Probably we artists have all been a little modest about ourselves
lately. During the war we asked ourselves gloomily what use we were to
the State compared with the noble digger of coals, the much-to-be-
reverenced maker of boots, and the god-like grower of wheat. Looking
at the pictures in the illustrated papers of brawny, half-dressed men
pushing about blocks of red-hot iron, we have told ourselves that
these heroes were the pillars of society, and that we were just an
incidental decoration. It was a wonder that we were allowed to live.
And now in these days of strikes, when a single union of manual
workers can hold up the rest of the nation, it is a bitter refection
to us that, if we were to strike, the country would go on its way
quite happily, and nine-tenths of the population would not even know
that we had downed our pens and brushes.

If there is any artist who has been depressed by such thoughts as
these, let him take comfort. _We are all right._

I made the discovery that we were all right by studying the life of
the bee. All that I knew about bees until yesterday was derived from
that great naturalist, Dr. Isaac Watts. In common with every one who
has been a child I knew that the insect in question improved each
shining hour by something honey something something every something
flower. I had also heard that bees could not sting you if you held
your breath, a precaution which would make conversation by the
herbaceous border an affair altogether too spasmodic; and, finally,
that in any case the same bee could only sting you once–though,
apparently, there was no similar provision of Nature’s that the same
person could not be stung twice.

Well, that was all that I knew about bees until yesterday. I used to
see them about the place from time to time, busy enough, no douht, but
really no busier than I was; and as they were not much interested in
me they had no reason to complain that I was not much interested in
them. But since yesterday, when I read a book which dealt fully, not
only with the public life of the bee, but with the most intimate
details of its private life, I have looked at them with a new interest
and a new sympathy. For there is no animal which does not get more out
of life than the pitiable insect which Dr. Watts holds up as an
example to us.

Hitherto, it may be, you have thought of the bee as an admirable and
industrious insect, member of a model community which worked day and
night to but one end–the well-being of the coming race. You knew
perhaps that it fertilized the flowers, but you also knew that the bee
didn’t know; you were aware that, it any bee deliberately went about
trying to improve your delphiniums instead of gathering honey for the
State, it would be turned down promptly by the other workers. For
nothing is done in the hive without this one utilitarian purpose. Even
the drones take their place in the scheme of things; a minor place in
the stud; and when the next generation is assured, and the drones
cease to be useful and can now only revert to the ornamental, they are
ruthlessly cast out.

It comes, then, to this. The bee devotes its whole life to preparing
for the next generation. But what is the next generation going to do?
It is going to spend its whole life preparing for the third
generation… and so on for ever.

An admirable community, the moralists tell us. Poor moralists! To miss
so much of the joy of life; to deny oneself the pleasure (to mention
only one among many) of reclining lazily on one’s back in a
snap-dragon, watching the little white clouds sail past upon a sea of
blue; to miss these things for no other reason than that the next
generation may also have an opportunity of missing them–is that
admirable? What do the bees think that they are doing? If they live a
life of toil and self-sacrifice merely in order that the next
generation may live a life of equal toil and self-sacrifice, what has
been gained? Ask the next bee you meet what it thinks it is doing in
this world, and the only answer it can give you is, “Keeping up the
supply of bees.” Is that an admirable answer? How much more admirable
if it could reply that it was eschewing all pleasure and living the
life of a galley-slave in order that the next generation might have
leisure to paint the poppy a more glorious scarlet. But no. The next
generation is going at it just as hard for the same unproductive end;
it has no wish to leave anything behind it–a new colour, a new scent,
a new idea. It has one object only in this world–more bees. Could any
scheme of life be more sterile?

Having come to this conclusion about the bee, I took fresh courage. I
saw at once that it was the artist in Man which made him less
contemptible than the Bee. That god-like person the grower of wheat
assumed his proper level. Bread may be necessary to existence, but
what is the use of existence if you are merely going to employ it in
making bread? True, the farmer makes bread, not only for himself, but
for the miner; and the miner produces coal–not only for himself, but
for the farmer; and the farmer also Produces bread for the maker of
boots, who Produces boots, not only for himself, but for the farmer
and the miner. But you are still getting ting no further. It is the
Life of the Bee over again, with no other object in it but mere
existence. If this were all, there would be nothing to write on our
tombstones but “Born 1800; Died 1880. _He lived till then._”

But it is not all, because–and here I strike my breast
proudly–because of us artists. Not only can we write on Shakespeare’s
tomb, “He wrote _Hamlet_” or “He was not for an age, but for all
time,” but we can write on a contemporary baker’s tomb, “He provided
bread for the man who wrote _Hamlet_,” and on a contemporary
butcher’s tomb, “He was not only for himself, but for Shakespeare.”
We perceive, in fact, that the only matter upon which any worker,
other than the artist, can congratulate himself, whether he be
manual-worker, brain-worker, surgeon, judge, or politician, is that he
is helping to make the world tolerable for the artist. It is only the
artist who will leave anything behind him. He is the fighting-man, the
man who counts; the others are merely the Army Service Corps of
civilization. A world without its artists, a world of bees, would be
as futile and as meaningless a thing as an army composed entirely of
the A.S.C.

Possibly you put in a plea here for the explorer and the scientist.
The explorer perhaps may stand alone. His discovery of a peak in
Darien is something in itself, quite apart from the happy possibility
that Keats may be tempted to bring it into a sonnet. Yes, if a
Beef-Essence-Merchant has only provided sustenance for an Explorer he
has not lived in vain, however much the poets and the painters recoil
from his wares. But of the scientist I am less certain. I fancy that
his invention of the telephone (for instance) can only be counted to
his credit because it has brought the author into closer touch with
his publisher.

So we artists (yes, and explorers) may be of good faith. They may try
to pretend, these others, in their little times of stress, that we are
nothing–decorative, inessential; that it is they who make the world
go round. This will not upset us. We could not live without them;
true. But (a much more bitter thought) they would have no reason for
living at all, were it not for us.

code for making a gradient mask

this can be really, really essential…

float sqdist;
int range = 10000; // there must be a better way to do this, but how??
int widthRadius = 10;
sqdist=((i-centerX)*(i-centerX)+(j-centerY)*(j-centerY)*widthRadius);
float alpha=255.0*exp(-1.0*sqdist/(w_eye*h_eye*w_eye*h_eye)*range);

Use the alpha value for the alpha mask in the array of the image, ie,
newImage[pos + 3] = (int)alpha;

The range remaps the values from 0 - 255 (without multiplying by range, the result is 254.8998 and fluctuates AFTER the decimal point). WidthRadius makes the radial fallout skew into an ellipse shape along the x axis.

brilliant.

morning light…

door.jpg