Page 2 of 2

Re: Cut/crop sine wave shape into image?

Posted: 2015-12-08T11:11:51-07:00
by oeoeo
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:

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

  

Re: Cut/crop sine wave shape into image?

Posted: 2015-12-08T11:12:59-07:00
by fmw42
Did you try my alternate suggestions?

Re: Cut/crop sine wave shape into image?

Posted: 2015-12-08T12:30:33-07:00
by oeoeo
Did you try my alternate suggestions?
Yep. I get the syntax error message.

Mysteries of the cosmos...

Either way, I appreciate your help and commend your abilities. It's been fun getting my head in bash scripting.