




已阅读5页,还剩14页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
外文原文AJava-basedsystemforbuildinganimatedpresentationsovertheWebAbstractWedescribeLeonardoWeb,acollectionoftoolsforbuildinganimatedpresentationsthatcanbeusefulforteaching,disseminating,ande-learning.PresentationscanbecreatedviathecombineduseofavisualeditorandaJavalibrary.ThelibraryallowsittogenerateanimationsinabatchfashiondirectlyfromJavacodeaccordingtoanimperativespecificationstyle.Batch-generatedanimationscanthenberefinedandcustomizedusingtheeditor.PresentationscanbefinallyviewedwithasimpleJavaplayer,whichshipsbothasastand-aloneapplicationforoff-linedeploymentandasaJavaappletembeddedinaWebpage.Theplayersupportsstep-by-stepandcontinuousexecution,reversibility,speedselection,andsmoothanimation.1.IntroductionInteractiveanimationsareavaluabletoolforteachingandlearning:theycanbeusedbyalgorithmresearcherswhowanttoshareanddisseminatetheirideas,bylecturerstolivenuplectures,todemonstratethebehaviorofcomplexsystems,ortoportraythedynamicaspectsofsometopicofinterest,andbystudentsforindividualexperiments,soastodeepentheknowledgeacquiredinthelectures.Realizingillustrativecomputer-basedlearningmaterialisusuallyveryexpensive5,9,andthetaskisevenmorecumbersomeifonewantsanimationstobeportableacrossdifferentplatforms.Instructorswhowishtoprepareanimatedpresentationsaretypicallyrequiredtousesomecommercialgeneralpurposetool,oreventowriteadhoccomputerprograms:thismightbedifficultandtime-consuming.Forinstance,usingtoolssuchasMicrosoftPowerPointorOpenOfficeImpress,whichprovideaflexiblesupportforcreatinganimatedslides,maybehardifcomplexanimationsaretobeproduced.Ontheotherhand,specializedtools,suchasMacromediaFlash,canbeusedtocreatehighlycustomizedanimations,butmayhaveasteeplearningcurve.CreatinganimatedGIFsofMPEGmoviesmightbeevenharderandlimitstheuserinteractionpossibilities.Inthiscontext,exploitingWeb-basedtechnologiesforeducationseemstobeaquitenaturalsolution4,11,18,22.However,asdetailedinSection2,thequestforsimple,light,andeasy-to-usetoolsforbuildinggeneral-purposeanimatedpresentationsovertheWebstilldemandsforfurtherefforts.InthispaperwedescribeLeonardoWeb,acollectionofWeb-basedtoolsforcreatinganimationsthatcanbeusefulforteaching,disseminating,ande-learning.AnimatedpresentationscanbecreatedwithaspecializedvisualeditorandviewedwithasimpleJavaplayer,whichisavailablebothasastand-aloneapplicationforoff-linedeploymentandasaJavaapplet.Theplayersupportsstep-by-stepandcontinuousexecutionofanimations,whichcanberunbothforwardandbackwardatdifferentspeeds.Tosupportvisualizationofalgorithmicconcepts,LeonardoWebalsoprovidesalibrarythatcanbeusedtogenerateanimationsdirectlyfromJavaalgorithmimplementationsaccordingtoanimperativestyle,i.e.,byinsertingcallstographicalroutinesinthepointsofthecodewheretheeventsofinteresttakeplace.PresentationscreatedwithLeonardoWeb,whichincludetext,2Dgraphics,andbitmappedimageswithsmoothanimationeffects,shipasplaintextfileswritteninasimplescriptinglanguage.Animationscriptsaresmallandcompact,andcanspecifyhighlycomplexgraphicalscenes.Batch-generatedanimationscanbeeasilyrefinedandcustomizedusingtheeditor.LeonardoWebiswritteninJavaandismadeofthreemaincomponents:TheBuilder:avisualeditor,whichcanbeusedtobuildandeditanimatedpresentations;ThePlayer:aviewerforLeonardoWebpresentations,whichcanbeusedbothasaJavastand-aloneapplicationandovertheWebasaJavaapplet;TheLibrary:aJavalibrarythatsupportscreationofbatch-generatedanimationscriptsusingJavaprogramsasdrivers.AnimationscreatedinthiswaycanbefurtherrefinedusingtheBuilder.UptodateinformationabouttheLeonardoWebtoolscanbefoundattheWebsitehttp:/www.dis.uniroma1.it/leoweb3.Therestofthispaperisorganizedasfollows.InSection2wesurveythemostcommonapproachestocreatinganimationsovertheWebandrecentrelatedwork.InSection3wedescribethemaincomponentsofLeonardoWeb,presentingtheirmainfeaturesandtheoveralldesignofthesystem.TheinternalarchitectureofthePlayerandoftheBuilderisdiscussedinSection4.InSection5weaddressdifferentscenariosthatshowhowLeonardoWebcanbeusedtocreatepresentationsforeducationalanddisseminationpurposes.Section6givesconcludingremarksanddiscussesdirectionsforfuturework.2.RelatedworkDespitetheimpressiveriseofWebauthoringapplicationsinthelastfewyears,creatinganimatedpresentationsasasupportfore-learningandteachingovertheWebstillremainsachallengingtask.ThemostpopulartrendistowriteadhocJavaappletsthatdisplaythedesiredanimations(see,e.g.,1,15,23,29).Withthistechnique,highlycustomizedandinteractivepresentationscanbeobtained,butpreparingthemmaybealongandboringtask.Creatingpresentationsofcomputerscienceconceptshasmotivatedresearcherstothinkaboutwaystoautomate(oratleasttosimplify)theprocessofvisualizing,e.g.,howprogramsandalgorithmswork.Inparticular,afewWeb-basedsystemscanbefoundintheliterature.JEliot13automaticallyproducesvisualizationsofJavaprogramsbyparsingtheJavacodeandallowingtheusertochooseasubsetofvariablestovisualizeonthestageaccordingtobuilt-ingraphicalinterpretations.Itrelievestheuserfromwritinganyvisualizationcodeandisveryeasytouse,butislackingincustomizationpossibilitiesandabstraction.Thus,itismostlyusefultoillustratebasicprogrammingconcepts.JDSL2isaJavalibraryofdatastructuresthatfeaturesavisualizerforanimatingoperationsonabstractdatatypessuchasAVLtrees,heaps,andredblacktrees6.Itiswellsuitedforeducationalpurposes,asstudentsareallowedtowriteandtesttheirownclassesprovidedtheyimplementspecificJDSLJavainterfaces.Thevisualizationofsupporteddatatypes,however,isembeddedintothelibraryandcannotbechanged.VEGA14isaC+client/servervisualizationenvironmentespeciallytargetedtoportrayinggeometricalgorithms:whilethealgorithmisexecutedontheserver,theclientsrunsonanyJavaVirtualMachineandasmallbandwidthcommunicationinterfaceguaranteesgoodperformanceevenonslownetworks.Theend-usercanvisualizealgorithmson-lineorshowsavedrunsoff-line,andcancustomizethevisualizationbyspecifyingasuitablesetofviewattributes.WAVE8isanalgorithmvisualizationtoolbasedonapublication-drivenapproach:algorithmsrunonadevelopersremoteserverandtheirdatastructuresarepublishedonblackboardsheldbytheclients.Animationsarespecifiedbyattachingvisualizationhandlerstothedatastructurespublishedontheclientsblackboard:modificationstothesestructures,duetotheremotealgorithmexecution,triggertherunningofthecorrespondinghandlersontheclientsside.OtherWeb-basedalgorithmanimationtoolsarementionedin10,28.Inordertorealizeananimatedpresentation,allthosesystemshingeupontheexistenceofanunderlyingrunningprogramandaretiedtoaspecificprogramminglanguage.TheSambapackage25,anditsWeb-basedfollowupJSamba,representafirstefforttowardsalanguage-independentsolutiontoalgorithmanimation.Sambaprovidesaninterpretedfront-endtotheTangosystem26andusesascripting-basedapproach:itreadsanASCIIfile,onecommandperline,inordertoacquiredirectionsforcreatingananimation.Thus,analgorithmcanbeeasilyvisualizedbyplacingprintstatementsintheunderlyingprogram,whichcanbeimplementedinanylanguage.Unfortunately,thisoftenrequiresonetotakeintoaccountverylow-leveldetailsaboutthevisualization,e.g.,explicitlyspecifyingthepositionofobjectsinthegraphicalscene:wrappingtheprintstatementsintocallstomethodsofamoreabstractlibrarywouldinsteadhidesomeofthesetediousdetails.Inmanycasesitwouldbequiteusefultobeabletoanimatehigh-levelconcepts,independentlyofaspecificalgorithm,suchasrotationsinbalancedbinarysearchtrees.Inthisscenario,startingfromanunderlyingprogrammaybedifficult,andavisualeditortoanimatetheseproofsofconceptswouldbeveryuseful.ArecentreleaseoftheJAWAAsystem20exploitstheuseofaneditortogenerateanimationtracesinascriptinglanguagesimilartothatofSamba.However,itdoesnotsupportintegrationoftheeditorcapabilitieswiththetraditionalprogram-drivenanimationapproach.Indeed,creatingapresentationmaybealongandboringtaskusingavisualeditoronly,whichinturnmaybeusefulforrefiningavisualizationskeletonbyaddingcommentsandexplanationsandbyorchestratingtheoverallgraphicallayout.TheANIMALsystem24wasdesignedtocombinevisualeditingwithbatchgeneration.Unfortunately,thesystem,whichprovidespowerfulfeaturesforcreatinglecturepresentations,seemstobeunavailableforWeb-baseddeployment.3.AnoverviewofLeonardoWebLeonardoWebisacollectionoftoolsforbuildingandviewinganimatedpresentations.ThesystemiswritteninJavaandusesbothstand-aloneandapplettechnologies,allowinguserstocreateandviewpresentationsoff-line,andthentoeasilypostthemovertheWebforremoteaccess.InthissectionwedescribethemainfeaturesoftheLeonardoWebtools,addressingthekeyaspectsofourapproach.3.1.TheBuilderPresentationsinLeonardoWebcanbeeasilycreatedusingtheBuilder,avisualeditorforbuildinganimations(seeFig.1forasnapshot).Thetoolallowstheusertowriteandmaintainasequenceofkeyframes(orscenes),whicharethebackboneofthepresentation.Eachframecancontaintextand2Dgraphicalobjectsdrawnfromavocabularyofelementarygeometricshapes,includingcircles,ellipses,lines,rectangles,andarbitrarypolygons.User-definedbitmappedimagescanalsobeaddedtothepresentation.TheusercaninteractwiththeBuildersGUIinordertoadd,resize,move,hide,anddeletegraphicalobjects.Thesequenceofkeyframesinthepresentationisshownasalistofnumberedthumbnails,whichprovideagraphicalstoryboardthathelpstheusercontrolthebigpictureofthepresentationandselectindividualframesforediting.WereferthereadertoFig.6forasnapshotoftheBuilder.Eachgraphicalobjectinaframeisassignedanidentificationlabelandasetofattributes,includingsize,position,color,andlayer,whichcanbeindividuallymodifiedusingtheobjectinspectortoolbar.Tosupportsmoothanimation,objectsbythesameidentificationlabelinconsecutivescenesarecompared,andattributechangesareinterpolatedtoformasequenceofintermediateframes.Thenumberofintermediateframesisanattributeoftheobjectitself,andcanbefullycontrolledbytheuser.Thismakesitpossibletoanimategraphicalobjectsinthesamesceneatdifferentspeeds.Duringediting,whenanattributeofanobjectismodifiedinascene,thesystemautomaticallypropagatesthatchangetotheotherframes:thecurrentstrategyistoextendthepropagationuptothefirstsuccessiveframeinwhichtheobjecthadadifferentvalueforthatattribute.Otherpossibilitiesmightalsobecontemplated,suchaspropagatingthechangeforagivennumberofframesoruptotheendofthepresentation,andweplantoaddtheminafuturereleaseoftheBuilder.TheBuildercansaveapresentationasaplaintextfilewritteninasimplescriptinglanguage,whichspecifiestheincrementalchangesthatleadfromakeyframetothesuccessiveone.Thebenefitsofusingscriptinglanguagesforgeneratingprogramvisualizationshavebeenpointedoutbyseveralauthors20,24,25.Inparticular,ourlanguagewasinspiredbythatofSamba25andJAWAA20.Theincrementalnatureofourscriptinglanguagemakespresentationscriptssmallandcompact,andthusamenabletoquickdownloadevenonslownetworkconnections.PresentationscreatedwiththeBuildercanbevisualizedwiththePlayer,aswewillseeinSection3.2,andcanbelaterreopenedwiththeBuilderitself,whichreconstructsthesequenceofkeyframes,foradditionalediting.Interestingly,theBuildercanalsoopenandmodifypresentationscreatedinsomeotherway(e.g.,directlywritingascriptorusingtheLibrary):thisallowstheuserstocreateandrefinepresentationsviathecombineduseofdifferenttools,usingthemostappropriateoneindifferentstagesoftheanimationspecificationprocess.TheBuilder,whichincludeson-linehelp,canbedownloadedfromtheLeonardoWebsite3.3.2.ThePlayerTheLeonardoWebPlayerhasbeendesignedasalightandeasy-to-usepresentationviewer.ItisabletointerprettextfilescreatedbytheBuilder,andcanbeusedbothasastand-aloneJavaapplicationandasanappletinsideaWebpage.ThegraphicuserinterfaceofthePlayer,showninFig.2,iscleanandsimple,resemblingtoastandardVCRcontroltool.Theusercanstart,stop,rewind,andplaythepresentationbothforwardandbackward.Playingissupportedeitherinastep-by-stepfashion,orcontinuously.Animatedtransitionsofgraphicalobjects,includingmovementsandcolorchanges,aresmoothlyrenderedbythesystembygeneratingsequencesofinterpolatinginterframes.Tosupporteffectiveon-linedeploymentevenonslownetworkconnections,thePlayerisfullymulti-threaded,allowingittostartplayingapresentationevenifithasnotbeencompletelydownloadedfromtheremotepeer.Furthermore,theappletversionofthePlayerisjustabout100KB,includingGUIgraphics.Thisimposesalightburdenontheappletstart-upphase,whichistypicallyverytime-critical.TheinterestedreadercanseethePlayerinactionanddownloaditsstand-aloneversionattheLeonardoWebsite3.3.3.TheLibraryWhiletheBuilderappearstobeflexibleenoughtosupportcommonuserneeds,sometimespresentationsincludecomplexanimationsthatportraysometechnicalaspectofatopicofinterest,whichmightbedifficulttospecifyvisually.Inthisscenario,itmightbeeasiertowriteaprogramwhoseexecutionproducesthedesiredanimationscript,ratherthanhavingtospecifyitdirectlyintheBuilder.Still,ascriptgeneratedinthiswaycanbelaterrefinedandcompletedusingtheBuilder.Tosupportthisscenario,whichwillbeaddressedinmoredepthinSection5,LeonardoWebprovidesaJavalibrary(JLeoScript)thatprovidesprimitivesforcreatingpresentationscripts.AvailableprimitivessupportedbytheclassJLeoScriptincludeaddinggraphicalobjectstothescene,deletingexistinggraphicalobjects,movingandresizingobjects,andchangingcolor.Asanexample,inFig.3weshowaJavaprogramthatusestheJLeoScriptlibrarytogenerateasimpleanimatedpresentation.Theproducedscriptsimulatesaballbouncinginaboxasshowninthesamefigure.Toachievethisgoal,theprogramfirstcreatesaJLeoScriptobject,specifyingthenameofthefiletobecreated,andthenaddstheball(newCircle)andthebox(newRectangle)tothescene.Thosegraphicalobjectsaredefinedbyspecifyingauniquename(e.g.,“ball”,“box”),thecoordinatesofthetopleftcorner,thedimension(radiusorwidthandheight),thecolorinRGBformat,andaflagtellingwhethertheobjecthastobecolor-filled.Theprogramthenentersasimulationloopthatletstheballbounceinsidethebox(moveAbsolute).Eachelementarymovementoftheballissmoothlyinterpolatedusingfourinterframes.4.ArchitectureofthesystemInthissectionwebrieflydescribetheinternalarchitectureofthePlayerandoftheBuilder.ThestructureofthePlayerisshowninFig.4.Twothreadscooperateinplayingananimationscript:alanguageparserandaninteractiveanimationmodule.AstheappletisloadedfromtheLeonardoWebsite,thelanguageparserestablishesaconnectiontotheremotesitethatcontainsthedesiredscript,whichisloadedandparsed.Intheoff-lineapplicationversionofthePlayer,thelanguageparserretrievesthescriptfromalocaldisk,ratherthanfromaWebsite.Thelanguageparserproducesanindexedsequenceofscenes,eachofwhichconsistsofalistofdatarecordsdescribingoperationsongraphicalobjects.Theinteractiveanimationmoduleisactivatedbytheuserthroughthebuttonsinthecontrolpalette.Thismoduleisabletointerprettheoperationsinthescenebufferaccordingtotheplaybackdirection,incrementallycreatinginterpolatinginterframesforsmoothanimationrendering.ThemainmodulesoftheBuilderareshowninFig.5.TheheartoftheBuilderistheeditingengine,whichhandlestheeventsgeneratedbytheuserwhileinteractingwithwindows,menus,andtoolbars.Theeditingengineisresponsibleformanipulatingobjectsinthecurrentscene,aswellasaddinganddeletingscenes.Anotherimportantmoduleisthescript/sceneconverter,whichisabletoconvertalistofscenesintoaLeoWebscript,andviceversa.5.LeonardoWebinactionInthissectionweshowhowLeonardoWebcanbeusedtoprepareapresentationandhowanimationscanbemadeavailableovertheWeb.5.1.PreparingapresentationWeconsiderdifferentusagescenarios,detailinghowthedifferentpartsofthesystemcanbeeffectivelyexploitedtoachievethedesiredresult.5.1.1.UsingtheBuilderVisualeditorsmaybeespeciallyusefulforpreparingsimpleanimationsthatillustratehigh-levelconcepts(e.g.,rotationsinbalancedbinarysearchtrees),aswellasforrefiningmoresophisticatedpresentationsobtainedfromprogramexecutiontraces.Indeed,asnotedbyBrownandHershberger,“eventhoughitmaybeeasytoanimateaprogram,itsnotSoeasytoproduceaneffectiveandinformativevisualization”5.Thisrequiresaddingcomments,labels,andalotoftextexplanationsthataretypicallyquiteboringtorealize.Anappealinggraphicallayoutshouldbeorchestrated;otheressentialgraphicalfeatures,suchastextcolorandsize,shouldbecustomized,andtheirmeaningexplained.Inthiscontext,webelievethatanintegrateduseoftheLibraryandtheBuildercanbeverybeneficial.Inthefollowing,webrieflydescribeausageexampleoftheBuilderrelatedtothefirstscenario.Letusassumethatwewanttoillustratetheideabehindbacktrackingbymeansofasimpletoyexample:amouseinalabyrinthisseekingforitscheese.Themousemovesalongapathinthelabyrinthuntileitheradead-endstreetorthecheeseisfound.Incaseofadead-endstreet,themousebacktrackstothenearestbranchingandtakesadifferentpath.AnanimationlikethiscanbeeasilypreparedusingtheBuilder.Thelabyrinthismadeupofverticalandhorizontallines,whichcanbeaddedbymeansoftheobjectinspectorwindow.Cheeseandmousecanberepresentedusingtwobitmappedimages.Whenasceneisready,wecancommititandthenobtainthesubsequentonebyincrementalmodification(i.e.,wejustneedtorepositionthemouse).Thegraphicalstoryboardallowsustoselectanyscene,modifyit,addanewsceneordeleteanexistingone.Forinstance,ifwedecidetochangethestructureofthelabyrinth,itsufficestomodifythestartingsceneandpropagatethechangetoallthesuccessiveones.AsnapshotoftheBuilderinuseisillustratedinFig.6andtheanimationisavailablefromtheLeonardoWebsite3.Similarly,theBuildercanbeusedinordertorefineanexistinganimation.Inthiscase,whenanexistingpresentationisopened,thekeyframesareparsedandappearinthegraphicalstoryboard.Anyscenecanthenbemodified,possiblypropagatingchangestoasubsetofthesubsequentscenes,andthenewanimationcanthenbesavedandplayedasusual.5.1.2.UsingtheLibraryCreatingapresentationmightbealongandboringtaskevenusingavisualeditor.Thisisespeciallytrueifthecontentiscomplexandtechnical.Forinstance,creatingapresentationtoexplainhowanalgorithmworksonsomeinputdataforaComputerScienceclassmightbehardandevenerror-proneduetothedifficultyofcapturingalltheaspectsofthealgorithmexecution.Aclassicalapproachinalgorithmanimation28consistsofusinganimplementationofthealgorithmtobevisualizedasadriver,andlettingitemitasequenceofeventswhichareturnedintographicalcommandsastheimplementationruns.Thisistypicallyachievedbyannotatingthealgorithmimplementationwithsuitablecallstolibraryroutines.ToexplainhowthisapproachcanbesupportedusingLeonardoWeb,letusconsideraconcreteexample.Supposethataninstructorhastoprepar
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 商品房订房协议书
- 办公设备与耗材再制造工合规化技术规程
- 公司洗衣机制造工岗位标准化技术规程
- 2026届河南省洛阳市实验中学数学九年级第一学期期末达标检测模拟试题含解析
- 2026届山西省(朔州地区)九年级数学第一学期期末调研模拟试题含解析
- 移动支付技术的发展与影响
- 水处理技术在超低水头发电项目中的应用策略分析
- 2026届山东省利津县七年级数学第一学期期末考试试题含解析
- 池州市重点中学2026届九年级数学第一学期期末联考试题含解析
- 2026届山东省济南市实验中学九年级数学第一学期期末学业质量监测模拟试题含解析
- 第六章-材料的热性能
- (完整版)抛丸机安全操作规程
- 高一前三章数学试卷
- 自助与成长:大学生心理健康教育
- 外科病人的心理护理讲课件
- 2025年新高考2卷(新课标Ⅱ卷)语文试卷
- 货款对抵协议书
- 2025至2030中国特殊教育市场现状调查及前景方向研究报告
- 《应用语文(第3版)》技工院校语文课程全套教学课件
- boo合同框架协议
- 各种气候条件下的植被分布规律分析
评论
0/150
提交评论