irajgreenberg / chaos-studies

MIT License
0 stars 0 forks source link

create contextual number generator #1

Open ybakos opened 9 years ago

ybakos commented 9 years ago

Create a number generator that returns values based on input and context. For example, color adjustments should be bounded to 0 and 255, and perhaps adjusted relative to the scale of the original number.

int newRedValue = generator.color(10); // between 0 and 30 int newGreenValue = generator.color(100); // between 50 and 150

The generator should return different values based on context. For example, size ranges should be different than stroke weight ranges.

irajgreenberg commented 9 years ago

What are your thoughts about using floats for color components? In PB, I use 0.0-1.0 as default range, more native type for math expressions.

On Sat, Oct 31, 2015 at 12:39 PM, Yong Joseph Bakos < notifications@github.com> wrote:

Create a number generator that returns values based on input and context. For example, color adjustments should be bounded to 0 and 255, and perhaps adjusted relative to the scale of the original number.

int newRedValue = generator.color(10); // between 0 and 30 int newGreenValue = generator.color(100); // between 50 and 150

The generator should return different values based on context. For example, size ranges should be different than stroke weight ranges.

— Reply to this email directly or view it on GitHub https://github.com/irajgreenberg/chaos-studies/issues/1.

Director, Center of Creative Computation Professor, Computer Science and Engineering SMU, Dallas

214.768.4625 http://iragreenberg.com http://iragreenberg.net

Looking for great gifts for smart people...

The alternative CS I textbook for humans: Creative Coding and Generative Art in Processing 2 ( http://www.amazon.com/Processing-Creative-Coding-Generative-Art/dp/143024464X )

Intermediate level Creative Coding and Processing Book: The Essential Guide to Processing for Flash Developers ( http://www.amazon.com/Essential-Guide-Processing-Flash-Developers/dp/1430219793/ref=sr_1_1?ie=UTF8&s=books&qid=1262797412&sr=1-1 )

First major language reference on Processing: Processing: Creative Coding and Computational Art ( http://www.amazon.com/Processing-Creative-Coding-Computational-Foundation/dp/159059617X/ref=sr_1_1?ie=UTF8&s=books&qid=1262797756&sr=1-1 )

[image: --] Ira Greenberg [image: http://]about.me/iragreenberg http://about.me/iragreenberg

ybakos commented 9 years ago

I like floats rather than 0 - 255.

On Oct 31, 2015, at 12:52 PM, Ira Greenberg notifications@github.com wrote:

What are your thoughts about using floats for color components? In PB, I use 0.0-1.0 as default range, more native type for math expressions.

On Sat, Oct 31, 2015 at 12:39 PM, Yong Joseph Bakos < notifications@github.com> wrote:

Create a number generator that returns values based on input and context. For example, color adjustments should be bounded to 0 and 255, and perhaps adjusted relative to the scale of the original number.

int newRedValue = generator.color(10); // between 0 and 30 int newGreenValue = generator.color(100); // between 50 and 150

The generator should return different values based on context. For example, size ranges should be different than stroke weight ranges.

� Reply to this email directly or view it on GitHub https://github.com/irajgreenberg/chaos-studies/issues/1.

Director, Center of Creative Computation Professor, Computer Science and Engineering SMU, Dallas

214.768.4625 http://iragreenberg.com http://iragreenberg.net

Looking for great gifts for smart people...

The alternative CS I textbook for humans: Creative Coding and Generative Art in Processing 2 ( http://www.amazon.com/Processing-Creative-Coding-Generative-Art/dp/143024464X )

Intermediate level Creative Coding and Processing Book: The Essential Guide to Processing for Flash Developers ( http://www.amazon.com/Essential-Guide-Processing-Flash-Developers/dp/1430219793/ref=sr_1_1?ie=UTF8&s=books&qid=1262797412&sr=1-1 )

First major language reference on Processing: Processing: Creative Coding and Computational Art ( http://www.amazon.com/Processing-Creative-Coding-Computational-Foundation/dp/159059617X/ref=sr_1_1?ie=UTF8&s=books&qid=1262797756&sr=1-1 )

[image: --] Ira Greenberg [image: http://]about.me/iragreenberg http://about.me/iragreenberg � Reply to this email directly or view it on GitHub.