亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? graphics.txt

?? c語言開發方面的經典問題,包括源代碼.c語言開發所要注意的問題,以及在嵌入式等各方面的應用
?? TXT
?? 第 1 頁 / 共 2 頁
字號:
                   A C-Based Graphics Library for CS1                            Eric S. Roberts                     Department of Computer Science                          Stanford UniversityNOTEThis paper has been submitted to the Twenty-sixth SIGCSE TechnicalSymposium on Computer Science Education.  Copyright is retained by theauthor prior to publication release.ABSTRACTThis paper describes a simple graphics library designed for a CS1 courseusing ANSI C as its programming language.  The library can beimplemented easily on a variety of hardware platforms, providing areasonable level of portability.  Implementations currently exist forcompilers on the Apple Macintosh, the IBM PC, and Unix workstations; thesource code for each of these implementations is publicly available byanonymous FTP from the Roberts.C.CS1 area on host aw.com.  In addition,the public distribution includes a fully standard implementation thatgenerates a PostScript representation of the graphical image.1.  INTRODUCTIONGetting college students excited about introductory programming isharder in the 1990s than it was a decade ago.  Those who have grown upwith personal computers have strong preconceptions about whatconstitutes an "interesting" application.  Modern technology has raisedthe ante.  The simple text-based applications that are the mainstay ofmost computer science textbooks offer little excitement to the studentwho is used to modern graphical interfaces.  A program that sorts a listof numbers -- as interesting as that problem may be from an algorithmicperspective -- does not impress students who have played computer gamesfor years.Using a graphics library in the introductory course makes an enormousdifference.  Even when the homework problems are harder than thoseassigned in a more traditional course, students approach them withconsiderably more enthusiasm, which in turn enables them to accomplishmore.  Captivated by the allure of computer graphics, beginning studentshave been able to develop extraordinarily sophisticated programs.  Ihave had students complete 1000-line programs in the fourth week of theintroductory course.Beyond fostering excitement, using a graphics library has otherpedagogical advantages.  In my experience, requiring students to writegraphical applications early in the term turns out to be the mosteffective way to drive home the concepts of parameter passing andstepwise refinement.  In constructing graphical figures, studentsimmediately recognize the importance of parameters as they askthemselves, for example, where to put a line or how big to make acircle.  Moreover, creating the program structure necessary to display agraphical image encourages students to master the technique ofdecomposition.  Because the graphics library itself provides only asmall set of primitive operations such as drawing a straight line, thestudent quickly learns to assemble lines into rectangles and othercomposite figures.  As these figures are combined to form still largerstructures, the organization of the image suggests a naturaldecomposition strategy for the program as a whole.Although these advantages give computer science instructors a strongincentive to integrate graphics into the introductory programmingcourse, doing so is complicated by the following factors:   o  Existing graphics packages are usually designed for a specific      implementation platform, which includes not only the      underlying hardware but also the operating system, the      compiler, and the runtime libraries.  An IBM PC program that      uses, for example, a graphics package designed for Microsoft      Windows will not run on the same machine under DOS, much less      on a Macintosh or a Unix system.  Because of this high level      of system dependence, the instructor who wants to use graphics      must choose a particular platform and limit students to the      graphical facilities available in that environment.   o  Because there is no single graphical standard that works for      all machines, textbooks written to attract the widest possible      audience usually avoid the issue by omitting any discussion of      graphics.  The instructor is therefore forced to develop      supplementary course materials that explain how to use the      local graphics facilities.   o  Most graphics libraries are designed for use by experts, not      introductory students.  As a result, those libraries are often      too complex for novice programmers to comprehend.Three years ago, when we started to convert Stanford's introductorycourse from Pascal to C, we had to face these problems directly.  TheTHINK Pascal system we had been using included a simple graphics librarythat was well designed for use by beginning students.  Unfortunately,the THINK C compiler we chose for the redesigned course offered nocorresponding facility.  Because our experience had convinced us thatusing graphics strengthens the introductory course, we decided to designour own C-based graphics library and integrate it with the instructionalmaterials being developed for the course.The remainder of this paper provides an overview of the graphics libraryand the strategies used to implement it on a diverse set of programmingplatforms.2.  INTERFACE DESIGN CRITERIAThe first step in developing the graphics library was to define theinterface.  In addition to more traditional principles of good interfacedesign, we wanted to develop an interface that met the followingcriteria:  1.  It must be simple.  At Stanford, we introduce the graphics      library early in the term when students are first learning      about functions and procedures.  Since the students have      relatively few programming tools at their disposal, the      graphics interface must not depend on advanced concepts such      as pointers, records, or even arrays.  Moreover, it should not      export so many functions than the novice programmer cannot      understand the interface as a whole.  Beginning programmers      can easily be intimidated by a large interface, even if they      are not required to use all of the functions it contains.  2.  It must correspond to student intuition.  The conceptual model      that underlies the graphics interface must not be so      mathematical or so technical that students have trouble      understanding its operation.  They have usually been exposed      to Cartesian coordinate systems in high school mathematics and      are now beginning to become familiar with the procedural      programming paradigm.  The design of the graphics interface      should take advantage of that preexisting knowledge, even if      the resulting conceptual model is at variance with the      underlying model supported by the hardware.  3.  It must be powerful enough for students to write programs they      think are fun.  The principal advantage of the graphics      library is that it allows students to undertake programming      problems that are exciting enough to capture their      imagination.  For this to be possible, the interface to that      library must export functions powerful enough to generate      interesting graphical displays.  4.  It must be widely implementable.  To ensure that our approach      would be relevant to a variety of institutions and not just to      Stanford, we believed that it was important to implement the      graphics package on several different platforms, particularly      those used most often for introductory-level education.  We      therefore designed the interface so that it did not depend on      any specific platform.In many cases, the individual criteria support one another in thatdesign decisions adopted to satisfy one end up advancing the others.For example, choosing to leave a feature out of the interface results ina library that is not only simpler but more portable, because there arefewer features to implement for each new architecture.  In other cases,however, the design criteria trade off against each other, whichrequires the designer to balance the competing criteria and find anappropriate compromise.2.  EVOLUTION OF THE INTERFACE DESIGNFortunately, we have had the opportunity at Stanford to adopt anevolutionary approach to the graphics library design.  In each of thefour quarters during the year, the Computer Science Department teachestwo versions of the introductory programming course: CS106A, forstudents with little or no prior programming experience, and CS106X,which combines the material in the standard CS1/CS2 curriculum into anintensive one-quarter course for students with more extensiveprogramming backgrounds.  Both courses teach ANSI C using a library-based approach [Roberts93] and use the graphics library extensivelythroughout the course.  Thus, we can experiment with a particularlibrary design one quarter and refine it for the next.We introduced the first version of the graphics library in the fall of1992, the first quarter in which ANSI C was used for the entire CS106Apopulation.  At the time, the graphics library was very simple andincluded only the following operations:   o  Initialize the library.   o  Move the pen to a specified position on the screen.   o  Draw a line segment with displacements dx and dy.   o  Draw a circle with a given center and radius.Students were assigned several simple programs using the library andcould also to take part in an optional graphics contest.  The coursestaff evaluated each entry on the basis of both its artistic merit andits geometrical sophistication.  In addition, I invited the students tosuggest new features that would have helped them design an even betterentry.  The following are the most commonly cited suggestions, rankedaccording to how many times each was cited:  1.  Arcs (as opposed to complete circles)  2.  Shaded regions  3.  Simple animation (by erasing and redrawing a figure)  4.  Color  5.  Text  6.  Mouse inputHaving tried to design some graphical displays using the initial versionof the library, I was quite sympathetic to the students' concerns.Adding the features they requested would certainly make the interfacemore powerful and thereby make it more exciting for the better students.Unfortunately, adding those features would also complicate theinterface, making it harder for other students to understand.  Perhapsmore importantly, adding features would make it more difficult todevelop implementations for a variety of platforms and thereforecompromise the portability criterion.My solution to this dilemma was to separate the graphics library intotwo interfaces: a simple graphics.h interface providing a minimal set offundamental tools and a more elaborate extgraph.h interface offering theextended capabilities.  The textbook developed along with the course[Roberts95] discusses only the simple graphics.h interface.  Studentswho seek greater challenges, however, can use the features offered byextgraph.h.  This design also promotes portability because animplementation that covers only the functions in graphics.h issufficient for all the examples and exercises included in the text.  AtStanford, the standard introductory course requires only the graphics.hinterface, while the accelerated course typically requires the use ofextgraph.h as well.The contents of the current versions of each interface are summarized inFigures 1 and 2 at the end of this paper.4.  IMPLEMENTATION STRATEGIESFor the most part, implementing the rendering operations required by thegraphics library is not especially difficult.  Existing graphicslibraries invariably include facilities for drawing lines, displayingtext, and filling polygonal regions, which are the only primitives thelibrary requires.  Thus, to implement the procedures that actuallyproduce graphical output, all that is needed for each implementation isa small amount of code to translate calls to the graphics.h interfaceinto the rendering calls required for the system graphics library.

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美刺激脚交jootjob| 亚洲成av人在线观看| 国产91综合网| 日韩一二在线观看| 久久99精品久久久久久动态图| 欧美肥大bbwbbw高潮| 秋霞午夜av一区二区三区| 欧美成人r级一区二区三区| 精品亚洲成a人| 国产精品午夜电影| 99久久精品99国产精品| 亚洲三级在线免费| 欧美日本在线观看| 久久av中文字幕片| 国产欧美日韩综合| 91黄色小视频| 看片网站欧美日韩| 久久综合狠狠综合久久综合88| 成人高清免费观看| 亚洲h在线观看| 亚洲欧美自拍偷拍色图| 在线观看www91| 久久 天天综合| 一区二区三区在线免费观看| 欧美另类变人与禽xxxxx| 久久99精品国产91久久来源| 中文字幕一区二区日韩精品绯色| 欧美制服丝袜第一页| 久久99久久99精品免视看婷婷| 欧美国产激情一区二区三区蜜月| 欧美影片第一页| 国产一区二区三区不卡在线观看| 综合在线观看色| 欧美成人video| 欧美专区在线观看一区| 国产精品综合一区二区| 一区二区三区精品| 久久久久国产精品厨房| 精品视频1区2区| 福利一区在线观看| 日本不卡的三区四区五区| 中文字幕成人av| 日韩精品一区二区三区视频| 色欧美88888久久久久久影院| 黄色小说综合网站| 亚洲美女精品一区| 国产免费观看久久| 日韩欧美电影在线| 欧美日韩久久久| 色婷婷精品久久二区二区蜜臀av| 国产一区二区久久| 奇米色一区二区三区四区| 亚洲精品国产一区二区精华液| 精品国产伦理网| 欧美肥胖老妇做爰| 欧美这里有精品| 色婷婷综合视频在线观看| 国产精品香蕉一区二区三区| 蜜桃视频一区二区| 亚洲成人免费在线| 一区二区三区精密机械公司| 久久久亚洲综合| 久久影院视频免费| 欧美一区二区三区免费| 精品视频一区三区九区| 在线观看一区不卡| 91免费在线看| 丰满岳乱妇一区二区三区| 经典一区二区三区| 麻豆精品精品国产自在97香蕉| 五月综合激情婷婷六月色窝| 亚洲激情自拍偷拍| 综合激情成人伊人| 中文字幕不卡在线播放| 国产亚洲一区二区三区四区| 精品理论电影在线观看 | 偷拍一区二区三区| 亚洲一区精品在线| 亚洲黄色av一区| 亚洲精品成a人| 亚洲欧美福利一区二区| 亚洲女子a中天字幕| 自拍偷拍国产亚洲| 亚洲免费视频成人| 亚洲精品中文字幕在线观看| 亚洲最新在线观看| 亚洲电影欧美电影有声小说| 日韩高清不卡在线| 精久久久久久久久久久| 国产宾馆实践打屁股91| 风流少妇一区二区| 色诱视频网站一区| 欧美性大战久久久久久久蜜臀| 在线观看日韩av先锋影音电影院| 欧美三级乱人伦电影| 欧美另类z0zxhd电影| 精品少妇一区二区三区在线播放| 欧美精品一区在线观看| 国产欧美精品一区二区三区四区 | 亚洲精品在线三区| 日本一区二区三区在线不卡 | 日本电影欧美片| 欧美丰满一区二区免费视频| 日韩免费高清av| 中文字幕欧美激情| 亚洲影视在线播放| 蜜臀国产一区二区三区在线播放| 国产一区二区三区免费观看| 9人人澡人人爽人人精品| 在线观看亚洲a| 欧美成人video| 亚洲美女屁股眼交3| 日韩av在线免费观看不卡| 国产激情一区二区三区四区| 色天天综合色天天久久| 日韩免费视频一区二区| 成人欧美一区二区三区视频网页| 午夜精品一区二区三区免费视频| 久久99国产精品久久99果冻传媒| 成人黄色国产精品网站大全在线免费观看| 成人av动漫网站| 777久久久精品| 国产精品高清亚洲| 日韩精品久久理论片| 成人av午夜影院| 91精品国产麻豆国产自产在线| 欧美国产精品中文字幕| 亚洲mv大片欧洲mv大片精品| 丁香激情综合五月| 91精品国产色综合久久不卡电影| 国产午夜亚洲精品理论片色戒 | 韩国精品久久久| 在线看一区二区| 国产精品日产欧美久久久久| 亚洲v精品v日韩v欧美v专区| 高清在线观看日韩| 精品久久久久久久久久久院品网| 亚洲欧美一区二区三区久本道91| 极品美女销魂一区二区三区 | 97se亚洲国产综合自在线| 欧美一区二区国产| 亚洲激情成人在线| 粉嫩aⅴ一区二区三区四区五区| 欧美精品 日韩| 亚洲精品日日夜夜| 菠萝蜜视频在线观看一区| 日韩无一区二区| 亚洲午夜电影在线观看| 91网址在线看| 久久久国产一区二区三区四区小说 | 中文字幕一区二区三区精华液| 日韩国产在线观看一区| 色一情一乱一乱一91av| 国产精品三级av| 国产成人在线视频网址| 亚洲人成7777| 国产乱国产乱300精品| 91精品国产综合久久久久久久久久 | 亚洲国产va精品久久久不卡综合| 国产黑丝在线一区二区三区| 欧美成人bangbros| 青青草精品视频| 欧美伦理视频网站| 亚洲成人7777| 欧美日韩一区高清| 亚洲福利一二三区| 欧美日韩免费电影| 偷拍日韩校园综合在线| 欧美三级电影网站| 亚洲成年人网站在线观看| 日本韩国一区二区三区视频| 亚洲精品免费一二三区| 欧洲亚洲国产日韩| 亚洲aaa精品| 制服丝袜日韩国产| 蜜乳av一区二区三区| 日韩写真欧美这视频| 久久疯狂做爰流白浆xx| 精品国产一区二区三区久久久蜜月| 久久精工是国产品牌吗| 精品国产乱码91久久久久久网站| 国产在线精品一区二区三区不卡| 精品国产乱码久久久久久浪潮| 激情综合网av| 欧美激情在线观看视频免费| 成人av手机在线观看| 亚洲欧美激情小说另类| 在线观看不卡一区| 久久精品国产一区二区三区免费看| 精品欧美久久久| 99视频精品免费视频| 亚洲伦理在线精品| 欧美一区二区免费视频| 国产成人免费网站| 一区二区三区**美女毛片| 欧美日韩精品专区| 国产福利不卡视频| 亚洲午夜影视影院在线观看| 日韩视频在线一区二区| 不卡视频一二三|