voxel

Best way to save data for re-use off an voxel editor

我怕爱的太早我们不能终老 提交于 2019-12-03 17:07:54
i'm planning on building a voxel editor (c++ and opengl) for personal use and i want to re-use the objects i build in later projects. The problem i came along is, i'm not sure whats the best way to save voxel data to files. I googled many sites and came across 'save as octree' and 'save as BSP tree' which one is better in your opinion and why? Thanks in advance. I would use Field3D , it's used by the biggest and best in the CG industry to store voxel data for fluidics simulations. All open-source of course. 来源: https://stackoverflow.com/questions/9227653/best-way-to-save-data-for-re-use-off-an

Know any voxel graphics C++ libraries? [closed]

只愿长相守 提交于 2019-12-03 04:35:00
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 years ago . So, I'm looking for a voxel graphic engine with C++ libraries (game oriented). Just for fun, it would be the first time I use a graphic library, so it doesn't have to be very complex or powerful, just easy to understand. 回答1: Bear in mind that voxels are just a concept. There are several ways of handling them as

Know any voxel graphics C++ libraries? [closed]

南笙酒味 提交于 2019-12-02 17:45:25
So, I'm looking for a voxel graphic engine with C++ libraries (game oriented). Just for fun, it would be the first time I use a graphic library, so it doesn't have to be very complex or powerful, just easy to understand. Bear in mind that voxels are just a concept. There are several ways of handling them as data, and several ways of visualizing them (extract geometry, raycasting, ...). It's a data point in a fixed-spaced grid, that's it. What this point represents or which geometric primitive you associate with it, that's totally implementation-specific. People usually visualize them as cubes

Constructing voxels of a 3D cube in MATLAB

假装没事ソ 提交于 2019-12-02 11:53:36
问题 I want to construct a 3D cube in MATLAB. I know that the units of any 3D shape are voxels not pixels. Here is what I want to do, First, I want to construct a cube with some given dimensions x, y, and z. Second, according to what I understand from different image processing tutorials, this cube must consists of voxels (3D pixels). I want to give every voxel an initial color value, say gray. Third, I want to access every voxel and change its color, but I want to distinguish the voxels that

Contour plot on the surface of a 3D cylinder

流过昼夜 提交于 2019-12-02 09:54:06
Because of your great help I can now plot a 3D cylinder with a hole inside :) This is my code: import numpy as np import matplotlib as mlp import matplotlib.pyplot as plt import mpl_toolkits.mplot3d.axes3d as axes3d inner_radius = 100 outer_radius = 300 height=50 # input xy coordinates input_xy = np.array([[ri,0],[ra,0],[ra,h],[ri,h],[ri,0]]) # radial component is x values of input r = xy[:,0] # angular component is one revolution of 30 steps phi = np.linspace(0, 2*np.pi, 30) # create grid R,Phi = np.meshgrid(r,phi) # transform to cartesian coordinates X = R*np.cos(Phi) Y = R*np.sin(Phi) # Z

How to scale the voxel-dimensions with Matplotlib?

半腔热情 提交于 2019-12-02 08:17:35
问题 Want to scale the voxel-dimensions with Matplotlib. How can I do this? import numpy as np import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D fig = plt.figure() ax = fig.gca(projection='3d') # Make grid test2 = np.zeros((6, 6, 6)) # Activate single Voxel test2[1, 0, 4] = True ax.voxels(test2, edgecolor="k") ax.set_xlabel('0 - Dim') ax.set_ylabel('1 - Dim') ax.set_zlabel('2 - Dim') plt.show() Instead the voxel on position (1,0,4). I want to scale it on (0.5,0,2). 回答1: You

How to scale the voxel-dimensions with Matplotlib?

柔情痞子 提交于 2019-12-02 08:05:30
Want to scale the voxel-dimensions with Matplotlib. How can I do this? import numpy as np import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D fig = plt.figure() ax = fig.gca(projection='3d') # Make grid test2 = np.zeros((6, 6, 6)) # Activate single Voxel test2[1, 0, 4] = True ax.voxels(test2, edgecolor="k") ax.set_xlabel('0 - Dim') ax.set_ylabel('1 - Dim') ax.set_zlabel('2 - Dim') plt.show() Instead the voxel on position (1,0,4). I want to scale it on (0.5,0,2). You can pass custom coordinates to the voxels function: API reference . import numpy as np import matplotlib

Constructing voxels of a 3D cube in MATLAB

余生长醉 提交于 2019-12-02 03:28:36
I want to construct a 3D cube in MATLAB. I know that the units of any 3D shape are voxels not pixels. Here is what I want to do, First, I want to construct a cube with some given dimensions x, y, and z. Second, according to what I understand from different image processing tutorials, this cube must consists of voxels (3D pixels). I want to give every voxel an initial color value, say gray. Third, I want to access every voxel and change its color, but I want to distinguish the voxels that represent the faces of the cube from those that represent the internal region . I want to axis every voxel

3D voxel Display in matlab

雨燕双飞 提交于 2019-12-01 05:45:00
I have a grid, it is 3D and it stores a number. Here is an example of my grid if it is 2*2*2: (:, :, 1) -> [0, 0; 0, 0] (:, :, 2) -> [0, 0; 0, 0] The number 0 would usually be a number that I would like to represent with colour or nan if no voxel exists there. What i would like to do is display a voxel grid with matlab like in the following picture: Except that the vocels should be coloured with the number in the cell. Does anyone know how to do this, if there is a library or some way to write it myself? So I found out you can do it like this: for x = 1:GridSize(1) for y = 1:GridSize(2) for z

Ray voxel intersection

∥☆過路亽.° 提交于 2019-12-01 05:32:41
I want to test for an intersection of a ray with a voxel field. I could naively crawl through the voxel field by calculating a ray-box intersection with the edge of the current voxel, then doing the same for the next voxel until I hit something. But isn't there a faster way to trace through a voxel field? I was thinking something along the lines of Bresenham's line algorithm in 3D, something that could quickly give me all of the cells a given line intersects. Anyone done this before? Due to certian limitations and the fact that these ray traces aren't happening that often, I do not want to