平面计算机

表面应变计算(Surface strain calculation)

喜你入骨 提交于 2019-12-31 22:53:31
1. 背景介绍 应力-应变曲线能够有效地帮助我们分析材料的力学性能,应力指物体单位面积上所受到力的大小,应变指物体的相对变形量。正应变描述的是沿着某一方向上长度的变化量,而切应变描述的是角度的变化量。 根据力的大小可根据胡克定律理论上计算得到任意位置应变。对于现代的测量方式而言,主要有引伸计、应变片、光学测量等方式,光学测量因非接触、精度高的特点,在工业测量领域受到高度关注。 2 变形梯度张量 光学测量使用数字图像相关法(Digital Image Correlation, DIC)获得被测物体表面的变形情况,因此,计算的是表面应变(Surface Strain)。在连续介质力学中,描述物体运动的方式有两种,即Lagrange描述与Euler描述。前者以不同时刻下物体的位置为研究对象,而后者以固定空间内的变化为对象。本文中我们在Lagrange描述下进行分析。 上图中,参考位置 P Q ⃗ \vec{PQ} P Q ​ ,在 t t t 刻为 p q ⃗ \vec{pq} p q ​ ,P和Q的位移量分别为 u ( X ) u(\bf{X}) u ( X ) , u ( X + d X ) u({\bf{X}}+d\bf{X}) u ( X + d X ) ,该过程的运动描述为 x = χ ( X , t ) {\bf{x}}=\chi({\bf{X}},t) x = χ ( X

修正半透明头发的渲染异常

霸气de小男生 提交于 2019-12-25 03:30:25
修正半透明头发的渲染异常 这两天在整理 小甜甜 的捏脸系统,顺带把前项目 半透明头发渲染异常的bug 修正了,效果如下: 其实,前项目的头发工作良好,只是有一点 半透明渲染顺序 的小瑕疵,但正如前文 一个自阴影的Bug 所提到的:我在迁移shader的时候因为偷懒,把头发改成了 Surface Shader ,从而带来了一些新的问题。 问题一:关于Surface Shader的alpha指令 首先,我犯了第一个错误,改 Surface Shader 的过程中,我漏掉了 alpha 指令的设置,shader变成了 实体渲染 ,表现如下: 关于 Surface Shader的alpha指令 ,可以参考Unity帮助文档: alpha or alpha:auto - Will pick fade-transparency (same as alpha:fade) for simple lighting functions, and premultiplied transparency (same as alpha:premul) for physically based lighting functions. alpha:blend - Enable alpha blending. alpha:fade - Enable traditional fade-transparency.

廉价移动计算的尝试

徘徊边缘 提交于 2019-12-10 00:03:20
背景 本人想做题,又苦于不想去机房。最简单的自我解决方法,无非自带电脑。 手机 之所以廉价,是因为自己本来就要带回学校的,就完全没有附加的花费了。 至于性能,手机是足够的。自己在用小米 9,跑得还挺快的。但问题在于没有完整的 GNU/Linux,又没有很好的 IDE,更没有方便的文件管理,导致做题效率低下,水题都切不掉。 用 Clang 而放弃 GNU C++ 特性并非问题,自己也不用 bits/ 中的头文件。主要问题仍然在于操作效率低。我甚至不能在 SYZOJ 系统的 OJ 上提交。 PocketCHIP 这个现在只能在闲鱼上花 400 块左右买到了。它确实有完整的系统,但是性能低下。苦于难用的电阻式触摸屏,它的操作效率也很低,更不必提他的键盘了。 实际上,它的系统也不甚崭新。停留在 Debian Jessie,内核版本也相对旧了。作为一个西洋式的项目,最终的目的也就只能在“能做”,而不能“最好”了。他背后的公司也如此。 诺亚舟 NP1500 这是一个偶然在 cncalc 上发现的电子词典,闲鱼售价大约 100 元。它运行基于 Qt 的 GUI,有终端。作为一个不正式的参赛者,它的软件版本已经老掉牙了。G++ 版本只为 3.,尚未测试 C++11 标准支持情况。买来也仅仅为了好玩,倒问题不大的。 Surface RT 不知道,没买。 ThinkPad X6x 不知道,没买。应该比

SurfaceTexture,TextureView,GLsurfaceview的区别与联系详解

折月煮酒 提交于 2019-12-09 15:04:12
Android 中的SurfaceTexture,TextureView, GLsurfaceview的区别与联系详解 SurfaceView, GLSurfaceView, SurfaceTexture和TextureView是 Android 当中名字比较绕,关系又比较密切的几个类。本文基于Android 5.0(Lollipop)的代码理一下它们的基本原理,联系与区分。 SurfaceView从Android 1.0(API level 1)时就有 。它继承自类View,因此它本质上是一个View。但与普通View不同的是,它有自己的Surface。我们知道,一般的Activity包括的多个View会组成View hierachy的树形结构,只有最顶层的DecorView,也就是根结点视图,才是对WMS可见的。这个DecorView在WMS中有1个对应的WindowState。相应地,在SF中对应的Layer。而SurfaceView自带1个Surface,这个Surface在WMS中有自己对应的WindowState,在SF中也会有自己的Layer。以下图所示: public class TriangleActivity extends Activity { protected void onCreate(Bundle savedInstanceState) {

Understanding Canvas and Surface concepts

雨燕双飞 提交于 2019-12-07 15:05:00
Here are some definitions: A Surface is an object holding pixels that are being composited to the screen. Every window you see on the screen (a dialog, your full-screen activity, the status bar) has its own surface that it draws in to, and Surface Flinger renders these to the final display in their correct Z-order. A surface typically has more than one buffer (usually two) to do double-buffered rendering: the application can be drawing its next UI state while the surface flinger is compositing the screen using the last buffer, without needing to wait for the application to finish drawing. A

pickle saving pygame Surface (python)

匿名 (未验证) 提交于 2019-12-03 08:57:35
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I tried to save a pygame.Surface but it doesn't let me, error TypeError: can't pickle Surface objects I can make it save surfaces? Or maybe there is another module that can save it ? EXPLANATION: a = pygame.Surface( (5,5) ) file = open("hello", "w") pickle.dump(a, file) I have classes which saves in them Surfaces. 回答1: As monkey said: You don't want to pickle a surface. But if you really need to save that surfaces' content than use the pygame.image.save() function. If you prefer your surface not to be an actual image file (for whatever

How to convert a pygame Surface to a PIL Image?

匿名 (未验证) 提交于 2019-12-03 08:46:08
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm using PIL to transform a portion of the screen perspectively. The original image-data is a pygame Surface which needs to be converted to a PIL Image. Therefore I found the tostring-function of pygame which exists for that purpose. However the result looks pretty odd (see attached screenshot). What is going wrong with this code: rImage = pygame.Surface((1024,768)) #draw something to the Surface sprite = pygame.sprite.RenderPlain((playboard,)) sprite.draw(rImage) pil_string_image = pygame.image.tostring(rImage, "RGBA",False) pil_image =

Changing the surface coloring (using lattice::wireframe)

匿名 (未验证) 提交于 2019-12-03 08:46:08
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I am using lattice::wireframe to create a surface. I need to change the coloring so that it depends on the x or y variable (instead of on z). How should this be done? The documentation says that the color is automatically chosen to depend on the height (e.g. z). Thanks! Georgi 回答1: Use col.regions wireframe ( volcano , drape = TRUE , aspect = c ( 61 / 87 , 0.4 ), light . source = c ( 10 , 0 , 10 ), col . regions = colorRampPalette ( c ( "blue" , "pink" ))( 100 )) As per your coment and with inspiration from @DWin who I am sure will

Highlight a part of an extjs4 line chart

匿名 (未验证) 提交于 2019-12-03 08:46:08
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: In the extjs 4.1.1a code below is a working example of a line chart. Now I need to highlight a part of that chart on a given min and max timestamp. { 'xtype' : 'chart' , 'store' : 'ChartData' , 'height' : '100%' , 'width' : '100%' , 'legend' : { 'position' : top }, 'axes' : [{ 'title' : 'Power' , 'type' : 'Numeric' , 'position' : 'left' , 'fields' : [ 'power' ] },{ 'title' : 'Timestamp' , 'type' : 'Numeric' , 'position' : 'bottom' , 'fields' : [ 'timestamp' ], 'minorTickSteps' : 3 }], 'series' : [{ 'type' : 'line' , 'fill' : true ,

Is there any way to “clear” a surface?

匿名 (未验证) 提交于 2019-12-03 08:46:08
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Is there any way to clear a surface from anything that has been blitted to it? 回答1: I don't know what API you're using, so here's a vague answer: In virtually all cases "clearing" a surface simply blits a coloured quad of the same size as the surface onto it. The colour used is whatever you want your clear colour to be. If you know how do blit, just blit a white quad of the same size onto the surface. 回答2: You can't undo one graphic written over the top of another graphic any more than you can undo one chalk illustration drawn over the top