geometry-surface

matplotlib - 3d surface from a rectangular array of heights

有些话、适合烂在心里 提交于 2019-11-28 08:26:15
I am trying to plot some HDF data in matplotlib. After importing them using h5py, the data is stored in a form of array, like this: array([[151, 176, 178], [121, 137, 130], [120, 125, 126]) In this case, x and y values are just the indexes of the array's fields, while z value is the value of specific field. In the (x,y,z) form it would look like: (1,1,151) (2,1,176) (3,1,178) (1,2,121) ... and so on. Is there an easy way to do a surface plot from this kind of data? I know I can change this to (x,y,z) tuples by iterating all over the array, but maybe it is not needed? If you want a 3-d surface

Doing readback from Direct3D textures and surfaces

依然范特西╮ 提交于 2019-11-28 06:56:48
I need to figure out how to get the data from D3D textures and surfaces back to system memory. What's the fastest way to do such things and how? Also if I only need one subrect, how can one read back only that portion without having to read back the entire thing to system memory? In short I'm looking for concise descriptions of how to copy the following to system memory : a texture a subset of a texture a surface a subset of a surface a D3DUSAGE_RENDERTARGET texture a subset of a D3DUSAGE_RENDERTARGET texture This is Direct3D 9, but answers about newer versions of D3D would be appreciated too.

Gnuplot, pm3d and surfaces

ぐ巨炮叔叔 提交于 2019-11-27 15:52:42
I have a question about pm3d and gnuplot. I want to plot two different surfaces with two different pm3d styles. How can i do that? Is it possible? I tried with multiplot but in that case surfaces will overlap and i cannot rotate the graph. Any help will be appreciated, thank you! Here is an example with pseudo data: reset set xrange[0:1] set yrange[0:1] set cbrange[0:1] set palette defined (0 'green', 1 'red', 1 'blue', 2 'white') set isosamples 100 set samples 100 set pm3d depthorder set view 60,335 splot '++' using 1:2:2:(0.5*$2) with pm3d title 'red -> green',\ '++' using 1:2:1:(0.5*(1+$1))

Python 3D polynomial surface fit, order dependent

拈花ヽ惹草 提交于 2019-11-27 11:30:18
I am currently working with astronomical data among which I have comet images. I would like to remove the background sky gradient in these images due to the time of capture (twilight). The first program I developed to do so took user selected points from Matplotlib's "ginput" (x,y) pulled the data for each coordinate (z) and then gridded the data in a new array with SciPy's "griddata." Since the background is assumed to vary only slightly, I would like to fit a 3d low order polynomial to this set of (x,y,z) points. However, the "griddata" does not allow for an input order: griddata(points

matplotlib - 3d surface from a rectangular array of heights

最后都变了- 提交于 2019-11-27 02:12:24
问题 I am trying to plot some HDF data in matplotlib. After importing them using h5py, the data is stored in a form of array, like this: array([[151, 176, 178], [121, 137, 130], [120, 125, 126]) In this case, x and y values are just the indexes of the array's fields, while z value is the value of specific field. In the (x,y,z) form it would look like: (1,1,151) (2,1,176) (3,1,178) (1,2,121) ... and so on. Is there an easy way to do a surface plot from this kind of data? I know I can change this to

Simplest way to plot 3d surface given 3d points

最后都变了- 提交于 2019-11-26 22:12:29
I have a lot (289) of 3d points with xyz coordinates which looks like: With plotting simply 3d space with points is OK, but I have trouble with surface There are some points: for i in range(30): output.write(str(X[i])+' '+str(Y[i])+' '+str(Z[i])+'\n') -0.807237702464 0.904373229492 111.428744443 -0.802470821517 0.832159465335 98.572957317 -0.801052795982 0.744231916692 86.485869328 -0.802505546206 0.642324228721 75.279804677 -0.804158144115 0.52882485495 65.112895758 -0.806418040943 0.405733109371 56.1627277595 -0.808515314192 0.275100227689 48.508994388 -0.809879521648 0.139140394575 42

Gnuplot, pm3d and surfaces

两盒软妹~` 提交于 2019-11-26 17:07:39
问题 I have a question about pm3d and gnuplot. I want to plot two different surfaces with two different pm3d styles. How can i do that? Is it possible? I tried with multiplot but in that case surfaces will overlap and i cannot rotate the graph. Any help will be appreciated, thank you! 回答1: Here is an example with pseudo data: reset set xrange[0:1] set yrange[0:1] set cbrange[0:1] set palette defined (0 'green', 1 'red', 1 'blue', 2 'white') set isosamples 100 set samples 100 set pm3d depthorder

Simplest way to plot 3d surface given 3d points

寵の児 提交于 2019-11-26 08:13:53
问题 I have a lot (289) of 3d points with xyz coordinates which looks like: With plotting simply 3d space with points is OK, but I have trouble with surface There are some points: for i in range(30): output.write(str(X[i])+\' \'+str(Y[i])+\' \'+str(Z[i])+\'\\n\') -0.807237702464 0.904373229492 111.428744443 -0.802470821517 0.832159465335 98.572957317 -0.801052795982 0.744231916692 86.485869328 -0.802505546206 0.642324228721 75.279804677 -0.804158144115 0.52882485495 65.112895758 -0.806418040943 0