surface

How do I create a surface plot with matplotlib of a closed loop revolve about an axis given coordinate data of the 2D profile?

混江龙づ霸主 提交于 2019-12-11 16:23:03
问题 I have the closed loop stored as a two column by N row numpy array. The last row of the array is the same as the first row, implying that it is, indeed, a closed loop. The number of angular divisions in the rotation (as in, "slices of pie" so to speak) ought be set by a variable called 'angsteps' The profile in question is plotted in the x-y coordinate plane, and is rotated about the 'x-axis'. You can find the profile in question plotted here. https://i.imgur.com/yJoKIEp.png I apologize for

Generate OPEN surface mesh from a set of 3D points

狂风中的少年 提交于 2019-12-11 13:47:26
问题 I have a set of points on an OPEN surface in 3D space. I have identified a subset of points which lay on the boundary. I mean to generate a triangulation of those points, which gives me an open surface and keeps my selected points on the boundary. All references I found deal with (sometimes?) closed surfaces, e.g., CGAL. See examples below. In addition, some CGAL algorithms require oriented normals at each point, which I do not have. Is there an available algorithm and code for this? (either

Does Surface Pro 3 run Visual studio , sql server , xampp and other development apps?

隐身守侯 提交于 2019-12-11 12:39:07
问题 I want to know if Surface Pro 3 i7 - i5 could run any of the following applications such as : visual studio SQL server management-studio xampp Dreamweaver and so on .. 回答1: Surface Pro 3 with the i5 or i7 processor runs Windows 8.1 and can run these applications, just like a regular laptop or desktop. This should not be confused with the older Surface RT. I run SQL Server and Visual Studio on my Surface Pro 3 but can't speak from first-hand experience about xampp and Dreamweaver. I would

Dedicated drawing surface in Java?

时光总嘲笑我的痴心妄想 提交于 2019-12-11 10:19:52
问题 I want to do efficient 2D drawing in Java. I would like to have some kind of surface which I may draw freely without having to let the view hierarchy traverse and update, which may cause stutter. I have used a JPanel at first and called repaint() but I find it not to be optimal (and it is the reason I ask). The closest thing I have worked with is the Android's SurfaceView and it gives me a dedicated drawing surface. To achieve this dedicated drawing surface, do I need to use OpenGL or is

Generating a Cylindrical Surface with np.outer

↘锁芯ラ 提交于 2019-12-11 08:11:13
问题 I was able to previously generate and plot a spherical surface using np.outer: u = np.linspace(0, 2*np.pi, 100) v = np.linspace(0, np.pi, 100) x = R * np.outer(np.cos(u), np.sin(v)) y = R * np.outer(np.sin(u), np.sin(v)) z = R * np.outer(np.ones(np.size(u)), np.cos(v)) where x, y, z are of dim 100 x 100. See figure for result and ignore "particle traces" I understand the math and direction cosines of a sphere as well as cylinder so I think the confusion comes from not understanding what

How to write contents of a Cairo Image surface into a Gdk Pixbuf?

泪湿孤枕 提交于 2019-12-11 07:29:03
问题 I have a canvas(Gdk Drawing Area), which I can draw into it using Cairo, but I need to save contents of my canvas into a buffer which in my case is a Gdk Pixbuf. I want to know if it's possible or not, if there is a better way I would like to know. thanks. 回答1: We do this in f-spot using a simple copy routine. Not the most elegant solution, but it works: http://git.gnome.org/browse/f-spot/tree/lib/libfspot/f-pixbuf-utils.c#n170 来源: https://stackoverflow.com/questions/4291994/how-to-write

Convert rectangle to surface in pygame

白昼怎懂夜的黑 提交于 2019-12-11 06:20:51
问题 In my code it keeps giving me the error: pygame.surface.Surface.blit(a, (x1, y1)) TypeError: descriptor 'blit' requires a 'pygame.Surface' object but received a 'pygame.Rect'. Help! This is my code: import pygame import time pygame.init() screen = pygame.display.set_mode() display_width = 1366 display_height = 768 white = (255,255,255) red = (255,0,0) green = (0,255,0) gameDisplay = pygame.display.set_mode((display_width,display_height)) clock = pygame.time.Clock() global x1 global y1 global

Flatten curved surface

痴心易碎 提交于 2019-12-11 05:17:43
问题 I am trying to compute a panoramic projection for dental imaging purpose. I have a rectangle surface "curved" in one direction by a piecewise function. If we look at it from the top, it looks like a regular piecewise function. The "piecewise linear function" is just defined by a set of 3D points. All the points are in the same plane. The plane where all the 3D points sit is orthogonal to the curved surface (see the green line in the top-left window) I am looking for the proper way to "flatten

3D visualization of some data in MATLAB

这一生的挚爱 提交于 2019-12-11 04:33:46
问题 This is my data matrix in MATLAB: a = [43.676289 -79.477386 1 43.676370 -79.477107 5 43.676517 -79.477375 20 43.676417 -79.477509 8 43.676129 -79.477278 15]; The first column is Y axis, the second column is X axis and the third column is my data. How can I draw a bar graph, and adjust the color of the bars according to the value of data (like colorbar in a surface plot) for each data point in MATLAB? I added an example graph which I drew for another data matrix. In this example X, Y, and Z

How to fit a cylinder to scattered 3D XYZ point data in MATLAB?

北城以北 提交于 2019-12-11 00:28:13
问题 I was wondering if it was possible for someone to provide me with some code examples for working with scattered XYZ point data in MATLAB Curve Fitting Toolbox? I would like to fit a surface to points that approximate a cylinder. Thanks. 回答1: In Matlab R2015b and above, You can use pcfitcylinder to fit a cylinder to a pointCloud object. Let's start with producing an example data to see how it works: [theta, r, h] = meshgrid(0:.1:6.28, 1, 0:.2:4); % making a cylinder r = r + 0.05 * randn(size(r