Posts

Harmonographs in Python

Image
Harmonographs: "A harmonograph is a mechanical apparatus that employs pendulums to create a geometric image. The drawings created typically are Lissajous curves or related drawings of greater complexity. The devices, which began to appear in the mid-19th century and peaked in popularity in the 1890s, cannot be conclusively attributed to a single person, although Hugh Blackburn, a professor of mathematics at the University of Glasgow, is commonly believed to be the official inventor."- Wikipedia Below I designed some Harmonographs with the help of Python:

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...

Which Programming Language To Learn ?

Which computer programming languages to learn in 2019? The most popular popular computer language videos on Youtube are probably the "Which programming language to learn in 2019...".  This is because there are so many new languages and new programmers are unsure what language to start learning. The common response by many advanced programmers are "What do you want to build or do?". This question is problematic since most newbies don't know how specific programs relate to front end or back end development. Also, most newbies don't know whether they will prefer front-end or back-end development. And most important, most newbies don't know if they will prefer front-end or back-end devleopment once they start working in an organization.  For example, the organization may prefer to spend more resources on front-end development. Lately, Youtube influencers have started recommending that newbies start with either JavaScript or Python since these are easy...

Building games with Unity and C#

Image
A few days ago, I cam across some Youtube videos that talked about Unity Technologies and C#.  I then saw some courses on Udemy and did some research on C#.  I found the games on Unity very interesting and more fun than the games I normally see in instructional videos. I also learned that C# is similar to Java.  And thus, my journey with Unity and C# begins....

Breakout (Brick Breaker) Game using Java: Version 3

Image
Breakout (Brick Breaker) Game with Java This is the 3rd version of the Breakout game.  I added the score, game over, and game restart to this version. I also extended the height of the screen so there is no "empty" space at the bottom of the screen as in earlier versions. I also added the "Congratulations! You Won!" part at the end of game. Unfortunately, I still need to edit the "Congratulations" statement. Although, I have basically finished the game, I still have things that need to do to have a proper game.  The first- naturally- is I need to finish the ending.  Besides, this there are a few other things.  I need to change the color of the bricks and the points rewarded.  The bricks are all "white"; I need to vary the color and points of the bricks based on the level.  I also need to add lives to the game. Right now, the player only has 1 life.  I also need to add different levels so that the game gets more difficult as the ga...

Breakout (Brick Breaker) Game Using Java : version 2

Image
Breakout Game using Java This is the second version in the development of the Breakout (Brick Breaker) game.  In this version, I added the bricks to the game. Adding the bricks to the game was not easy.  I had to import some modules and make sure that the outline for the bricks was well done.  Making the bricks involved creating a nested loop. There was a problem with the ball.  Once the ball connected with a brick, the ball would not bounce off randomly. Instead the ball would continue on a direct path.  I needed to add code so that the ball would bounce randomly after making contact with a brick. I still have an issue with the ball leaving the screen. This can be seen in the image above. Once the ball leaves the playing screen, the program generates a yellow streak. I will need to fix this.  Most likely, I will increase the size of the playing screen. In the next stage, I will need to add the score and increase the complexity of the ga...