surface

MATLAB - 3D surface plot

吃可爱长大的小学妹 提交于 2020-01-11 11:49:25
问题 I have 20 data points in 3D space. Here you can see them plotted: clear all close all clc Data = [97.4993 104.3297 0.7500 196.7021 100.0000 105.0000 0.7500 290.9164 100.0000 107.5000 0.7500 142.1626 96.2569 106.4992 0.7500 143.3605 97.5028 104.3317 1.0000 197.1111 100.0000 105.0000 1.0000 290.4210 100.0000 107.5000 1.0000 144.0155 96.2530 106.4969 1.0000 144.0969 98.7055 104.8295 0.7500 239.7734 100.0000 106.2500 0.7500 214.6557 98.0627 107.2455 0.7500 145.4154 96.8781 105.4144 0.7500 161

SurfaceTexture/Surface mapping with ANativeWindow

Deadly 提交于 2020-01-07 04:57:05
问题 Given a GraphicBufferProducer I create a Surface and then retrieve ANativeWindow. Using ANativeWindow_lock I get a pointer to the buffer. Using the buffer, I do a memcpy into the buffer. The problem is that whatever I draw on this buffer is restricted to less than 25% of the screen. Keep in mind that the dimensions of buffer.width and buffer.height are very close to the resolution of the screen itself. My question is, why does the buffer only cover a small portion of the screen? And how do I

Is it possible to feed MediaCodec Bytearray received by Server, and show them on SurfaceView

三世轮回 提交于 2020-01-07 04:51:08
问题 everyone. How i can do this if i take frame by frame stream video by server, I have PPS and SPS, and configure mediaCodec with this parametrs, also I have width and height. I'll glad any help.This example how id did it. Mediacodec, decode byte packet from server and render it on surface 来源: https://stackoverflow.com/questions/30229871/is-it-possible-to-feed-mediacodec-bytearray-received-by-server-and-show-them-on

Could not read input channel file descriptors from parcel

萝らか妹 提交于 2020-01-06 16:59:59
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 目录 背景: 卡死/黑屏log信息,原因分析: 背景: 一个盘点扫描的APP,可以离线在线操作,运行平台为PDA,客户在使用过程中反馈经过多次扫描后会出现屏幕卡死/黑屏的情况,但是PDA系统可以正常使用,由此可见是我的APP导致的。客户一次盘点会盘点近千个物品,也就是说会扫描近千次,扫描过程中会有人声提示音播放。收到了客户的反馈后,拿了设备回来自己测,通过几回合的连续扫描后,复现出了这个问题,每回合都是扫到237次就出现黑屏或者报错。拿到了出现问题的log信息,但是一看logcat,很难确定原因,不是常规的代码崩溃。以下看下我拿到的logcat信息 卡死/黑屏log信息,原因分析: 08-25 18:18:58.028 17875-17875/com.pda.wph E/Surface: dequeueBuffer failed (Invalid argument) 08-25 18:18:58.038 17875-17875/com.pda.wph E/ViewRootImpl: Could not lock surface java.lang.IllegalArgumentException at android.view.Surface.nativeLockCanvas(Native Method) at

Using meshgrid to convert X,Y,Z triplet to three 2D arrays for surface plot in matplotlib

﹥>﹥吖頭↗ 提交于 2020-01-04 06:31:21
问题 I'm new to Python so please be patient. I appreciate any help! What I have: three 1D lists ( xr, yr, zr ), one containing x-values, the other two y- and z-values What I want to do: create a 3D contour plot in matplotlib I realized that I need to convert the three 1D lists into three 2D lists, by using the meshgrid function. Here's what I have so far: xr = np.asarray(xr) yr = np.asarray(yr) zr = np.asarray(zr) X, Y = np.meshgrid(xr,yr) znew = np.array([zr for x,y in zip(np.ravel(X), np.ravel(Y

Plot a 3d surface from a 'list of lists' using matplotlib

孤人 提交于 2020-01-01 12:08:10
问题 I've searched around for a bit, and whhile I can find many useful examples of meshgrid, none shhow clearly how I can get data from my list of lists into an acceptable form for any of the varied ways I've seen talked about. I'm a bit lost when it comes to numpy/matplotlib and the terminologies and sequences of steps that I have seen suggested. The closest I found was Plotting a 3d surface from a list of tuples in matplotlib I have a list of lists of height data. data=[[h1,h2,h3,h...], [h,h,h,h

How can I create a surface plot with missing values in R?

自闭症网瘾萝莉.ら 提交于 2019-12-31 01:58:06
问题 I have an example 5x5 matrix with the following values: dat <- matrix(seq(1,13,0.5), nrow=5, byrow=TRUE) dat[seq(2,25,2)] <- NA 1 | NA | 2 | NA | 3 NA | 4 | NA | 5 | NA 6 | NA | 7 | NA | 8 NA | 9 | NA | 10 | NA 11 | NA | 12 | NA | 13 I cannot for the life of me get a 3D surface plot using for example persp3d() because of the missing values. Isn't there a way that R can just interpolate the values and still plot them? 回答1: While this might have been asked before, I couldn't find a neat worked

MATLAB cftool surface plot matrix

南楼画角 提交于 2019-12-25 04:38:21
问题 I have a irregular set of data points in the form of cartesian coordinates which using the MATLAB cftool can be turned into a surface (see below). Does anyone know a way to access the matrix of cartesian coordinates that MATLAB generates in order for it to plot this surface? The code generated for this graph (seen below) provides no access to the any additional interpolated points which must be produced to fit the surface. %% Fit: 'untitled fit 1'. [xData, yData, zData] = prepareSurfaceData(

Can't get pygame.Surface.get_at() to work properly

馋奶兔 提交于 2019-12-25 03:58:14
问题 I am trying to retrieve the color I have drawn onto my display using pygame, but I can't seem to get it to work. I took out some irrelevant code for easier reading, but here is what I have. import pygame import sys from pygame.locals import * pygame.init() blue = (0,0,255) #sets up screen setDisplay = pygame.display.set_mode((400,400)) pygame.display.set_caption('Connections') pygame.draw.circle(setDisplay, blue, (20,20), 10, 10) while True: for event in pygame.event.get(): if event.type ==

Surface Normals

假如想象 提交于 2019-12-25 01:28:55
问题 I have a request about surface normals. At the following code snippet is from the URL : http://www.kindohm.com/technical/wpf3dtutorial.htm private Model3DGroup CreateTriangleModel(Point3D p0, Point3D p1, Point3D p2) { MeshGeometry3D mesh = new MeshGeometry3D(); mesh.Positions.Add(p0); mesh.Positions.Add(p1); mesh.Positions.Add(p2); mesh.TriangleIndices.Add(0); mesh.TriangleIndices.Add(1); mesh.TriangleIndices.Add(2); Vector3D normal = CalculateNormal(p0, p1, p2); // mesh.Normals.Add(normal);