Aller au contenu | Aller au menu | Aller à la recherche

Friday 19 November 2004

Why make it simple, when you can do it complex ?

Could you guess that these two designs are equivalent ?

Original design :

Reworked design:

Both are an implementation of the Simulink Backlash

If you find a better one than mine (The mean block with zero is here on purpose, as the division by two is implemented with a bitshift.), or a worst one than the original, feel free to show me your code drawings!

Wednesday 10 November 2004

A quick and dirty script to export SVGs to PNGs using Windows + cygwin

It took me some times to figure out how to handle the filenames. The secret is cygpath, which transforms cygwin filenames to windows (-w option) filenames

#!/bin/bash
DIR=$(cygpath -w $(pwd))
DEST=$DIR/png_$1
mkdir $DEST
INKSCAPE="C:/Documents and Settings/monnier/Desktop/labo/LATEST/inkscape/inkscape.exe"
for i in $(ls *.svg) 
do
	"$INKSCAPE" $DIR/$i -e ${DEST}/${i}_${1}.png -w $1
done