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
6
votes
3 answers

Normalizing colors in matplotlib

I am trying to plot a surface using matplotlib using the code below: from matplotlib import cm import matplotlib.pyplot as plt import numpy as np from mpl_toolkits.mplot3d import axes3d, Axes3D import pylab as p vima=0.5 fig = plt.figure() ax =…
Stelios
  • 95
  • 1
  • 1
  • 5
6
votes
4 answers

How to find the corner pixels of a rectangle?

Given a simple monochrome bitmap that contains a single, randomly rotated rectangle. How can I find the left/top, left/bottom, right/bottom and right/top corner positions of the rectangle inside the bitmap? For example, this is how the bitmap could…
SePröbläm
  • 5,142
  • 6
  • 31
  • 45
6
votes
1 answer

PySDL2 issue with SDL_Surface / LP_SDL_Surface

Im running win7 with python 3.3 and PySDL2 0.5. When creating surfaces (no matter what method) i get an LP_SDL_Surface instead of a SDL_Surface. The LP_SDL_Surface lacks any of the methods and attribute you would expect it to have. Here is the issue…
6
votes
1 answer

Matlab Delaunay Triangulation of Point Cloud - Color Matrix

I would like to create a plot of the 3D surface that spans over all points from an [X,Y,Z] point cloud. For example this is a scatter plot of my point cloud: scatter3(X,Y,Z,5,C) As you can see each data point has an intensity value C. I now carry…
space-dementia
  • 307
  • 1
  • 5
  • 10
5
votes
1 answer

Python: fit 3D ellipsoid (oblate/prolate) to 3D points

Dear fellow stackoverflow users, I face a problem as follows: I would like to fit a 3D ellipsoid to 3D data points within my python script. The starting data are a set of x, y and z coordinates (cartesian coordinates). What I would like to get are a…
Glxblt76
  • 365
  • 5
  • 14
5
votes
3 answers

Calculate the horizon of a curved face? - Not extrema

I need to find the 2 points of the visual horizon, of a curved face. I have: XYZ of the 4 corner points XYZ of the 2 curved edge bezier points And I need to calculate either: XY of the 2 horizon points XYZ of the 2 horizon points Note: I got a…
Robin Rodricks
  • 110,798
  • 141
  • 398
  • 607
5
votes
2 answers

Way to group coplanar triangles in THREEJS mesh?

I'm working on a modeling tool that lets you directly manipulate meshes. For instance, you can grab a face and drag it around. The user's perception of the "face" could be of more than one coplanar triangle. For instance, the top "face" of a cube…
5
votes
3 answers

Algorithm to check if a Circle is totally contained in the area of other circles

What would be the algorithm to check if a circle like the blue one below is TOTALLY contained in the area of other circles (the while circles). I want a TRUE for the blue circle and a FALSE for the red circle The input for all circles is their…
oscarm
  • 2,630
  • 6
  • 41
  • 74
5
votes
3 answers

How to efficiently determine the normal to a polygon in 3D space?

I have a bunch of coplanar points defining a polygon in 3D space. These are always wound the same way (e.g. clockwise). I need to determine the signed normal to the plane containing this polygon, i.e., know which way is "up" for that polygon. This…
Joe Strout
  • 2,634
  • 2
  • 28
  • 39
5
votes
2 answers

Vertex position relative to normal

In a surface shader, given the world's up axis (and the others too), a world space position and a normal in world space, how can we rotate the worldspace position into the space of the normal? That is, given a up vector and a non-orthogonal…
5
votes
3 answers

Is there any algorithm for projecting images onto a non-flat surface?

Is there any algorithm for projecting images onto a non-flat (deformed) surface? It is not deformed too much. It is a really glassy surface covered with high-quality, durable tracing paper. I have a 3-dimensional model of it. How can I texturise…
Rella
  • 65,003
  • 109
  • 363
  • 636
5
votes
2 answers

Matlab: surface plot not working

I have a surface plot I'm trying to do. x is an 11 element vector, y a 300 element vector and z a 300*11 element matrix. When I try to plot it like this: surf(x y z) The surface plot doesn't show up. The axes are there but there is no surface…
Eddy
  • 6,661
  • 21
  • 58
  • 71
4
votes
2 answers

How to plot a 3d surface graph in MATLAB?

I have a dataset like so: | 0.1 0.2 0.3 0.4 ---------------------- 1 | 10 11 12 13 2 | 11 12 13 14 3 | 12 13 14 15 4 | 13 14 15 16 I want to plot a 3D surface graph in matlab such that the column headings will be on the…
user843337
4
votes
1 answer

Minimum area enclosing rectangles?

I need an idea for an algorithm to solve the following problem (I already tried some personal solutions but they don't seem to be optimal) If given a surface with marked and unmarked zones (in matrix form), and 2 rectangles that you can manipulate…
4
votes
2 answers

Pygame how to change size of a surface?

How do you change the size of a surface in pygame that has an image (not scaling). When I load an image in pygame the surface becomes the size of the image. I need to change the size of the surface to be the size of a frame (sprite sheet). Here is…
nobody
  • 161
  • 1
  • 4
  • 8
1
2
3
16 17