Search Results

Search found 812 results on 33 pages for 'computational geometry'.

Page 2/33 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • projective geometry: how do I turn a projection of a rectangle in 3D into a 2D view

    - by bonomo
    So the problem is that I have a 3D projection of a rectangle that I want to turn into 2D. That is I have a photo of a sheet of paper laying on a table which I want to transform into a 2D view of that sheet. So what I need is to get an undistorted 2D image by reverting all the 3D/projection transformations and getting a plain view of the sheet from the top. I happened to find some directions on the subject but they don't suggest an immediate instruction on how this can be achieved. It would be really helpful to get a step-by-step instruction of what needs to be done. Or, alternatively, a link on a resource that breaks it down to little details. Thank you

    Read the article

  • OpenGL lighting with dynamic geometry

    - by Tank
    I'm currently thinking hard about how to implement lighting in my game. The geometry is quite dynamic (fixed 3D grid with custom geometry in each cell) and needs some light to get more depth and in general look nicer. A scene in my game always contains sunlight and local light sources like lamps (point lights). One can move underground, so sunlight must be able to illuminate as far as it can get. Here's a render of a typical situation: The lamp is positioned behind the wall to the top, and in the hollow cube there's a hole in the back, so that light can shine through. (I don't want soft shadows, this is just for illustration) While spending the whole day searching through Google, I stumbled on some keywords like deferred rendering, forward rendering, ambient occlusion, screen space ambient occlusion etc. Some articles/tutorials even refer to "normal shading", but to be honest I don't really have an idea to even do simple shading. OpenGL of course has a fixed lighting pipeline with 8 possible light sources. However they just illuminate all vertices without checking for occluding geometry. I'd be very thankful if someone could give me some pointers into the right direction. I don't need complete solutions or similar, just good sources with information understandable for someone with nearly no lighting experience (preferably with OpenGL).

    Read the article

  • PostgreSQL: SELECT all fields, filter some

    - by Adam Matan
    Hi, In one of our databases, there is a table with dozens of columns, one of which is a geometry column. I want to SELECT rows from the table, with the geometry transformed to another SRID. I want to use something like: `SELECT *` in order to avoid: SELECT col_a, col_b, col_c, col_d, col_e, col_f, col_g, col_h, transform(the_geom, NEW_SRID), ..., col_z Any ideas? Adam

    Read the article

  • Computation geometry: find where's the triangle after rotation, tranlastion or reflection in a mirro

    - by newba
    Hi, I have a small contest problem in which is given a set of points, in 2D, that form a triangle. This triangle may be subject to an arbitrary rotation, may be subject to an arbitrary translation (both in the 2D plane) and may be subject to a reflection on a mirror, but its dimensions were kept unchanged. Then, they give me a set of points in the plane, and I have to find 3 points that form my triangle after one or more of those geometric operations. Example: 5 15 8 5 20 10 6 5 17 5 20 20 5 10 5 15 20 15 10 I bet that have to apply some known algorithm, but I don't know which. The most common are: convex hull, sweep plane, triangulation, etc. Can someone give a tip? I don't need the code, only a push, please!

    Read the article

  • python geometry help

    - by Enriquev
    Hello, I have the following problem, I am trying to find the following distances (F1 and F2): This is what I have as of now: def FindArrow(self, X1, Y1, X2, Y2, X3, Y3): self.X1 = float(X1) self.Y1 = float(Y1) self.X2 = float(X2) self.Y2 = float(Y2) self.X3 = float(X3) self.Y3 = float(Y3) #center coords of the circle self.Xc = None self.Yc = None #radius self.R = None #F1 and F2 self.FAB = None self.FBC = None #check if the coordinates are collinear invalide = self.X1 * (self.Y2 - self.Y3) + self.X2 * (self.Y3 - self.Y1) + self.X3 * (self.Y1 - self.Y2) if (invalide == 0): return #get the coords of the circle's center s = (0.5 * ((self.X2 - self.X3)*(self.X1 - self.X3) - (self.Y2 - self.Y3) * (self.Y3 - self.Y1))) / invalide self.Xc = 0.5 * (self.X1 + self.X2) + s * (self.Y2 - self.Y1) self.Yc = 0.5 * (self.Y1 + self.Y2) + s * (self.X1 - self.X2) #get the radius self.R = math.sqrt(math.pow(self.Xc - self.X1, 2) + math.pow(self.Yc - self.Y1, 2)) Until here everything seems to work, now what would be the next steps to get F1 and F2 ?

    Read the article

  • An implementation of Sharir's or Aurenhammer's deterministic algorithm for calculating the intersect

    - by RGrey
    The problem of finding the intersection/union of 'N' discs/circles on a flat plane was first proposed by M. I. Shamos in his 1978 thesis: Shamos, M. I. “Computational Geometry” Ph.D. thesis, Yale Univ., New Haven, CT 1978. Since then, in 1985, Micha Sharir presented an O(n log2n) time and O(n) space deterministic algorithm for the disc intersection/union problem (based on modified Voronoi diagrams): Sharir, M. Intersection and closest-pair problems for a set of planar discs. SIAM .J Comput. 14 (1985), pp. 448-468. In 1988, Franz Aurenhammer presented a more efficient O(n log n) time and O(n) space algorithm for circle intersection/union using power diagrams (generalizations of Voronoi diagrams): Aurenhammer, F. Improved algorithms for discs and balls using power diagrams. Journal of Algorithms 9 (1985), pp. 151-161. Earlier in 1983, Paul G. Spirakis also presented an O(n^2) time deterministic algorithm, and an O(n) probabilistic algorithm: Spirakis, P.G. Very Fast Algorithms for the Area of the Union of Many Circles. Rep. 98, Dept. Comput. Sci., Courant Institute, New York University, 1983. I've been searching for any implementations of the algorithms above, focusing on computational geometry packages, and I haven't found anything yet. As neither appear trivial to put into practice, it would be really neat if someone could point me in the right direction!

    Read the article

  • Geometry instancing in OpenGL ES 2.0

    - by seahorse
    I am planning to do geometry instancing in OpenGL ES 2.0 Basically I plan to render the same geometry(a chair) maybe 1000 times in my scene. What is the best way to do this in OpenGL ES 2.0? I am considering passing model view mat4 as an attribute. Since attributes are per vertex data do I need to pass this same mat4, three times for each vertex of the same triangle(since modelview remains constant across vertices of the triangle). That would amount to a lot of extra data sent to the GPU( 2 extra vertices*16 floats*(Number of triangles) amount of extra data). Or should I be sending the mat4 only once per triangle?But how is that possible using attributes since attributes are defined as "per vertex" data? What is the best and efficient way to do instancing in OpenGL ES 2.0?

    Read the article

  • Outline Shader Effect for Orthogonal Geometry in XNA

    - by Griffin
    I just recently started learning the art of shading, but I can't give an outline width to 2D, concave geometry when restrained to a single vertex/pixel shader technique (thanks to XNA). the shape I need to give an outline to has smooth, per-vertex coloring, as well as opacity. The outline, which has smooth, per-vertex coloring, variable width, and opacity cannot interfere with the original shape's colors. A pixel depth border detection algorithm won't work because pixel depth isn't a 3.0 semantic. expanding geometry / redrawing won't work because it interferes with the original shape's colors. I'm wondering if I can do something with the stencil/depth buffer outside of the shader functions since I have access to that through the graphics device. But I don't believe I'm able to manipulate actual values. How might I do this?

    Read the article

  • When can a freely moving sphere escape from a ‘cage’ defined by a set of impassible coordinates?

    - by RGrey
    Hopefully there are some computational geometry folks here who can help me out with the following problem - Please imagine that I take a freely moving ball in 3-space and create a 'cage' around it by defining a set of impassible coordinates, Sc (i.e. points in 3-space that no part of the diffusing ball is allowed to overlap). These points reside within the volume, V(cage), of some larger sphere, where V(cage) V(ball). Provided the set of impassible coordinates, Sc, is there a computationally efficient and/or nice way to determine if the ball can ever escape the cage?

    Read the article

  • Nesting maximum amount of shapes on a surface

    - by Fuu
    In industry, there is often a problem where you need to calculate the most efficient use of material, be it fabric, wood, metal etc. So the starting point is X amount of shapes of given dimensions, made out of polygons and/or curved lines, and target is another polygon of given dimensions. I assume many of the current CAM suites implement this, but having no experience using them or of their internals, what kind of computational algorithm is used to find the most efficient use of space? Can someone point me to a book or other reference that discusses this topic?

    Read the article

  • Fitting maximum amount of shapes on a surface

    - by Fuu
    In industry, there is often a problem where you need to calculate the most efficient use of material, be it fabric, wood, metal etc. So the starting point is X amount of shapes of given dimensions, made out of polygons and/or curved lines, and target is another polygon of given dimensions. I assume many of the current CAM suites implement this, but having no experience using them or of their internals, what kind of computational algorithm is used to find the most efficient use of space? Can someone point me to a book or other reference that discusses this subject?

    Read the article

  • Software to capture 3d geometry?

    - by user712092
    Programs I found I found these programs to capture OpenGL 3D scene : 3D Ripper, OpenGL and D3D geometry capture, there are some solved problems with 3D Ripper GLIntercept captures OpenGL function calls OpenGL Extractor captures 3d geometry; should work as plugin for GLIntercept another tool to capture OpenGL 3D data EDIT: There is also HijackGL which changes how a scene is rendered so it probably can be used to capture geometry; it is backed up by a academic paper; it is just just a nice program, not related to what I want i think (or it would might be hard to change it to be for what I want, because it would require programming). 3D Ripper captures geometry, textures and shaders. OpenGL Extractor captures just geometry ... General questions about such programs What is Your experience with these programs? Which of these programs would You recommmend? Do You know other such programs? Were there any problems with them, or are there problems with them in general? Are there programs which work best overall, or is it specific to certain 3d applications? What I need to do? I am looking to program which can capture 3d geometry for study purposes. And also for a program to capture 3D animation (frames of 3d animation). I tried only 3D Ripper because application I try to capture data from is on Direct 3D. 3D Ripper works with at least Direct 3D 9, this application has Direct 3D 6. Are there applications which work with older version of Direct 3D? Thank You very much. :) (I was verbose in link names because I want them to be indexed better by search engines.)

    Read the article

  • Softbody with complex geometry

    - by philipp
    I have modeled an Handball, based on the tutorial here, with a custom texture. Now I am trying to animate this model with the reactor module as a soft body. Therefor I have watched and tried a lot of tutorials and for animating a simple Sphere everything works fine. But if i try to use the model I have created, than it results in the crash of max or an animation that shows a crystal like structure that transforms itself to another crystal. Is it possible to animate this kind of complex geometry as a soft body and am i just setting the values wrong? If yes, which are the important ones I should check? Thanks in advance! Greetings philipp

    Read the article

  • HLSL How to flip geometry horizontally

    - by cubrman
    I want to flip my asymmetric 3d model horizontally in the vertex shader alongside an arbitrary plane parallel to the YZ plane. This should switch everything for the model from the left hand side to the right hand side (like flipping it in Photoshop). Doing it in pixel shader would be a huge computational cost (extra RT, more fullscreen samples...), so it must be done in the vertex shader. Once more: this is NOT reflection, i need to flip THE WHOLE MODEL. I thought I could simply do the following: Turn off culling. Run the following code in the vertex shader: input.Position = mul(input.Position, World); // World[3][0] holds x value of the model's pivot in the World. if (input.Position.x <= World[3][0]) input.Position.x += World[3][0] - input.Position.x; else input.Position.x -= input.Position.x - World[3][0]; ... The model is never drawn. Where am I wrong? I presume that messes up the index buffer. Can something be done about it? P.S. it's INSANELY HARD to format code here. Thanks to Panda I found my problem. SOLUTION: // Do thins before anything else in the vertex shader. Position.x *= -1; // To invert alongside the object's YZ plane.

    Read the article

  • Optimizing spacing of mesh containing a given set of points

    - by Feynman
    I tried to summarize the this as best as possible in the title. I am writing an initial value problem solver in the most general way possible. I start with an arbitrary number of initial values at arbitrary locations (inside a boundary.) The first part of my program creates a mesh/grid (I am not sure which is the correct nuance), with N points total, that contains all the initial values. My goal is to optimize the mesh such that the spacing is as uniform as possible. My solver seems to work half decently (it needs some more obscure debugging that is not relevant here.) I am starting with one dimension. I intend to generalize the algorithm to an arbitrary number of dimensions once I get it working consistently. I am writing my code in fortran, but feel free to reply with pseudocode or the language of your choice. Allow me to elaborate with an example: Say I am working on a closed interval [1,10] xmin=1 xmax=10 Say I have 3 initial points: xmin, 5 and xmax num_ivc=3 known(num_ivc)=[xmin,5,xmax] //my arrays start at 1. Assume "known" starts sorted I store my mesh/grid points in an array called coord. Say I want 10 points total in my mesh/grid. N=10 coord(10) Remember, all this is arbitrary--except the variable names of course. The algorithm should set coord to {1,2,3,4,5,6,7,8,9,10} Now for a less trivial example: num_ivc=3 known(num_ivc)=[xmin,5.5,xmax or just num_ivc=1 known(num_ivc)=[5.5] Now, would you have 5 evenly spaced points on the interval [1, 5.5] and 5 evenly spaced points on the interval (5.5, 10]? But there is more space between 1 and 5.5 than between 5.5 and 10. So would you have 6 points on [1, 5.5] followed by 4 on (5.5 to 10]. The key is to minimize the difference in spacing. I have been working on this for 2 days straight and I can assure you it is a lot trickier than it sounds. I have written code that only works if N is large only works if N is small only works if it the known points are close together only works if it the known points are far apart only works if at least one of the known points is near a boundary only works if none of the known points are near a boundary So as you can see, I have coded the gamut of almost-solutions. I cannot figure out a way to get it to perform equally well in all possible scenarios (that is, create the optimum spacing.)

    Read the article

  • Draw a parallel line

    - by VOX
    I have x1,y1 and x2,y2 which forms a line segment. How can I get another line x3,y3 - x4,y4 which is parallel to the first line as in the picture. I can simply add n to x1 and x2 to get a parallel line but it is not what i wanted. I want the lines to be as parallel in the picture.

    Read the article

  • Determining polygon intersection and containment

    - by Victor Liu
    I have a set of simple (no holes, no self-intersections) polygons, and I need to check that they don't intersect each other (one can be entirely contained in another; that is okay). I can check this by simply checking the per-vertex inside-ness of one polygon versus other polygons. I also need to determine the containment tree, which is the set of relationships that say which polygon contains any given polygon. Since no polygon can intersect any other, then any contained polygon has a unique container; the "next-bigger" one. In other words, if A contains B contains C, then A is the parent of B, and B is the parent of C, and we don't consider A the parent of C. The question: How do I efficiently determine the containment relationships and check the non-intersection criterion? I ask this as one question because maybe a combined algorithm is more efficient than solving each problem separately. The algorithm should take as input a list of polygons, given by a list of their vertices. It should produce a boolean B indicating if none of the polygons intersect any other polygon, and also if B = true, a list of pairs (P, C) where polygon P is the parent of child C. This is not homework. This is for a hobby project I am working on.

    Read the article

  • minimum enclosing rectangle of fixed aspect ratio

    - by Ramya Narasimha
    I have an Image with many rectangles at different positions in the image and of different sizes (both overlapping and non-overlapping). I also have a non-negative scores associated with each of these rectangles. My problem now is to find one larger rectangle *of a fixed (given) aspect ratio* that encloses as many of these rectangles as possible. I am looking for an algorithm to do this, if anyone has a solution, even a partial one it would be helpful. Please note that the positions of the rectangles in the image is fixed and cannot be moved around and there is no orientation issue as all of them are upright.

    Read the article

  • How to find a random point in a quadrangle?

    - by Gregg Cleland
    Hi! I have to be able to set a random location for a waypoint for a flight sim. The maths challenge is straightforward: "To find a single random location within a quadrangle, where there's an equal chance of the point being at any location." Visually like this: http://screencast.com/t/NTUxMzJhZGQ An example ABCD quadrangle is: A:[21417.78 37105.97] B:[38197.32 24009.74] C:[1364.19 2455.54] D:[1227.77 37378.81] Thanks in advance for any help you can provide. :-)

    Read the article

  • Construct A Polygon Out of Union of Many Polygons

    - by Ngu Soon Hui
    Supposed that I have many polygons, what is the best algorithm to construct a polygon--maybe with holes- out of the union of all those polygons? For my purpose, you can imagine each piece of a polygon as a jigsaw puzzle piece, when you complete them you will get a nice picture. But the catch is that a small portion <5% of the jigsaw is missing, and you are still require to form a picture as complete as possible; that's the polygon-- maybe with holes-- that I want to form. My naive approach is to take two polygons, union them, and take another polygon, union it with the union of the two polygons, and repeat this process until every single piece is union. Then I will run through the union polygon list and check whether there are still some polygons can be combined, and I will repeat this process until a satisfactory result is achieved. But this seems to be like an extremely naive approach. I just wonder is there any other better algorithm?

    Read the article

  • Detecting the axis of rotation from a pointcloud

    - by tfinniga
    I'm trying to auto-detect the axis of rotation on a 3d pointcloud. In other words, if I took a small 3d pointcloud, chose a single axis of rotation, and make several copies of the points at different rotation angles, then I get a larger pointcloud. The input to my algorithm is the larger pointcloud, and the desired output is the single axis of symmetry. And eventually I'm going to compute the correspondences between points that are rotations of each other. The size of the larger pointcloud is on the order of 100K points, and the number of rotational copies made is unknown. The rotation angles in my case have constant deltas, but don't necessarily span 360 degrees. For example, I might have 0, 20, 40, 60. Or I might have 0, 90, 180, 270. But I won't have 0, 13, 78, 212 (or if I do, I don't care to detect it). This seems like a computer vision problem, but I'm having trouble figuring out how to precisely find the axis. The input will generally be very clean, close to float accuracy.

    Read the article

  • Computational complexity of Fibonacci Sequence

    - by Juliet
    I understand Big-O notation, but I don't know how to calculate it for many functions. In particular, I've been trying to figure out the computational complexity of the naive version of the Fibonacci sequence: int Fib(int n) { if (n <= 1) return 1; else return Fib(n - 1) + Fib(n - 2); } What is the computational complexity of the Fibonnaci sequence and how is it calculated?

    Read the article

  • MATLAB command for exporting geometry from pdetool

    - by lapwing
    I'm writing a MATLAB script which solves for the eigenmodes of a defined polygon. MATLAB's PDE toolbox lets me define the geometry using the command pdepoly() but I need to export the geometry description matrix manually to the workspace through the GUI before I can decompose, mesh, and solve the pde. Does anyone know either a command to export the geometry to the workspace or a better way to define this geometry description matrix in MATLAB? Many Thanks

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >