Questions tagged [surface]

A surface is a two-dimensional shape in a three-dimensional space.

A surface is a concept in geometry which roughly means a two-dimensional shape in a three-dimensional space.

For the Microsoft Surface tablets, see . For the Microsoft Pixelsense technology formerly known as Surface, see .

1044 questions
146
votes
9 answers

surface plots in matplotlib

I have a list of 3-tuples representing a set of points in 3D space. I want to plot a surface that covers all these points. The plot_surface function in the mplot3d package requires as arguments X,Y and Z to be 2d arrays. Is plot_surface the right…
Graddy
  • 2,828
  • 5
  • 19
  • 25
30
votes
2 answers

Surface and 3d contour in matplotlib

I would like to plot a surface with a colormap, wireframe and contours using matplotlib. Something like this: Notice that I am not asking about the contours that lie in the plane parallel to xy but the ones that are 3D and white in the image. If I…
nicoguaro
  • 3,629
  • 1
  • 32
  • 57
27
votes
2 answers

Plotting points on the surface of a sphere

I'm trying to generate a plot of a sphere, with some points plotted on the surface of the sphere. (Specifically the points are the Lebedev quadrature points) I want my plot to look similar to this one that I found online: I proceed by plotting a…
O Smith
  • 375
  • 1
  • 3
  • 11
24
votes
4 answers

How can I crop an image with Pygame?

I am learning pygame and want a graphic for a button with the three states: normal, hover, and pressed. I have an image like this one ... ... and I want to get a new Surface using a portion of it. I'm loading the image with this code: buttonStates…
dobleseis
  • 629
  • 2
  • 7
  • 12
23
votes
4 answers

Display the maximum surface in matplotlib?

I'm plotting multiple surfaces on the same figure using matplotlib, and I'd like to see only the topmost surface, as matlab shows. Matlab 3D view: Matlab top view: Matplotlib 3D view: Matplotlib top view: How can I get Matplotlib to show a…
Nick Sweet
  • 2,030
  • 3
  • 31
  • 48
23
votes
1 answer

Finding curvature from a noisy set of data points using 2d/3dsplines? (C++)

I am trying to extract the curvature of a pulse along its profile (see the picture below). The pulse is calculated on a grid of length and height: 150 x 100 cells by using Finite Differences, implemented in C++. I extracted all the points with the…
JannaJ
  • 251
  • 2
  • 6
22
votes
3 answers

Plotting 3-tuple data points in a surface / contour plot using matplotlib

I have some surface data that is generated by an external program as XYZ values. I want to create the following graphs, using matplotlib: Surface plot Contour plot Contour plot overlayed with a surface plot I have looked at several examples for…
morpheous
  • 16,270
  • 32
  • 89
  • 120
18
votes
4 answers

R + plotly: solid of revolution

I have a function r(x) that I want to rotate around the x axis to get a solid of revolution that I want to add to an existing plot_ly plot using add_surface (colored by x). Here is an example: library(dplyr) library(plotly) # radius depends on x r…
mschilli
  • 1,884
  • 1
  • 26
  • 56
15
votes
7 answers

Algorithm for simplifying 3d surface?

I have a set of 3d points that approximate a surface. Each point, however, are subject to some error. Furthermore, the set of points contain a lot more points than is actually needed to represent the underlying surface. What I am looking for is an…
David Nordvall
  • 12,404
  • 6
  • 32
  • 52
14
votes
6 answers

Mesh to mesh intersections

I'm looking for a library or a paper that describes how to determine if one triangular mesh intersects another. Interestingly I am coming up empty. If there is some way to do it in CGAL, it is eluding me. It seems like it clearly should be possible,…
Doug McClean
  • 14,265
  • 6
  • 48
  • 70
13
votes
1 answer

Rendering MATLAB patch faces with Plotly fig2plotly()

Problem: When attempting to export a polygon rendered with the patch command in MATLAB with fig2plotly, the final output is lacking the specified face colours. Perhaps a demonstration would help. Take the following vertices and faces to define a…
Ivan A
  • 303
  • 1
  • 9
12
votes
1 answer

Mixing surface and scatterplot in a single 3D plot

I am studying the patterns of distribution of whales around specific seabed structures. I am trying to create an interactive 3D plot showing at the same time: bathymetry as a surface (x = longitude, y = latitude, z = depth), and geographic…
S.Derville
  • 208
  • 1
  • 2
  • 6
11
votes
3 answers

Pygame. How do I resize a surface and keep all objects within proportionate to the new window size?

If I set a pygame window to resizable and then click and drag on the border of the window the window will get larger but nothing blit onto the surface will get larger with it. (Which is understandable) How would I make it so that when I resize a…
RatstabOfficial
  • 479
  • 2
  • 8
  • 14
10
votes
1 answer

MediaRecorder and VideoSource.SURFACE, stop failed: -1007 (a serious Android bug)

I'm trying to record MediaRecorder without using Camera instance but using Surface video source (yes it's possible, but it turned out that it's not that perfect) - mediaRecorder.setVideoSource(MediaRecorder.VideoSource.SURFACE); I just write what…
user25
  • 2,873
  • 2
  • 30
  • 66
10
votes
1 answer

Area covered by a point cloud with R

I have a cloud of points scattered in a 2D Euclidean space. I would like to calculate the area inside the polygon linking the most extreme (=peripheral) points of the cloud. In other words, I would like to estimate the area covered by the cloud in…
Julien R
  • 101
  • 1
  • 3
1
2 3
69 70