Search Results

Search found 41 results on 2 pages for '3dgraphics'.

Page 1/2 | 1 2  | Next Page >

  • Using 3D photos in silverlight?

    - by Samvel Siradeghyan
    Hi all. I want use photos captured by 3D cameras in Silverlight 3 or 4. I want use that photos like in maps.google.com. Is it possible to do with silverlight and if yes is there any book, tutorial, video or anything alse, from which I can learn how to use tham. Thanks.

    Read the article

  • Debugging a working program on Mathematica 5 with Mathematica 7

    - by Neuschwanstein
    Hi everybody, I'm currently reading the Mathematica Guidebooks for Programming and I was trying to work out one of the very first program of the book. Basically, when I run the following program: Plot3D[{Re[Exp[1/(x + I y)]]}, {x, -0.02, 0.022}, {y, -0.04, 0.042}, PlotRange -> {-1, 8}, PlotPoints -> 120, Mesh -> False, ColorFunction -> Function[{x1, x2, x3}, Hue[Arg[Exp[1/(x1 + I x2)]]]]] either I get a 1/0 error and e^\infinity error or, if I lower the PlotPoints options to, say, 60, an overflow error. I have a working output though, but it's not what it's supposed to be. The hue seems to be diffusing off the left corner whereas it should be diffusing of the origin (as can be seen on the original output) Here is the original program which apparently runs on Mathematica 5 (Trott, Mathematica Guidebook for Programming): Off[Plot3D::gval]; Plot3D[{Re[Exp[1/(x + I y)]], Hue[Arg[Exp[1/(x + I y)]]]}, {x, -0.02, 0.022}, {y, -0.04, 0.042}, PlotRange -> {-1, 8}, PlotPoints -> 120, Mesh -> False] Off[Plot3D::gval]; However, ColorFunction used this way (first Plot3D argument) doesn't work and so I tried to simply adapt to its new way of using it. Well, thanks I guess!

    Read the article

  • Getting started with OpenGL

    - by Bryan Denny
    As you can see here I'm about to start work on a 3d project for class. Do you have any useful resources/websites/tips/etc. on someone getting started with OpenGL for the first time? The project will be in C++ and accessing OpenGL via GLUT. Thanks!

    Read the article

  • Introduction to 3D Graphics Programming

    - by Jacob Relkin
    Hi everyone! I'm a self-taught programmer with absolutely nil 3D programming experience. A client of mine has related to me an idea for an iPhone app that requires OpenGL ES 2.0 for it's inherently complex 3D structure and animations. Where do I start on this ( albeit long ) journey toward OpenGL ES competence? I'm willing to put in a tremendous amount of time and effort into learning, and if i could please get some pointers to where I should start and what to expect, that would be awesome!

    Read the article

  • point light illumination using Phong model

    - by Myx
    Hello: I wish to render a scene that contains one box and a point light source using the Phong illumination scheme. The following are the relevant code snippets for my calculation: R3Rgb Phong(R3Scene *scene, R3Ray *ray, R3Intersection *intersection) { R3Rgb radiance; if(intersection->hit == 0) { radiance = scene->background; return radiance; } ... // obtain ambient term ... // this is zero for my test // obtain emissive term ... // this is also zero for my test // for each light in the scene, obtain calculate the diffuse and specular terms R3Rgb intensity_diffuse(0,0,0,1); R3Rgb intensity_specular(0,0,0,1); for(unsigned int i = 0; i < scene->lights.size(); i++) { R3Light *light = scene->Light(i); R3Rgb light_color = LightIntensity(scene->Light(i), intersection->position); R3Vector light_vector = -LightDirection(scene->Light(i), intersection->position); // check if the light is "behind" the surface normal if(normal.Dot(light_vector)<=0) continue; // calculate diffuse reflection if(!Kd.IsBlack()) intensity_diffuse += Kd*normal.Dot(light_vector)*light_color; if(Ks.IsBlack()) continue; // calculate specular reflection ... // this I believe to be irrelevant for the particular test I'm doing } radiance = intensity_diffuse; return radiance; } R3Rgb LightIntensity(R3Light *light, R3Point position) { R3Rgb light_intensity; double distance; double denominator; if(light->type != R3_DIRECTIONAL_LIGHT) { distance = (position-light->position).Length(); denominator = light->constant_attenuation + (light->linear_attenuation*distance) + (light->quadratic_attenuation*distance*distance); } switch(light->type) { ... case R3_POINT_LIGHT: light_intensity = light->color/denominator; break; ... } return light_intensity; } R3Vector LightDirection(R3Light *light, R3Point position) { R3Vector light_direction; switch(light->type) { ... case R3_POINT_LIGHT: light_direction = position - light->position; break; ... } light_direction.Normalize(); return light_direction; } I believe that the error must be somewhere in either LightDirection(...) or LightIntensity(...) functions because when I run my code using a directional light source, I obtain the desired rendered image (thus this leads me to believe that the Phong illumination equation is correct). Also, in Phong(...), when I computed the intensity_diffuse and while debugging, I divided light_color by 10, I was obtaining a resulting image that looked more like what I need. Am I calculating the light_color correctly? Thanks.

    Read the article

  • Implement a 3D paint application: how to start?

    - by NewB
    Hello, I want to implement a paint-like application, which will enable kids to create and work with 3 dimensional objects. How can I start? What is the right approach? WPF, OpenGL, or Direct3D? (I prefer C# solutions, but C++ is OK also). Thank you all in advance! --NewB

    Read the article

  • 3 index buffers

    - by bobobobo
    So, in both D3D and OpenGL there's ability to draw from an index buffer. The OBJ file format however does something weird. It specifies a bunch of vertices like: v -21.499660 6.424470 4.069845 v -25.117170 6.418100 4.068025 v -21.663851 8.282170 4.069585 v -21.651890 6.420180 4.068675 v -25.128481 8.281520 4.069585 Then it specifies a bunch of normals like.. vn 0.196004 0.558984 0.805680 vn -0.009523 0.210194 -0.977613 vn -0.147787 0.380832 -0.912757 vn 0.822108 0.567581 0.044617 vn 0.597037 0.057507 -0.800150 vn 0.809312 -0.045432 0.585619 Then it specifies a bunch of tex coords like vt 0.1225 0.5636 vt 0.6221 0.1111 vt 0.4865 0.8888 vt 0.2862 0.2586 vt 0.5865 0.2568 vt 0.1862 0.2166 THEN it specifies "faces" on the model like: f 1/2/5 2/3/7 8/2/6 f 5/9/7 6/3/8 5/2/1 So, in trying to render this with vertex buffers, In OpenGL I can use glVertexPointer, glNormalPointer and glTexCoordPointer to set pointers to each of the vertex, normal and texture coordinate arrays respectively.. but when it comes down to drawing with glDrawElements, I can only specify ONE set of indices, namely the indices it should use when visiting the vertices. Ok, then what? I still have 3 sets of indices to visit. In d3d its much the same - I can set up 3 streams: one for vertices, one for texcoords, and one for normals, but when it comes to using IDirect3DDevice9::DrawIndexedPrimitive, I can still only specify ONE index buffer, which will index into the vertices array. So, is it possible to draw from vertex buffers using different index arrays for each of the vertex, texcoord, and normal buffers (EITHER d3d or opengl!)

    Read the article

  • How do I prevent jagged edges alongside the surfaces of my 3d model?

    - by badcodenotreat
    Lets say I've implemented in openGL a crude model viewer with shading which renders a series of blocks, such that I have something that looks like this. http://i.imgur.com/TsF7K.jpg Whenever I rotate my model to the side, it causes an unwanted jagged effect along any surface with a steep viewing angle. http://i.imgur.com/Bgl9o.jpg I'm pretty sure this is due to the polygon offset I used to prevent z-fighting between the model and the wireframe, however I'm not able to find the factor/unit parameters in openGL which prevent this unwanted effect. what are the best values of factor and unit for glPolygonOffset to prevent this? would implementing anti-aliasing alleviate the problem? is the trade off in performance trivial/significant? is this perhaps a shading issue? should i try a solution along this line of thought?

    Read the article

  • 3D visualization in browser

    - by Milos
    Hello, I am looking for solutions for 3D visualizations in web browsers. For now I just need to do research about this topic, i.e. I need to know how many solutions exist and which of these are good and why? Thanks

    Read the article

  • suggestions for a 3D graph rendering library?

    - by Sandro
    Hello coders! So I'm not sure how stackoverflow friendly this question is since it doesn't have a quick clear cut answer but here we go... I have a java program that generates data for a directed graph. Now I need to render this graph. The data needs to be laid out in 3D, and I want to be able to define which plane an edge lives in. (Each edge will only need to occupy 1 plane of the 3D space). I also need the ability to navigate around the graph. Since I know that this kind of stuff is hard, I'm going shopping. So far I've looked into (In no particular order): JUNG: lacks 3D support Cytoscape: not sure how much I'll be able to define edge drawing, haven't seen a non bio-informatics application of it yet JGraph: I didn't see any 3D applications yet Perfuse: looks promising, does anyone know anything else about it? Gephi: Documentation looks scarce Processing: does this play well with java? I'm also considering doing some combination of opengl + swing rendering to create a 3D graph from multiple 2D graphs. I am also not adverse to the idea of linking from another language Any Ideas? Thank you.

    Read the article

  • OpenGL Color Interpolation across vertices

    - by gutsblow
    Right now, I have more than 25 vertices that form a model. I want to interpolate color linearly between the first and last vertex. The Problem is when I write the following code glColor3f(1.0,0.0,0.0); vertex3f(1.0,1.0,1.0); vertex3f(0.9,1.0,1.0); . .`<more vertices>; glColor3f(0.0,0.0,1.0); vertex3f(0.0,0.0,0.0); All the vertices except that last one are red. Now I am wondering if there is a way to interpolate color across these vertices without me having to manually interpolate color natively (like how opengl does it automatically) at each vertex since, I will be having a lot more number of colors at various vertices. Any help would be extremely appreciated. Thank you!

    Read the article

  • How to use Mesa3D on Mac OS X and Windows

    - by gutsblow
    Hello all, I need to use Mesa3D for a cross platform application(windows and Mac only) which uses only offline software rendering. The reason I wanted to use Mesa3D is because it has the same Drawing calls as OpenGL and they are really easy. Now I know that Apple itself has a software implementation (which I heard is flaky), but I prefer using Mesa so that it's a lot easier for me to maintain the code on both platforms. On windows I managed to compile three DLL's from the Mesa3d source, but don't know what to do with them. On Mac OS X I am completely clueless. I would highly appreciate your help. Thank you once again very much!

    Read the article

  • Finding intersection of two spheres

    - by Onkar Deshpande
    Hi, Consider the following problem - I am given 2 links of length L0 and L1. P0 is the point that the first link starts at and P1 is the point that I want the end of second link to be at in 3-D space. I am supposed to write a function that should take in these 3-D points (P0 and P1) as inputs and should find all configurations of the links that put the second link's end point at P1. My understanding of how to go about it is - Each link L0 and L1 will create a sphere S0 and S1 around itself. I should find out the intersection of those two spheres (which will be a circle) and print all points that are on the circumference of that circle. I saw gmatt's first reply on the http://stackoverflow.com/questions/1406375/finding-intersection-points-between-3-spheres but could not understand it properly since the images did not show up. I also saw a formula for finding out the intersection at mathworld[dot]wolfram[dot]com/Sphere-SphereIntersection[dot]html . I could find the radius of intersection by the method given on mathworld. Also I can find the center of that circle and then use the parametric equation of circle to find the points. The only doubt that I have is will this method work for the points P0 and P1 mentioned above ? Please comment and let me know your thoughts.

    Read the article

  • Representing robot's elbow angle in 3-D

    - by Onkar Deshpande
    I am given coordinates of two points in 3-D viz. shoulder point and object point(to which I am supposed to reach). I am also given the length from my shoulder-to-elbow arm and the length of my forearm. I am trying to solve for the unknown position(the position of the joint elbow). I am using cosine rule to find out the elbow angle. Here is my code - #include <stdio.h> #include <math.h> #include <stdlib.h> struct point { double x, y, z; }; struct angles { double clock_wise; double counter_clock_wise; }; double max(double a, double b) { return (a > b) ? a : b; } /* * Check if the combination can make a triangle by considering the fact that sum * of any two sides of a triangle is greater than the remaining side. The * overlapping condition of links is handled separately in main(). */ int valid_triangle(struct point p0, double l0, struct point p1, double l1) { double dist = sqrt(pow((fabs(p1.z - p0.z)), 2) + pow((fabs(p1.y - p0.y)), 2) + pow((fabs(p1.x - p0.x)), 2)); if((max(dist, l0) == dist) && max(dist, l1) == dist) { return (dist < (l0 + l1)); } else if((max(dist, l0) == l0) && (max(l0, l1) == l0)) { return (l0 < (dist + l1)); } else { return (l1 < (dist + l0)); } } /* * Cosine rule is used to find the elbow angle. Positive value indicates a * counter clockwise angle while negative value indicates a clockwise angle. * Since this problem has at max 2 solutions for any given position of P0 and * P1, I am returning a structure of angles which can be used to consider angles * from both direction viz. clockwise-negative and counter-clockwise-positive */ void return_config(struct point p0, double l0, struct point p1, double l1, struct angles *a) { double dist = sqrt(pow((fabs(p1.z - p0.z)), 2) + pow((fabs(p1.y - p0.y)), 2) + pow((fabs(p1.x - p0.x)), 2)); double degrees = (double) acos((l0 * l0 + l1 * l1 - dist * dist) / (2 * l0 * l1)) * (180.0f / 3.1415f); a->clock_wise = -degrees; a->counter_clock_wise = degrees; } int main() { struct point p0, p1; struct angles a; p0.x = 15, p0.y = 4, p0.z = 0; p1.x = 20, p1.y = 4, p1.z = 0; double l0 = 5, l1 = 8; if(valid_triangle(p0, l0, p1, l1)) { printf("Three lengths can make a valid configuration \n"); return_config(p0, l0, p1, l1, &a); printf("Angle of the elbow point (clockwise) = %lf, (counter clockwise) = %lf \n", a.clock_wise, a.counter_clock_wise); } else { double dist = sqrt(pow((fabs(p1.z - p0.z)), 2) + pow((fabs(p1.y - p0.y)), 2) + pow((fabs(p1.x - p0.x)), 2)); if((dist <= (l0 + l1)) && (dist > l0)) { a.clock_wise = -180.0f; a.counter_clock_wise = 180.0f; printf("Angle of the elbow point (clockwise) = %lf, (counter clockwise) = %lf \n", a.clock_wise, a.counter_clock_wise); } else if((dist <= fabs(l0 - l1)) && (dist < l0)){ a.clock_wise = -0.0f; a.counter_clock_wise = 0.0f; printf("Angle of the elbow point (clockwise) = %lf, (counter clockwise) = %lf \n", a.clock_wise, a.counter_clock_wise); } else printf("Given combination cannot make a valid configuration\n"); } return 0; } However, this solution makes sense only in 2-D. Because clockwise and counter-clockwise are meaningless without an axis and direction of rotation. Returning only an angle is technically correct but it leaves a lot of work for the client of this function to use the result in meaningful way. How can I make the changes to get the axis and direction of rotation ? Also, I want to know how many possible solution could be there for this problem. Please let me know your thoughts ! Any help is highly appreciated ...

    Read the article

  • pyopengl: Could it replace c++ ?

    - by Tom
    Hi everyone. I'm starting a computer graphics course, and I have to choose a language. Choices are between C++ and Python. I have no problem with C++, python is a work in progress. So i was thinking to go down the python road, using pyopengl for graphics part. I have heard though, that performance is an issue. Is python / pyopengl mature enough to challenge C++ on performance? I realize its a long shot, but I'd like to hear your thoughts, experiences on uses of pyopengl. Thanks in advance.

    Read the article

  • Graphics/Vision Interesting Topics

    - by Myx
    Hello: I would like to do an interesting project for a computer graphics course. I know that there is a lot of literature out there (i.e. SIGGRAPH conference papers). I have a very large range of interest with regard to computer graphics (i.e. image processing, 3D modeling, rendering, animation). However, I've only taken computer vision/graphics for 2 semesters and thus don't have too much background experience, except for the class projects that I had to do. I've been looking through SIGGRAPH papers trying to see if there is anything that will be of interest to me but the literature is extremely vast. I was wondering if anyone has any topic suggestions, anything interesting that you ran across that you could recommend. I would prefer to do something fun yet slightly challenging (not really interested in making a shooter game). If this question does not belong here, I apologize and please let me know where I should move it. Thanks!

    Read the article

  • How to structure class to support imported 3d model ?

    - by brainydexter
    Hello, I've written a C++ library that reads in this 3d model file (collada DAE). uptil now, I would output a list of triangles and handle each at rendering stage. But now, I need to attach some Bounding sphere information with the imported model. I need some advice on how should I organize this in code. Here are some specs of the 3D file format: - 3D model is represented as a Tree consisting of nodes - each node can contain other nodes, geometry information, transformation etc My requirements: - a bounding sphere associated with each node, thereby yielding a tree of bounding sphere hierarchy for the model itself. - actual vertex information What would be the recommended way to deal with this situation? Thanks

    Read the article

  • Maths: Determining angle in 3D space

    - by 742
    I hope this is the proper location to ask this question which is the same as this one, but expressed as pure math instead of graphically (at least I hope I translated the problem to math correctly). Considering: two vectors that are orthogonal: Up (ux, uy, uz) and Look (lx, ly, lz) a plane P which is perpendicular to Look (hence including Up) Y1 which is the projection of Y (vertical axis) along Look onto P Question: what is the value of the angle between Y1 and Up? As mathematicians will agree, this is a very basic question, but I've been scratching my head on walls now for at least two weeks without being able to visualize the solution... maybe now too old for finding solutions to school exercises. I'm looking for the scalar trigonometric solution, not a solution using a matrix. Thanks.

    Read the article

  • 3D effect to distort paper

    - by donpal
    This may be a little hard to describe since I don't have a sample. I'm trying to find a math function or full 3d function in php or a similar language that can help me with the following effect: imagine if you were to take a flat sheet or paper and glue it on a glass of water. It wouldn't be flat any more. It would have a curve, and one of its sides might end up being slightly hidden. Anyone can refer me to a good library or resource on the web where such functions can be found?

    Read the article

1 2  | Next Page >