Re: Cut/crop sine wave shape into image?
Posted: 2015-12-08T11:11:51-07:00
This is more of a proof-of-concept right now but I work for a company that (surprise!!) does internet ads. We currently pay people to build them and I'm toying with the idea of making aesthetically "interesting" (and I use the term loosely) ads automagically. This sine wave one was one submitted to get done that way.
I have no good idea why yours does not work for me, however.
I do know that changing the loop to this seems to help:
I have no good idea why yours does not work for me, however.
I do know that changing the loop to this seems to help:
Code: Select all
for ((i=0; i<len; i++))
do
y="${yArr[$i]}"
yy=$(echo "scale=6; $amplitude*${y%%%}*.01*2+$row")
yy=$(echo "${yy}" | bc)
# yy=`echo "scale=6; $amplitude*${yArr[$i]}*2/$qrange+$row" | bc`
coordArr[$i]="${xArr[$i]},$yy"
done