For fun today, Jesse constructed a stop motion scene with legos and a hand-drawn backdrop. Meanwhile, I wrote an animation process. I wrote it as two scripts: one to resize input from my camera, the other to actually animate the pictures.
My ImageMagick resize script is reasonably simple, and if you search for other animation techniques, you will see many scripts like this. To use all four cores on my processor, I fire off 5 resize jobs and then do a job wait for them to complete so that I do not bog my system down.
# resize the input directory and put it in the output directory #
# and also re-names the files to simple numbered format #
find 0-input/ -type f -iname "*.jpg" -printf "%f\n" \
| sort \
| while read f ; do
echo "convert 0-input/$f -geometry 728x480! -normalize $g "
convert "0-input/$f" -geometry 728x480! -normalize "$g" &
i=$[ $i + 1 ]
j=$[ $j + 1 ]
if [ $i -eq 4 ]; then
# wait a bit
for job in `jobs -p`; do
echo -n "...$job"
My animation script is not all that different from other animation scripts you can search for on google, either. However, mine does not loop, does no fades, and plays very slowly. The first ‘-r’ switch specifies how long the input frames should last, so in this case, about 750ms (1.25 frames/sec). The output frame rate is the second ‘-r’ switch.
# -f : output format
# -r : frame rate
# -i : input file pattern
ffmpeg -r 1.25 -i "1-resized/r-1%03d.png" -r 24 "2-animated/animation-$now.mov"
I have a post of it on my G+.
This so telling about our society:
We’ve been conditioned since infancy to ignore most of these fatalities, along with the behaviors that cause them. If you’re a typical American, your first experience of speeding was while strapped into a car seat, and you rode past half a dozen fatal accident scenes before speaking your first complete sentence.
I think many teachers and parents would agree.
“…a common Chinese term used to refer to the products of their schools is gaofen dineng, which essentially means good at tests but bad at everything else.”
via Give childhood back to children: if we want our offspring to have happy, productive and moral lives, we must allow more time for play, not less – Comment – Voices – The Independent.
A pipe redirects output from one program or file to the input another program or file. This makes scripting Unix commands possible and incredibly powerful. But like anything powerful, it takes time to develop the skill to get there. It is so useful, it is sometimes hard to express to people only used to looking at their files as “folder icons” what you’re doing. All you can really say is, “programming.” Thus, one can learn a very useful skill on a recovered computer without much capability or Internet availability.
Your task: go read up on shell scripting.
cat remove.names \
| while read F ; do
fgrep -q "$F" keep.names \
|| (fgrep ",$F" remove.txt | head -1) \
>> take_back.txt ;
Then come back and tell me what I’m doing here :-)
i have begun learning about solar power. Solar power is electricity converted from light by solar cells. I want to power a small computer using a solar panel. I need to figure out:
- how much power the computer needs
- how big my batteries need to be
- how to charge the batteries using the solar panels
- if my battery voltage is different than my computers voltage, what might i need to add or change to give the right voltage to the computer
- how much power can i save compared to when i was not using solar power
- would a smaller computer be more energy efficient than a bigger one
- how do i measure work per energy unit for each computer
I need batteries because solar energy comes from the sun and if, say a cloud passed there would suddenly be less power , the when the cloud went away, there would be more power. Really only appliances made to withstand these rapid power swerves can withstand them for long, however, if you just charge the batteries with the solar power then you can discharge continuous power from the batteries for the computer.
Young minds understand coding and logical deduction easily.
The fact that young children can manage such elaborate tasks should be no great surprise, given what we know about their knack for acquiring languages. Five-year-olds trump their elders at learning Spanish or Mandarin because young brains are better (so the theory goes) at formulating “procedural” memories—that is, memories that become so deeply embedded in a person’s psyche that recalling them is a natural reflex rather than a conscious task.
Forget Foreign Languages and Music. Teach Our Kids to Code | Wired Opinion | Wired.com.
However, I don’t like the title of the article. I don’t want to reduce the importance of foreign languages or music. There should be exposure and mentoring in all of these areas for our children.