So far in this project, I have some of the simple shapes down.. circles, hexagons, stars and dodecagons (though they're still not lining up) and each shape has a unique color transparency, line thickness and line color. Overlapping each other, they make some pretty cool, though still very simple, patterns. However, all the colors had been entered in manually for each shape in hexadecimal: 0×000000 for black through all combinations of red (the first two values after the 'x'), green (the second two) and blue (third) up to 0xFFFFFF for white.
Instead of going through and manually changing the colors through the code, I wanted to have them randomly chosen and plugged in every time the program ran. This is usually pretty easy for a normal value (the value = Math.random()*(the upper limit – the lower limit)+the lower limit), but in this case, I needed to convert to hexadecimal. Here is what I did:
public function getColorValue():String { var a:String = randomColorValue(); var b:String = randomColorValue(); var c:String = randomColorValue(); var d:String = randomColorValue(); var e:String = randomColorValue(); var f:String = randomColorValue();
var colorValue:String = "0x"+a+b+c+d+e+f; trace(colorValue); return colorValue;
} public function randomColorValue():String { var getNumber = Math.floor(Math.random()*(15-1))+1; if (getNumber == 10) { getNumber = "A"; } if (getNumber == 11) { getNumber = "B"; } if (getNumber == 12) { getNumber = "C"; } if (getNumber == 13) { getNumber = "D"; } if (getNumber == 14) { getNumber = "E"; } if (getNumber == 15) { getNumber = "F"; }
return getNumber; }
Each value of the hexadecimal color code is given a string variable that is randomly generated from the "randomColorValue" function. It remains a string so that it can both be a number, 0-9, or a letter (A-F), and that at the end of the function, the strings can be added together as one.
The last thing that needed to be done was at the point that the variable colorValue was used. It is still a string here, but the hexadecimal actually reads as an integer (strange, but convenient), so the string has to be turned into a number value when it is used, so:
var fillColorOne:uint = int ( getColorValue() ); var fillColorTwo:uint = int ( getColorValue() );
The return from function getColorValue is converted as it fills the variables for color. Probably not as cool as I think it is, but I am happy with the result. All the examples are based on the same layout, but the variation in color and line thickness really changes a lot.
One of our favorite restaurants, Veggie Planet, serves up a really good spicy black bean purée with salsa and cheese over pizza bread that I get nearly every time we go for lunch. I figured that the recipe couldn't be terribly complicated, so we made our own this evening.
1 can of black beans
2 or 3 cloves of garlic
Salt
Chili powder
Basil
1 tomato
1 avocado
I wasn't sure what consistency would be good, so I drained half the black bean liquid into a bowl, and the rest into the processor with the beans so if I wanted it to be thinner, I could add the extra in. It also gave me a good way to test what spices I wanted add in. Threw in a few cloves of garlic and tapped some salt and a good portion of chili powder in, blended it up and tasted it. The beans were unsalted, and I had a difficult time bringing out a strong spice flavor, though I went through a couple of rounds of tapping chili powder in. Blended the whole thing till it was paste and put it over rice, adding some shredded cheese. Nicole chopped up a tomato into good size chunks and opted to put everything on top, whereas I chose to leave the avocado and tomato on the side.
Man it was pretty good. We weren't as blown away as when we first made pesto, but this was a definite winner, I'd say. The quesadilla in the photo was purchased from whole foods and, though decent on its own, didn't compare to our homemade meal. The flavors in ours were all pretty basic, but distinct, not blending into each other and getting lost, but complimenting. I will say that in the future, I will just add the chili powder on top with the cheese instead of mixing it in to bring it out a bit more.
Overall, a B+. With some minor additions, easily an A-.
Finished up the six-point star on my lunch break and worked out the math for the dodecagon this evening. Each shape can be run independently (at the moment, it is a matter of //-ing the function for each out of the program) and laid over each other. I've been playing with transparency, which yields some pretty cool mixes of color. The first pattern is first hexagons in 1/3 transparent blue, with circles laid over at 1/2 transparent green and the six-point star over that in opaque red.
The dodecagon looks pretty cool on its own, but for a reason I can't quite figure out, is slightly smaller than the other shapes, though they all share the same base variable for size. The result is a pattern that starts out nicely, and then drifts into a dissonance of two conflicting patterns.
Next: Establishing a separate background and foreground pattern.
After learning a few new tricks in flash, a positive result! What had taken me a solid ten to fifteen minutes to draw, I can now produce… sort of. Not everything works as it should.
We made some more pesto for dinner, which made us wonder why we don't have it every night. While at Whole Foods picking up the basil, fighting small children for the free samples, I had some white bean dip that was pretty tasty, so, after dinner, Nicole and I attempted a modified version of the dip.
1 can of navy beans, drained
3 cloves of garlic
2 tbsp olive oil
2 tbsp lemon juice
Basil
Salt
Pepper
Blended it all up and ate it with some sesame crackers my mom gave us. It was good, though we both agreed: less or no lemon juice next time. We were wanting a savory flavor and it was more tangy. It was very much like a hummus, which, it now dawns on me, is something I hadn't realized I could so easily make with my processor. There is a lot of potential here and many directions to experiment with.
I made pizza for dinner tonight. It isn't the cheapest meal to make, and ordering a pizza is probably cheaper, but I like homemade pizza. It is very satisfying to make, particularly because it is not hard to make (with store bought dough, I suppose), and yields a delicious meal.
Sautéed Bell Pepper and Onion Pizza
1 bell pepper
1/2 an onion
2 cloves of garlic
Pizza dough
Some pasta sauce
Provolone Cheese, sliced
Salt, Basil to taste
I had a lot of trouble with the dough the first few times I made pizza. I kept stretching it out, but once it went on the pan the whole thing shrunk back to about half the desired size. I also don't have a great location to put flour on the dough without getting it everywhere. I realized, however, that putting the flour into the bag of dough allowed me to prepare the dough without making a big mess. At the end, the dough comes out, nicely floured, and the bag can be thrown away with whatever extra flour was left. It also allowed me to handle the dough more thoroughly and to figure out the best way to stretch it out. The rest is pretty easy. Butter a cookie sheet, throw the dough on, spread a small amount of pasta sauce on, and layer some provolone cheese. We're tried different cheeses, but provolone works and tastes best. While the pizza is baking, the onion, garlic and bell pepper can be sautéed with olive oil with salt and basil. When the pizza is ready, the toppings are distributed on and the whole thing cools for a minute so it is easier to cut.
The picture isn't great, but it the pizza was delicious. I misplaced our grocery receipt, so I can't break the ingredients down by price until later.