Questions tagged [geometry-surface]

The mathematical or computing concept of a 2-dimensional shape.

Surface is a place of a manifold of two-dimensional points (flat surface) or surface is a continuous boundary which divide a three-dimensional space into two sections (curved surface). In general, a hypersurface is a variety of (n-1)-dimension points in n-dimensional space.

249 questions
3
votes
1 answer

Fitting a surface to collection of 3D data points in java

Hi I have a cloud of XYZ data points. I want to estimate a surface which best fits these points, so that later on I can input an XY pair and get back the Z value where this XY pair lies on the surface. Is there an existing Java library that will…
ed Bevan
  • 73
  • 7
3
votes
2 answers

Do new pygame surfaces have to be .convert()ed?

When you create a new Pygame surface: pygame.Surface((width, height), flags=0, depth=0, masks=None) Do you have to call .convert() on it to change its pixel format, or is that already done for you when you create it?
Name McChange
  • 2,750
  • 5
  • 27
  • 46
3
votes
1 answer

Isosurface from X,Y,Z,V ordered data in Matlab/Octave

I have a set of 3d data points for each of which the value V of a certain quantity is associated. The data are organized in ordered columns X Y Z V, where the spatial coordinates are distributed on a grid. I have 21 points in every direction, so…
Francesco Turci
  • 817
  • 1
  • 9
  • 17
3
votes
1 answer

Pygame Surface Mechanics

I'm currently writing up some GUI code for a small project I'm working on and I've come to the point where I need to implement scroll bars and their associated containers. For ease of execution, I would love to be able to draw all elements within…
Antillies
  • 95
  • 1
  • 6
3
votes
1 answer

Rendering a toroidal helix

I'm teaching myself computer graphics using Computer Graphics Through OpenGL by Sumanta Guha. I seem to have hit a small blocker when it comes to one of the exercises. It asks the reader to "plump" a Toroidal Helix with n coils. By this, it means…
fwilliams
  • 47
  • 5
3
votes
2 answers

fitting a linear surface with numpy least squares

So I want to solve the equation z= a + b*y +c*x,. getting a,b,c. ie: making a (plane) surface fit to a load of scatter points in 3D space. But I can't seem to find anything! I thought there would be a simple module for such a simple problem. I…
plebplod
  • 33
  • 1
  • 3
3
votes
1 answer

Make 3d surface

I have data for x and y when z=z1, z=z2 and z=z3. I'd like to plot the data on a 3d graph and approximate the curves with a 3d surface and to know the equation of the surface. Will this be easier to implement on R or on Mathematica? For instance how…
jpcgandre
  • 1,487
  • 5
  • 31
  • 55
3
votes
1 answer

Rendering 3D surfaces

I've got data representing 3D surfaces (i.e. earthquake fault planes) in xyz point format. I'd like to create a 3D representation of these surfaces. I've had some success using rgl and akima, however it can't really handle geometry that may fold…
DWAHL
  • 156
  • 6
2
votes
1 answer

python pygame blit. Getting an image to display

I'm trying to get my webcam to show video through pygame. Here is the code: # import the relevant libraries import time import pygame import pygame.camera from pygame.locals import * # this is where one sets how long the script # sleeps for, between…
Avovk
  • 527
  • 1
  • 5
  • 15
2
votes
3 answers

MATLAB XYZ to Grid

I have a tab separated XYZ file which contains 3 columns, e.g. 586231.8 2525785.4 15.11 586215.1 2525785.8 14.6 586164.7 2525941 14.58 586199.4 2525857.8 15.22 …
MBL
  • 1,197
  • 2
  • 11
  • 17
2
votes
2 answers

matplotlib and PyQt plotting a surface

I created a 3D plot using matplotlib as this: fig = pylab.figure() ax = Axes3D( fig ) surf = ax.plot_surface( X, Y, Z, cmap=cm.gray_r, linewidth=0, antialiased=True ) fig.canvas.set_window_title( "Distance" ) pylab.show() It's fantastic: I see the…
carlesh
  • 537
  • 1
  • 4
  • 17
2
votes
0 answers

Measuring object geometrical parameters in segmented image. How to separate touching objects in python?

In my image I have 6 segmented objects. My aim is to measure width of each object. However, in some segmented masks, objects touch each other. I am struggling to find a way to separate them. My program works correctly, if there are no merging…
2
votes
1 answer

Modify surface code to solve for 4 dimensions instead of 3 [edited]

I found this great question with some concise code that, with a couple of tweaks, fits a 3D polynomial surface onto a set of points of in space. Python 3D polynomial surface fit, order dependent My version is below. Ultimately, I've realized that I…
2
votes
3 answers

Create PDF with (resized) PNG images using Pycairo - rescaling Surface issue

I have som PNG image links that I want to download, "convert to thumbnails" and save to PDF using Python and Cairo. Now, I have a working code, but I don't know how to control image size on paper. Is there a way to resize a PyCairo Surface to the…
heltonbiker
  • 26,657
  • 28
  • 137
  • 252
2
votes
2 answers

Pygame: and Python's "with statement"

So I'm developing a game using Pygame and trying to abstract away a lot of the code. In the process though, I'm getting some weird errors. Namely, when I run main.py, I get this trace: >>> initializing pygame... initalizing screen... initializing…
Ceasar
  • 22,185
  • 15
  • 64
  • 83