Posts

Showing posts from January, 2020

Creating Computer Art With Processing JS

Image
My class on Big Data teaches 3 different computer languages: Java, Processing JS and R.  Right now, I am taking the class that works with Java and R.  However, I started to learn Processing JS to get ready for the class on Processing JS. Here is a screen shot of my first program: Black and White Circles. What is Processing JS ? It is a tool that converts Processing to JavaScript Created by MIT in the 1990s Used for complex visual work Why use it? Avoids having to use JavaScript for graphics Easy to use graphics and animation language Java-like syntax Why not? Requires learning a new language Requires additional libraries Inefficient for low level graphics Here is a video of my the Black and White Circles program: Here is a screen shot of the code:

Working with images in C++

Image
Recently, I finished a class on C++ offered by the University of Illinois.  The course can be found on Coursera. As the final programming project, we were assigned to work with a photo and change the pixels of the photo based on certain conditions. The three tasks were spotlight, illinify and watermark. I will post various changes to the image in this post and other posts. I will not post the code. Here is the original image: Here is the spotlight image assignment: To spotlight an image is to create a spotlight pattern centered at a given point (centerX, centerY). A spotlight adjusts the luminance of a pixel based on the distance between the the pixel and the designated center by decreasing the luminance by 0.5% per 1 pixel unit of Euclidean distance, up to an 80% decrease in luminance at most. Here is the image needed to pass the assignment: Here is another image were I adjust the 80% down to 60%: Here is the image were I adjust the l...