3d


How to make 3D object from random points using three.js?

北城余情 提交于 2020-01-25 10:13:51
问题 I generate 10 random points. I want connect each point to every another and get faces for every flat area. So, it will nice 3D object with invisible flat faces inside. How is it possible to make faces from geometry of 10 random points? var objects3 = []; var geometrySpline = new THREE.Geometry(); for ( var i = 0; i < 10; i ++ ) { x = Math.floor(Math.random() * (max - min + 1)) + min; y = Math.floor(Math.random() * (max - min + 1)) + min; z = Math.floor(Math.random() * (max - min + 1)) + min;

How is a 3D morph implemented in computer graphics?

南楼画角 提交于 2020-01-25 09:16:27
问题 I want to generate an intermediate mesh from several meshes like cups, but I didn't find any available paper, open source code, or another resource to do so. So, how can I generate such a mesh? 回答1: I am not aware of any open source library for this. But research literature is very broad and deep. Basically the ingredients are: Mesh parameterization Remeshing Basically you need to parameterize (embed) all the surfaces to a canonical domain such as a plane, sphere or some suitable (genus

How to tell if the camera is looking at the face of a plane

我们两清 提交于 2020-01-25 08:11:27
问题 I have a floating plane in three js. It's double sided and my camera moves and rotates about the scene. My question is, given the position and rotation of the plane and position and rotation of the camera, how can I tell which side of the plane I am looking at? My old solution is this (check the distance from camera to front and back of the plane) but obviously this isn't the best solution. this.back.matrixWorldNeedsUpdate = true; this.front.matrixWorldNeedsUpdate = true; this.d1 = (new THREE

Grouping bar3 plots like bar

霸气de小男生 提交于 2020-01-25 07:06:30
问题 I'm wondering if it is possible to get the same grouping behavior of bar plots into bar3 . For example, if you plot bar(rand(3)); you get 3 bars for each point; bar groups the different y values for each x . Now I would like to do the same with a 3D data. That is that I have several slices of 2D data that I want to visualize as groups of bars. Then, if my data is data = rand(3,3,2); I would like to see data(1,1,:) as a group of bars, and data(1,2,:) as another group and so on. Is it possible?

Grouping bar3 plots like bar

白昼怎懂夜的黑 提交于 2020-01-25 07:05:34
问题 I'm wondering if it is possible to get the same grouping behavior of bar plots into bar3 . For example, if you plot bar(rand(3)); you get 3 bars for each point; bar groups the different y values for each x . Now I would like to do the same with a 3D data. That is that I have several slices of 2D data that I want to visualize as groups of bars. Then, if my data is data = rand(3,3,2); I would like to see data(1,1,:) as a group of bars, and data(1,2,:) as another group and so on. Is it possible?

How do I determine whether a 3-dimensional vector is contained within the acute region formed by three other vectors?

孤街醉人 提交于 2020-01-24 22:07:54
问题 I'm working on a project in C# where I have three vectors in R3, and I need to find out if a third vector is contained within the region formed by those vectors. The three basis vectors have a maximum angle of 90 degrees between any two of them, and they are all normalized on the unit sphere. They can be negative. So far, I've tried matrix-vector multiplication to find the transformed coordinates of the vector. From there, I check whether all three components are positive. This method works

How do I determine whether a 3-dimensional vector is contained within the acute region formed by three other vectors?

青春壹個敷衍的年華 提交于 2020-01-24 22:07:33
问题 I'm working on a project in C# where I have three vectors in R3, and I need to find out if a third vector is contained within the region formed by those vectors. The three basis vectors have a maximum angle of 90 degrees between any two of them, and they are all normalized on the unit sphere. They can be negative. So far, I've tried matrix-vector multiplication to find the transformed coordinates of the vector. From there, I check whether all three components are positive. This method works

How do I take a 3d dimensional array and convert it into a model?

痞子三分冷 提交于 2020-01-24 14:25:08
问题 I'm using Open CV and I'm able to extract multidimensional data from and image with my codes but what would be an easy way to display it? I have a 3D array: line start [x] [y] [z] line end [x] [y] [z] Anything in between the lines will be filled with a solid flat surface. Is there some kind of function I can use to easily display a 3d image given these points or whatever other points I'm missing? Such as this pseudo code: display_3d(x,y,z,angle) Any help is highly appreciated. Also I'm using

OpenCV 3D Mat to Vector

二次信任 提交于 2020-01-24 12:53:52
问题 I have 3D Mat and would like to convert it to Vector. I tried opencv's reshape() function but it seems to not work with matrices that have dimensions more than 2. How can I convert to 3D Mat to Vector ? I can do it by accessing all elements in the Mat. Is there any efficient way? 回答1: If we have the following 3D matrix: const int ROWS=2, COLS=3, PLANES=4; int dims[3] = {ROWS, COLS, PLANES}; cv::Mat m = cv::Mat(3, dims, CV_32SC1); // works with other types (e.g. float, double,...) This only

Detect overlapping of rectangular prisms

空扰寡人 提交于 2020-01-24 04:56:25
问题 Given a 3D coordinate system and rectangular prisms with a non-negative starting point and a non-negative size (e.g. starts at (0, 2, 5) and has a size of (9, 20, 5) ): how can I best check if another rectangular prism intersects with one of the prisms already in the coordinate system? Eventually, the goal would be to perform this check for all prisms present, being able to test one should be sufficient to complete this task. Info: starting points and sizes are 3-tuples of non-negative longs.

工具导航Map