Category Archives: Organized

Organized

My Project.

For “Organized”, I decided to recreate an existing work of Art by Sohan Qandri.

 

SOURCE

“Artist, poet and Tantric guru Sohan Qadri (1932-2011) is one of the only internationally acclaimed artists deeply engaged with spirituality. Qadri abandoned representation early on in his long career, incorporating Tantric symbolism and philosophy into his vibrantly colored minimalist works. Born in India, he was initiated into yogic practice at age seven. In 1965, he left India and began a series of travels that took him to East Africa, North America, Paris and Zurich.”

— from the gallery’s website.

 

 

Organized Dots

For this homework I was thinking of just making a bunch of organized dots,

then I stated thinking how all images are basically just a bunch of organized dots.  There’s a code I found in the p5.js reference examples that takes an image and draws a bunch of ellipses on a canvas that eventually forms the image.  The order of dot placement is random and the size is based on mouseX position. Here’s that link:

https://p5js.org/examples/image-pointillism.html

It’s cool, but my problem is it takes FOREVER for the whole image to take shape and I don’t have that kind of time. SO organized the code with functions  and for loops so instead of dot by dot, the image appears many dots a time. I wrote a function for 1 dot, and then referenced that function in my function to create many dots by putting it in a for loop.  The more dots you ask to appear on screen per frame, the slower the code lags though so I had to find a good balance. For instance, you could ask 10,000 dots to appear all at once and get a pretty well formed image all at once, but you have to wait like 2 minutes for it to appear which isn’t fun.

Unrelated, I also tried out the save frame command. If you press enter, the image on screen is saved to your downloads. This however, is also on a lag an takes a very long time to actually save and freezes the code while its happening. This whole project is fun but  definitely conspiring to eat up all my time. Here’s the code:

https://github.com/g2eleni/Organized

Organised

I wanted to make something that didn’t really need to be made for this assignment. This is a game about feeding cats. It’s not particularly rewarding or inspiring. I knew that the most difficult part to this assignment would be the game’s main function, randomly generating a triangle in one of four positions. I asked my friend for help and this is how we made the triangles work. The program would generate a random number between one and four. We found out that this included numbers with decimal points, so we made sure to make the computer choose integers between 0 and 4 by using the parseInt() function. If a 2 was generated, a triangle would be drawn in the second position a triangle could be drawn in.

Then, to continue generating these random triangles, if a 2 was generated and the mouse clicked in the area in the second position of the triangle, a new number would be generated. Generated the new numbers and triangles happened too quickly, so I put a half a second delay on the number generating function. To make this an actual game, each time the correct triangle was pressed, the player would be awarded one point. When 10 point were reached, the screen would switch to an ending scene for 4 seconds, while the point count would reset back to zero.

After I figured out these logistics, I drew the cat faces. I don’t think I made them very efficiently and ran into issues with strokes on shapes, even though I used the noStroke function/command. I had trouble recreating the cats in the new positions and doing basic math. As you can see, one cat is missing an ear. This is not intentional.

Find code on GitHub

You can test it out here, as well.

 

Organized

I was originally going to make the Snake Game, but had troubles making a certain amount of the tail appear, I tried using an array but it wasn’t working so I just turned it into a more artistic program. So I turned to tweaking a code I had made for a creative coding class a few weeks ago that fulfilled the rest of the requirements for the home work. It is much more abstract and just plays around with some of the functions in p5. With for loops, arrays, different events, and time.

For some reason since I built the other one in the p5 web browse

r it doesn’t work well in the p5 IDE, but here’s the link.

Link to all my code.

(Attempted) Paint Program

For this assignment, rather than creating art or a game, I wanted to make a program that would allow you to create art– a paint program. After watching several of the coding train tutorials I figured I could build off of what he’d already made with his ball generator. I removed the segments of the code that made the balls disappear after a time, and got rid of the alpha channel in the colors. I then added an array of colors, at first using RGB values, but after having trouble with those, resorting to hex codes. I called this array using a keytyped function, changing the array value based on the key pressed, hence changing the color of the draw function. Additionally I added a key at the top to explain the color picking process. I could not, however, figure out how to make it so that the object already painted would stay as they were and only the new objects would change color. It seems that the loop won’t allow for something like this, and I if I were to recreate the program I would not use a loop.

Here’s the Code

HomeWork 6

For this project I decided to imitate the recently updated p5.org home page. When you move the mouse from side to side the image changes, and then if you click a different subject of the image shows up.

https://dl2514.github.io/hw6/

Also, I did some work on my final project proposal:

https://docs.google.com/a/nyu.edu/presentation/d/11aOoQpXJmDVwSlxGVrfdB0TgU-NWztSul2hhRB5-XXA/edit?usp=sharing

And some tinkering with one of the APIs I plan to utilize:

https://github.com/dl2514/lightsCameraApplication