earthbound19 / _ebdev Goto Github PK
View Code? Open in Web Editor NEWVarious tools, mostly custom-made for art development.
Various tools, mostly custom-made for art development.
The functionality of irfanView2imgNN.sh
was ported into img2imgsNN.sh
which invokes irfanview command-line converter for conversion from ppm
to other formats. However, references to irfanView2imgNN.sh
remain in other scripts. Find them all, update them, test and verify the fix, then commit and push it to the repo.
BUT, I don't want img2imgsNN.sh
to behave as it does. So before this, solve issue #43
(n/a)
Processing: rnd pattern like spider web, rnd fill from palette. W/regular polygons at vertices?
split all the separate path elements of every glyph in a font into a library, and do a random walk with randomly selected vectors from the library, for a typographic-like scribble. (Processing, via geomerative http://www.ricardmarxer.com/geomerative/ -- https://github.com/rikrd/geomerative)
e.g. of BSaST or components of it
In all scripts, implement this much faster and more elegant basename / extension extraction method:
fileNameNoExt=${filename%.*}
(does not get full extension if extension has more than one period, as in the fileExt=${filename##*.}
tar.gz
extension.)
fileExt=${filename#*.}
(gets all the dots in extensions, even if it is .blor.blar.tar.gz
)
re: https://www.cyberciti.biz/faq/unix-linux-extract-filename-and-extension-in-bash/
Comment I removed from a script; in tests it failed for complex strings piped from a find command:
re: http://stackoverflow.com/a/26753382/1397555
To get file name up to first period or dot (.) :
fbname=$(basename "$fullfile" | cut -d. -f1)
To get the file name up to just before the last; preferred:
filename=$(rev <<< "$1" | cut -d"." -f2- | rev)
fileext=$(rev <<< "$1" | cut -d"." -f1 | rev)
[the =${.. assignment is more efficient and does the same thing]
re: http://stackoverflow.com/a/17203159/1397555
regularPolygon.pde Enables centered triangles, squares, pentagons, hexagons--any n-gon, with scale, rotate, translate, fill and stroke color and stroke weight, reset matrix.
With rnd fill from palette.
class that takes any collection of geometry and mirrors/tiles (tessellation?) it (in one of the 17 math "wallpaper" groups). maybe someone's already done this with processing--search first.
examples and lists of wallpaper groups:
Possible reference program: tesselmaniac on windows (which is much more handy for original tessellation creation and exploration, but can't handle custom SVG load or other things I may be able to do with Processing).
Could probably be improved; documentation locally scattered..
script generator for artrage?
which
maddeningly fails in Cygwin half the time, inexplicably. whereis
prints extra info I don't want.
where
, built in to windows, returns the path to any .exe
or script in the %PATH%
, reliably, it seems.
But this means checking if it's Windows or not ($OS
env. variable), which is more cumbersome.
I would really like to fix Cygwin which
not working (know why), when it fails :(
Trial SVG manipulation via https://xmlgraphics.apache.org/batik/ utilities?
Noteworthy tools:
SVG parser https://xmlgraphics.apache.org/batik/using/parsers.html
convert ttf to svg https://xmlgraphics.apache.org/batik/tools/font-converter.html
2D graphics generation scripting https://xmlgraphics.apache.org/batik/using/svg-generator.html
Document Object Model API https://xmlgraphics.apache.org/batik/using/dom-api.html
Other possible tools:
https://www.npmjs.com/package/svg-cli-util
https://github.com/shakiba/svgexport
This question (and going back and forth on it?) has plagued this repo for very long. Maybe an answer is at line 44 of ffmpegAnim.sh in commit 055a0ed
make cluster groups / directional
and/or like leaves on aspens, like art that has palette knife stroked blobs for leaves
vivid, unrealistic colors
python script that splits any palette into two lists: colors nearest to black and colors nearest to white.
rectangles/circles irregular geometry generator (Processing) improve -- how?
wreath of randomly sized circles that randomly alter color (clockwise rotation of color changes)
echo $OS
--prints a string that identifies the operating sytem!
happened to find at: https://gist.github.com/MestreLion/4037336
Processing: rnd pattern like shattered glass, rnd fill from palette. W/regular polygons at vertices?
double tap cycles grayscale mode, white fills on black background, then color mode, and starts the cycle again after color mode.
I might start with N = 2 hard-coded, then refactor to make N infinitely extensible.
could use python itertools:
>>> import itertools
>>> falf = [1,2,3,4]
>>> fler = itertools.combinations(falf, 2)
>>> for item in fler:
print(item)
(1, 2)
(1, 3)
(1, 4)
(2, 3)
(2, 4)
(3, 4)
re: https://github.com/google/butteraugli
Another possibility that does the same thing? : https://github.com/cloudinary/ssimulacra
python script that gets N shades of gray in CIECAM02 color model: https://github.com/earthbound19/_ebDev/blob/master/scripts/imgAndVideo/getNshadesOfGrayCIECAM02.py
Doesn't happen with color override mode.
On further investigation, it appears that some objects changed grayscale, and others don't. Maybe sometimes they all don't. And the background doesn't.
grayscale mode (converts current palette to grays)
UPDATE: stop using any gnu utilities ports that create windows newlines (such as those that come with cygwin), and use only ones that don't (such as from MSYS2).
items in this problem:
find . -name '*.svg' | sed 's|^./||' > all_svgs.txt
. Do instead something like: array=( $(find . -maxdepth 1 -type f -iname \*.png -printf '%f\n') )
gsed "$sedCommand" numberedCopies.txt | tr -d '\15\32'
~ Uh, better yet, pipe to tr -d .. when the text file is created.Case with find vs. gfind: https://serverfault.com/a/354407/121188
python script that predicts two colors that will look identical under different lighting (near color / optical illusion match color finder), via CIECAM02 space if possible
python script that converts color image to grayscale by reducing luminance (luma) OR chroma (~= saturation?!) to 0 in CIECAM02 color space, then back to RGB
re: http://www.tannerhelland.com/3643/grayscale-image-algorithm-vb6/
Terminal command on Mac that produces a video where this effect is clear and repeated (if you string the frames together in an animation) ; it slows, then starts again in spurts:
python /path/to/_ebDev/scripts/imgAndVideo/colorgrowth.py --viscosity 6 --width 800 --height 100 -n 1 --rshift 20 --stopPaintingPercentAsDecimal 1 -a 1 -q 4 --reclaimOrphanedCoordinates True --randomSeed 838061001 -b [252,251,201] -c [252,251,201] --savePreset False
super simple geometric science fiction planetscape: brutal triangles for mountains, planets / ringed / with moons / moons background, cloudscapes, forests, rockets
/ rockets ascending
the Zolphenxi lived on a planet bordering folded space which rained new intelligent species annually in exchange for (?) their departed adventurers.
bug fix: color override uses override background color on next variant (newly picked background color isn't loaded--maybe isn't set?--in that scenario
geometric basics (start with circles) super enlarged "pixels" from any image:
Others have done this with these programs in Go and Filter Forge (which I don't remember the names of right now). The shape and outline and stroke and distancing possibilities I'm imagining would be different though--actually similar to some Aboriginal art.
Find a way to crossfade a series of images on-the-fly, and code art formulas that exploit that method (e.g. cross-fading variants of an art image). This would save gigabytes of storage space of rasterized image sequences (video). Stream ffmpeg processing to a video player? avisynth?
https://trac.ffmpeg.org/wiki/StreamingGuide
https://support.metacdn.com/hc/en-us/articles/204513935-How-to-Live-Stream-Using-FFmpeg
https://rwdy15.wordpress.com/2015/02/12/streaming-with-ffmpeg-and-receiving-with-vlc/
https://www.wowza.com/docs/how-to-use-ffmpeg-with-wowza-media-server-mpeg-ts
https://www.npmjs.com/package/ffmpeg-stream
A lot of bash scripts have unnecessarily complex logic like the following; update them like the simpler examples:
CONVOLUTED:
# if no parameter 2:
if [ -z ${2+x} ]
then
echo "No argument 2 supplied"
fi
SIMPLER:
# if no parameter 2:
if [ -z "$2" ]
then
echo "No argument 2 supplied"
fi
CONVOLUTED:
# if _not_ no parameter 1 (in other words, if parameter 1) exists:
if [ ! -z ${1+x} ]
then
echo "Paramater 1 passed. Will assign from."
defaultValueTwo=$1
else
echo "No paramater 1 passed. Will assign default parameter."
defaultValueTwo=thing
fi
SIMPLER:
if [ "$1" ]
then
echo "Paramater 1 passed. Will assign from."
defaultValueTwo=$1
else
echo "No paramater 1 passed. Will assign default parameter."
defaultValueTwo=thing
fi
Also change e.g.
if [ ${2+x} ]
to:
if [ "$2" ]
This simpler logic has been tested on all platforms I'm involved with (Mac, Cygwin, Linux, and it doubtless works on msys2); go ahead and update all script thus.
There is no single-file-conversion script with the functionality of imgs2imgsNN.sh
, which converts all images of a given type to another (upscaled by nearest neighbor).
Break the functionality of imgs2imgsNN.sh
into a convert-one-file purpose script: img2imgNN.sh
, then update imgs2imgsNN.sh
to repeatedly call the convert-one purpose script.
primitive geometry with doily / decorative / curly appendixes / details
+1 fuzzy / grungy / splatter / inverse areas art using those as templates
The script names aren't going to change, but if they do I can update that.
additional option / different script that splits colors into nearest to arbitrary number of arbitrary colors (default black|white)
Replace all mapfile-generated loops (from resultant arrays) in .sh scripts with ifs read loops (which read the last line if no trailing newline at end of input), re: http://stackoverflow.com/a/31398490
while IFS= read -r line || [ -n "$line" ]; do
echo "$line"
done <file
Or should that be with IFS=' '
?
I HAD THOUGHT THE FOLLOWING better, but it breaks down when array elements contain spaces, even if you set UPDATE: Isn't that supposed to be IFS=""
. If you try to iterate over an array with spaces in the elements, it lumps it all into one element:IFS=' '
or IFS=" "` (with a space) though? will that work?
Or skip creating any files and iterate through an array created in memory (the printf command trims any ./ from the start of output) ; re: https://stackoverflow.com/a/12566981/1397555
IFS=" "
array=(`find . -maxdepth 1 -type f -iname \*.$1 -printf '%f\n'`)
# or to find every file,`gfind .` . .
for element in ${array[@]}
do
echo $element
done
-- which may work with loops that use ffmpeg where file loops that use ffmpeg usually fail on Mac, it seems
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.