Modulation command, Envelope curves

 From:  bemfarmer
5592.4 
In order to explore creating curves in envelopes, the modulation of a high frequency sine wave, by a low frequency sign wave, was scripted.
Here is a test modulation script, using sine waves. The similarity is AM radio.
There are lots of equations with various variables, from a search of "amplitude modulation." Matlab has some also.
I added an absolute value, which may be wrong.
The script uses the factories array type format, adapted from LineWeb script. (Trying to add a second curve to the Sinewave script did not
display well, like there was some conflict between the two factories.)

I did not know how to assign colors to the factory arrays, but was able to color the curves, by adapted Michaels script "Assign styles to solids," by replacing
breps with curves, and brep with curve. The style assignment could also be at the end, after the Commits.
The side effect is that any other curves on the MoI screen with also have new colors :-)

Is there a better way to assign colors to factory/factories/arrays, in scripts?









Edit: 12/20/2012, updated to version2.

EDITED: 19 Feb 2014 by BEMFARMER

Attachments: