Friday, November 11, 2016

Computer graphics in Object Oriented Programming

In the last couple of weeks, we've been talking about the idea of object oriented programming and how it eases applying major ideas that could be impossible to do without organizing the idea into separate objects that interact together.One of these applications is computer graphics.

What's computer graphics ?

In general ,Computer graphics is the science and art of communicating visually via a computer’s display and its interaction devices. Computer graphics is an explosive and complex field ,with rapid advances in both theory and practice ,so instead of changing the whole API an alternative is implementing a highly adaptable organization built on objects by creating separate files for every function needed.

Why would we combine computer graphics and object oriented programming ?

Combining saturated graphics with object oriented programming is essential  allows programmers to conveniently construct interactive displays and it's object oriented programming interface (API) allows these structure to be easily reused and extended,thus allowing more flexibility to model application-specific graphics, which allows non-expert programmers to create creative apps without having to build the whole code on their own.

Are there any things that we have to keep in mind while using computer graphics ?


Of course,for a computer scientist to manipulate object oriented programming to use extensive graphics, he/she has to make sure to be careful to most of the details like resolution, transition,pixels,file types, coordinate system , booleans ,transition and vertex because without taking these into consideration, it will end up to be a big mess.

Lastly , a great example go computer graphics in object oriented programming is StdDraw which we have been using since the second weekend maybe the 1000 lines it had seemed scary back then and still confusing till now, it doesn't matter anyways because we only have to know how to implement it.
A product of StdDraw
References:
1-http://www.cs.cornell.edu/courses/cs4620/2010fa/Competition/img/1/8.jpg
2-http://www.cis.upenn.edu/~cis110/14su/hw/hw03/gallery/juschang-4.png

No comments:

Post a Comment