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

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

?? graphics.txt

?? 書名: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一区二区三区免费野_久草精品视频
欧美大白屁股肥臀xxxxxx| 91国偷自产一区二区三区观看 | 日韩一区二区三区电影在线观看 | 欧美三级视频在线| 91麻豆精品国产自产在线| 欧美性极品少妇| 欧美性受xxxx| 91精品免费观看| 日韩精品一区二区在线| 久久久亚洲高清| 国产亚洲视频系列| 国产精品二区一区二区aⅴ污介绍| 国产精品久久久久久久久久久免费看 | 色综合久久中文综合久久牛| 91在线视频18| 91精品婷婷国产综合久久竹菊| 91精品国产综合久久久蜜臀粉嫩| 91精品国产综合久久香蕉的特点 | 成人高清伦理免费影院在线观看| 国产成人精品亚洲777人妖| 91蜜桃传媒精品久久久一区二区| 欧美三级三级三级| 精品女同一区二区| 亚洲视频网在线直播| 亚洲 欧美综合在线网络| 蜜臀av性久久久久蜜臀aⅴ流畅 | 精品理论电影在线观看| 欧美韩日一区二区三区| 亚洲午夜激情av| 国产美女av一区二区三区| 91美女蜜桃在线| 日韩一级黄色片| 亚洲视频免费观看| 精品一区精品二区高清| 91美女在线观看| 久久久精品综合| 亚洲bt欧美bt精品| 成人网在线播放| 91麻豆精品国产91久久久久久| 欧美激情在线观看视频免费| 亚洲愉拍自拍另类高清精品| 国内精品国产成人国产三级粉色| 色综合欧美在线| 久久久av毛片精品| 婷婷激情综合网| 99久久伊人精品| 久久综合网色—综合色88| 亚洲国产另类av| 97精品国产97久久久久久久久久久久 | 欧美成人一区二区三区在线观看 | 麻豆91精品91久久久的内涵| 99精品视频在线观看免费| 日韩欧美电影在线| 亚洲亚洲人成综合网络| av不卡免费在线观看| wwwwww.欧美系列| 欧美aaaaa成人免费观看视频| gogo大胆日本视频一区| 国产亚洲精品aa| 国产又黄又大久久| 日韩美女在线视频| 五月天欧美精品| 欧美视频日韩视频| 亚洲色图.com| 91麻豆文化传媒在线观看| 久久精品一区二区三区四区| 国产麻豆视频精品| 久久综合精品国产一区二区三区| 人人超碰91尤物精品国产| 欧美日本在线视频| 日韩一区精品字幕| 日韩一级完整毛片| 久久精品国产久精国产| 91精品国产一区二区三区| 日韩精品欧美精品| 在线播放一区二区三区| 日韩影院免费视频| 337p亚洲精品色噜噜噜| 日精品一区二区| 日韩欧美一区二区免费| 久久不见久久见免费视频1| 日韩美女视频在线| 国产高清久久久| 中文字幕一区免费在线观看| 91在线一区二区三区| 亚洲综合丁香婷婷六月香| 欧美日韩国产综合一区二区| 日韩国产在线观看一区| 欧美一区二区三区免费观看视频| 日韩国产精品久久久久久亚洲| 日韩免费观看2025年上映的电影| 久久国产三级精品| 国产午夜精品美女毛片视频| 成人小视频在线观看| 亚洲精品高清视频在线观看| 欧美性高清videossexo| 毛片av中文字幕一区二区| 久久久久久黄色| 色综合天天综合网天天狠天天| 亚洲成人av资源| 精品黑人一区二区三区久久| 成a人片国产精品| 亚洲成人你懂的| 国产偷国产偷精品高清尤物 | 日本sm残虐另类| 久久久不卡网国产精品一区| 色香色香欲天天天影视综合网 | 欧美激情艳妇裸体舞| 欧洲av在线精品| 国产一区啦啦啦在线观看| 成人欧美一区二区三区视频网页 | 国产日韩精品一区二区三区在线| 91影视在线播放| 美腿丝袜亚洲三区| 亚洲综合男人的天堂| 久久免费美女视频| 欧美少妇bbb| 粉嫩av一区二区三区在线播放 | 国产成人午夜精品影院观看视频| 亚洲最新在线观看| 亚洲国产精品成人综合| 91麻豆精品久久久久蜜臀| 97se亚洲国产综合自在线不卡| 免费成人av资源网| 亚洲综合精品自拍| 亚洲欧洲精品一区二区三区| 精品91自产拍在线观看一区| 欧美色综合天天久久综合精品| 丁香婷婷综合激情五月色| 久久成人麻豆午夜电影| 五月激情综合网| 亚洲蜜臀av乱码久久精品| 久久久电影一区二区三区| 日韩三级av在线播放| 色综合久久久网| 不卡av免费在线观看| 国产高清视频一区| 国产精品91一区二区| 久久精品国产秦先生| 91精品国产乱码久久蜜臀| 欧美精品久久99| av激情综合网| 高清shemale亚洲人妖| 国产乱色国产精品免费视频| 日韩和欧美的一区| 日韩av中文字幕一区二区三区| 一区二区三区四区高清精品免费观看 | 欧美区一区二区三区| av亚洲精华国产精华精| 国产成人超碰人人澡人人澡| 国产精品一区二区久激情瑜伽 | 日韩美女视频在线| 欧美电影免费观看高清完整版在线观看 | 国产美女在线精品| 国产精品一品视频| 成人深夜福利app| 91蜜桃视频在线| 欧美视频中文字幕| 51精品视频一区二区三区| 欧美一区二区三区婷婷月色| 国产欧美一区二区三区在线看蜜臀| 精品日产卡一卡二卡麻豆| 日韩三级视频中文字幕| 久久一区二区三区四区| 国产精品免费视频一区| 中文字幕亚洲一区二区av在线| 亚洲天堂av一区| 亚洲v中文字幕| 韩国av一区二区三区四区 | 99视频一区二区| 在线精品国精品国产尤物884a| 欧美日韩国产影片| 国产婷婷一区二区| 亚洲欧洲99久久| 天堂久久久久va久久久久| 九一九一国产精品| av亚洲精华国产精华精华| 欧美日韩激情在线| 欧美国产日韩在线观看| 亚洲精品乱码久久久久久久久| 午夜av区久久| 国产精品中文字幕欧美| 色素色在线综合| 久久久久久综合| 久久久久国产成人精品亚洲午夜| 欧美一区二区三区日韩视频| 26uuu亚洲综合色欧美| 中文字幕精品三区| 五月婷婷色综合| 国产·精品毛片| 欧美一级淫片007| 国产精品久久毛片| 美腿丝袜亚洲色图| 色视频成人在线观看免| 久久久久久影视| 日韩av中文字幕一区二区三区| 99精品一区二区三区| 精品久久人人做人人爰| 亚洲不卡在线观看| 99久久精品国产精品久久|