3d

Separating Mesh

China☆狼群 提交于 2020-01-01 22:04:46
问题 I've a problem with separating meshes. There is a combined mesh which has 1 vertex buffer and 1 index buffer for triangles. But the mesh has 2 seperated objects at least. For example there are 2 quads with no vertex shared (and with no index shared of course) and their geometry is in 1 single mesh (1 vertex buffer, 1 index buffer). So how can I create 2 meshes from them. Is there any algorithm for that. I've tried to add first vertex in a new mesh then look for index which points this vertex,

Simple cubic lattice using three-dimensional array

谁都会走 提交于 2020-01-01 19:51:26
问题 I want to draw a simple cubic lattice using MATLAB. I have read How to plot 3D grid (cube) in Matlab, however, I want to color every small cube. I have a three-dimensional array in MATLAB, such as, cube(:,:,1) = [1 0 1 0 1 1 1 1 0] cube(:,:,2) = [0 0 1 1 1 1 0 1 0] cube(:,:,3) = [1 1 1 0 1 1 1 0 1] How can I draw a simple cubic lattice using this array, in which cube(:,:,1) denotes the first floor of the cubic lattice, cube(:,:,2) denotes the second floor, and cube(:,:,3) the third floor. A 0

What do I do with the fundamental matrix?

∥☆過路亽.° 提交于 2020-01-01 19:44:51
问题 I am trying to reconstruct a 3d shape from multiple 2d images. I have calculated a fundamental matrix, but now I don't know what to do with it. I am finding multiple conflicting answers on stack overflow and academic papers. For example, Here says you need to compute the rotation and translation matrices from the fundamental matrix. Here says you need to find the camera matrices. Here says you need to find the homographies. Here says you need to find the epipolar lines. Which is it?? (And how

OpenGL: creating my own camera

可紊 提交于 2020-01-01 19:08:49
问题 I'm trying to create a camera to move around a 3d space and am having some problems setting it up. I'm doing this is Java, and apparently using gluPerspective and gluLookAt together creates a conflict (the screen starts flickering like mad). gluPerspective is set like this: gl.glMatrixMode(GLMatrixFunc.GL_PROJECTION); gl.glLoadIdentity(); glu.gluPerspective(50.0f, h, 1.0, 1000.0); gl.glMatrixMode(GLMatrixFunc.GL_MODELVIEW); I then create a camera matrix, making use of eye coordinates, forward

Mapping a stereographic projection to the inside of a sphere in ThreeJS

三世轮回 提交于 2020-01-01 18:54:22
问题 When it comes to 3D animation, there are a lot of terms and concepts that I'm not familiar with (maybe a secondary question to append to this one: what are some good books to get familiar with the concepts?). I don't know what a "UV" is (in the context of 3D rendering) and I'm not familiar with what tools exist for mapping pixels on an image to points on a mesh. I have the following image being produced by a 360-degree camera (it's actually the output of an HTML video element): I want the

How to switch Three/js camera controls from First Person to Orbit and back

生来就可爱ヽ(ⅴ<●) 提交于 2020-01-01 18:17:22
问题 You can switch from Three.js Orbit Controls to FirstPerson controls without a problem. But when you go from First Person to Orbit the display gets stuck in a 'mousedown' mode. What do you need to do to go back and forth between First Person and Orbit controls seamlessly? The jsBin with the demo http://jsbin.com/jekebo/2/edit?html,js,output The two functions function setControlsFirstPerson() { camera = new THREE.PerspectiveCamera( 40, window.innerWidth / window.innerHeight, 1, 1000 ); camera

Gnuplot - plotting position(xyz) vs time data inside a specified space (eg a box) with a pause

假如想象 提交于 2020-01-01 17:29:01
问题 Can the following be done in gnuplot? If yes, how? I have data for time vs position(x,y,z) in a table with t,x,y,z as headers. I would like to know if I can somehow plot the same time vs position of the particle inside a predefined space with a pause after each time step; so that i can see the evolution of the particles position with time. I would also like to know if I can draw a continuous line from the previous position to the current position so that I can actually see the track of its

Gnuplot - plotting position(xyz) vs time data inside a specified space (eg a box) with a pause

a 夏天 提交于 2020-01-01 17:28:02
问题 Can the following be done in gnuplot? If yes, how? I have data for time vs position(x,y,z) in a table with t,x,y,z as headers. I would like to know if I can somehow plot the same time vs position of the particle inside a predefined space with a pause after each time step; so that i can see the evolution of the particles position with time. I would also like to know if I can draw a continuous line from the previous position to the current position so that I can actually see the track of its

How can I visualize volume data as shown here, in MATLAB?

一个人想着一个人 提交于 2020-01-01 15:32:19
问题 My question very simply: I have a bunch of matricies, all stacked up on each other, so that I have a volume of data. I want to visualize this data, as this example image shows below: It seems to me that some degree of transparency is needed, perhaps linked to the value of each voxel. That is, the higher the value, the less 'transparent' the voxel is to things behind it. I am not sure how to even start with this. Here is some simple code that makes my data volume, so all I would like now is to

Roll, pitch, yaw calculation

会有一股神秘感。 提交于 2020-01-01 13:37:12
问题 How can I calculate the roll, pitch and yaw angles associated with a homogeneous transformation matrix? I am using the following formulas at the moment, but I am not sure whether they are correct or not. pitch = atan2( -r20, sqrt(r21*r21+r22*r22) ); yaw = atan2( r10, r00 ); roll = atan2( r21, r22 ); r10 means second row and first column. 回答1: Your equations are correct only if the order of rotations is: roll, then pitch, then yaw. For the record, the correspondence with Euler angles (with