Primitive 2D Experience

So, the first class of the first week of school —  the legendary ICM! I was super excited and somehow nervous about this class, given the very limited experience in programming in my previous life (translate, zero experience.)  My instructor , Roopa, is extremely nice and and knowledgeable about the topic, and I absolutely love that she has sort of  “c’mon, dont be shy, hit me with any question you have!” confidence throughout the class. The first exercise we had helped a lot in terms of giving (the computer) instructions in plain English versus in coding, with proper syntax.

Following is the process of what I was carefully working on Week#1 HW with 2D primitive shapes.

Since we had this portrait, I kind of wanted to recreate something similar to that.

And…. the reference page was helpful.

icm1         icm2

 

Next, I tried over and over and over again,  with many argument combinations for three different points…. but I was completely stuck, and failed to draw a simple triangle that is supposed to attach to the rectangular above.

icm3 icm4 icm4

 

WHY?! I even tried making up new function such as triangle(CENTER) with the intent to put the shape back to the center of the window….. so much for learning something brand new in life,  but then of course I learned there is no such function. Being innovative obviously doesn’t work at this point.  So, I made a appointment to see resident, to fix  the stupid yet simple triangle into the correct position.

After the appointment, I fixed the issue…. it is simple and straightforward if you figure out the order of the point! The order of the operation matters!

So the triangle is back to where it should be…. and I made some final adjustments.

icm5icm5

And here is the final product =)

icm7

Lesson learned — you don’t actually memorize every function. Familiarize yourself with reference, and a lot of it is just make the X-axis go east west, and the Y-axis go north and south.

The final draft is nothing more than a drawing made by my 6-year-old cousin 🙁 …..  However, considering this is my very first time learning how to use Processing, I very much look forward to what is coming up next.

 

Leave a Reply