摘要: TheForbiddenCity,alsoknownasthePalaceMuseum,expandeditsclosuresfromMondayafternoonstotheentireday,amovethemuseumsaidwillbetterpreserveitsrelicsandallowenoughtimeeachweektomaintainthem."Wewanttogivethearchitecturalandculturalrelicsabreak.Butit'snotabreakforthemuseumstaff.Infact,thereisatonof 阅读全文
posted @ 2014-01-08 01:06 丿聪丶 阅读(238) 评论(0) 推荐(0)
摘要: Wheelchair-boundYiXiaoyuanhasneverlethisphysicalconditionholdhimback.NowastudentatBeijing'sTsinghuaUniversity,hetellsNickComptonthathismisfortuneshavemadehimstronger.Whenhetalksabouthisdisability,YiXiaoyuanhasaseriouslookonhisface.Hisvoicedoesn'thalterandhisgazedoesn'twander.Hehasbeenina 阅读全文
posted @ 2013-12-04 11:07 丿聪丶 阅读(300) 评论(0) 推荐(0)
摘要: 1、lighting通过按键设置_SkyLight和_PointLight_SkyLight的direction是一个_Vector3,从原点指向的。_PointLight可以设置属性mat,作为变换矩阵,可以从中取出位移分量_Vector然后赋值给position,这个position是点光源的位置,mat值可以渲染小球出现在点光源的位置。PS:所有颜色值是从 0xff000000~0xffffffff 1 _sys:addPath('res') 2 _dofile('cameracontrol.lua') 3 4 slNum = 0 5 plNum = 0 阅读全文
posted @ 2013-11-27 11:22 丿聪丶 阅读(476) 评论(0) 推荐(0)
摘要: 1、filefile1 = _File.new() 创建一个_Filefile1:create('filename.text') 如果创建成功返回truefile1:write('文本内容') 在文件中写file1:close() 关闭文件file1:open('file.txt') 打开文件text = file1:read() 返回文件中的内容 -- print(text) 如果在读之前,关闭了文件,那么结果为空 1 file1 = _File.new(); 2 result = false; 3 result = file1:create( 阅读全文
posted @ 2013-11-25 13:21 丿聪丶 阅读(737) 评论(0) 推荐(0)
摘要: CHANGCHUN-A5.3-magnitudeearthquakejoltedthecityofSongyuaninNortheastChina'sJilinprovinceonFridayat4:18p.m.BeijingTime,accordingtotheChinaEarthquakeNetworksCenter.Theepicenterwasofficiallydeterminedtobeat44.7degreesnorthlatitudeand124.1degreeseastlongitude,withadepthofeightkilometers,thecentersai 阅读全文
posted @ 2013-11-23 18:23 丿聪丶 阅读(203) 评论(0) 推荐(0)
摘要: 1、drawboard在三个画板内画三角形。db = _DrawBoard.new(w, h) 创建画板指定宽高指定画板的种类,db:drawImage(...) db:draw3DImage(...) db:drawBillBoard(...)最后在_rd:useDrawBoard(db, color) 和 _rd:resetDrawBoard() 之间画三角形_rd:drawTriangle(x1,y1,x2,y2,x3,y3,color)PS:貌似最后画三角形的时候,三角形的x,y都是相对于画板中的。 1 ---- DrawBoard Sample ---- 2 3 _dofile(.. 阅读全文
posted @ 2013-11-23 14:24 丿聪丶 阅读(436) 评论(1) 推荐(0)
摘要: 1、cameraControl摄像机模板MouseLeft实现摄像机的平移,MouseLeft+Alt实现摄像机的旋转。首先,引擎中的坐标系是左手坐标系。我在第一挂限的“空中”悬着一个点P。你站在O点看这个点P。首先,要从x轴正方向,沿逆时针旋转到点P的垂直投影线上,这就是方位角phi;然后再往高出寻找它,又得到了一个仰角,这就是倾斜角theta。_rd.camera:movePhi(弧度)和_rd.camera:moveTheta(弧度)就是移动这两个参数。摄像机可以看做是一个四棱锥,锥顶是eye,有一个近截面viewNear(eye到该截面的距离是_rd.camera.viewNear)和 阅读全文
posted @ 2013-11-22 15:24 丿聪丶 阅读(685) 评论(0) 推荐(0)
摘要: 1、blender-additive渲染一个茶壶的变色过程_Blender:颜色混合器,功能包括混色、高亮、加色和灰化等。additive(_Color.1, _Color2, time)在time时间内从颜色1变化到颜色2,返回_Blender_rd:useBlender(b1) teapot:drawMesh()_rd:popBlender()PS:前面有过_rd:useLight(a)和_rd.bgColor的过程,最后的效果会出现一个颜色混合的效果,不只是蓝色变到黄色。 1 _dofile('cameracontrol.lua') 2 teapot = _mf:crea 阅读全文
posted @ 2013-11-21 18:14 丿聪丶 阅读(481) 评论(0) 推荐(0)
摘要: 1、ambientlight_rd:uselight(light)将light压入渲染设备的光栈。渲染设备会使用光栈中的所有元素来渲染。每个useLight应该对应一个popLight。多次压入颜色会呈现混合后的颜色。例如:绿+红=黄 1 _dofile('cameracontrol.lua') 2 teapot = _mf:createTeapot() 3 _rd.camera.eye = _Vector3.new(30, 30, 30) 4 5 ambient = _AmbientLight.new() 6 ambient.color = _Color.Green 7 _r 阅读全文
posted @ 2013-11-21 15:44 丿聪丶 阅读(446) 评论(0) 推荐(0)
摘要: ABoeing737-500airlinercrashedonlandingintheRussiancityofKazanonSunday,killingall50onboardandhighlightingthepoorsafetyrecordofRussianairlinesthatplyinternalroutesacrosstheworld'slargestnation.TheTatarstanairlinesflightfromMoscowwastryingtoabortitslandinginordertomakeasecondapproach,butitexplodedo 阅读全文
posted @ 2013-11-19 16:45 丿聪丶 阅读(333) 评论(0) 推荐(0)