Q+A

<aside> 🧟 Put your two questions here. Please include your name.

</aside>

What are some examples of how we can incorporate parameters strategically? - Kevin

hmm. I'm not sure if any examples come to mind, but it sparks this thought.

When you are creating an interface—wether it is a user interface, an application programming interface, or even just thinking about what params a function should take—you should think about the params you expose carefully. This is a design AND technical decision. You should consider what your user wants to have access to, what they should have access too, and what they shouldn't. You should consider if exposing certain parameters might lead to impromper use, and how much that would matter. The less you expose, the more freedom you have to change how your code works. It usually easeir to expose more later than to take away options once exposed.

I know this is very much p5 focused, but are there examples of using these strategies in other forms of creative coding/design? Unity, etc.? - Kevin

the TACTICS mentioned in that chapter (like moving points away from each other) are applicable in any framework/library. Most of them are pretty common too.

What does array.push() mean in the stored grid placement example? - Skylar

push adds an item to the end of an array.

myArr = ["apple", "bannana"]
myArr.push("carrot");
console.log(myArr);
// ["apple", "bannana", "carrot"]

Could you elaborate on what effects could “placing and drawing” create? -Skylar

imagine you are placing things at random and every time you place something you check if it is near anything already placed. If it is you want to change the color of those already-placed things.

If you mix your logic/placement and drawing code, you'll have a problem: you already drew the already-placed things, so its too late to draw them differently.

If you do all your placing/logic in a first pass. Then do a second pass to draw them, you won't have that problem.

What does “tighten” and “dithered” mean in the point placing demo example? A bit confused about the strategy combinations in this example. -Skylar

tighten means to find dots that are near each other, and to move them even nearer to each other

dithering is a common technique in digital images. Imagine you want to show a grayscale image using just two colors: black and white.

If you could pick a single threshold and anything darker is black, anything ligher is white. Thats not dittered.

Or you could make very dark area's black, middle tone areas 'checkered' and, light areas white. Thats basic dithering.

The images below are dithered

Untitled

Untitled

I generally understood what to change for the second challenge- could you walk us through something though? -Aamina

I'd be happy to walk you through something, but I'm not sure what you are askingabout. Do you mean Strategy Coding Challenges 05-08? 

Looking more at Stipple Gen, it allow you to save the new image you create- can we allow someone to save from our sketches? -Aamina

yep!
<https://p5js.org/reference/#/p5/save>