3d

Debugging a working program on Mathematica 5 with Mathematica 7

前提是你 提交于 2020-02-02 11:24:24
问题 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

How to make a 3D model from AVDepthData?

扶醉桌前 提交于 2020-01-31 04:01:06
问题 I’m interested in the issue of data processing from TrueDepth Camera. It is necessary to obtain the data of a person’s face, build a 3D model of the face and save this model in an .obj file. Since in the 3D model needed presence of the person’s eyes and teeth, then ARKit / SceneKit is not suitable, because ARKit / SceneKit do not fill these areas with data. But with the help of the SceneKit.ModelIO library, I managed to export ARSCNView.scene (type SCNScene) in the .obj format. I tried to

Unity3D 开发之shader教程(浅谈GPU渲染入门)

前提是你 提交于 2020-01-31 01:15:23
  尊重他人智慧成果,欢迎转载,请注明作者 心若透明,原文地址 http://www.cnblogs.com/ubanck/p/4109411.html   这篇随笔,就不按照各种专业的解释来描述了,完全看自己发挥吧,写到哪儿算哪儿。若是哪里有说的不对的地方,请各位看官直说无妨!   说到游戏研发,就不可避免会提到图形学,图形学里面细去研究,就会牵涉到各种各样的数学知识,向量,矩阵之类的!而到这儿,咱们先开始从shader谈起,什么是shader?咱们通常说写个shader,其实也就是写了一个执行某种功能的程序,跟你写个普通的程序原理上说一样的,而不同之处在于,shader是写个GPU执行的,说到GPU执行,那么就得谈到3D游戏里面的那些人物啊,花鸟啊,是怎么看到的,或者说的专业一点,叫做渲染出来的!   如果在2D上面,很简单,完全可以看作是一张图贴在屏幕上就OK。在3D上面,就复杂了一点,首先,我们的屏幕上2D的,不像现实世界,是三维空间!那么怎么在屏幕上画东西才能看上去有3D效果呢,你可以试试在纸上画一个立方体,学过数学都会画,你第一眼看上去就会觉得这是3D的,而不是一个简单的矩形!     模型坐标系:在计算机的3D世界里,也是通过这样一种东西来实现了3D效果。如果在计算机屏幕上面绘制3D模型,那么我们首先在3D软件上制作出这个模型,这个模型会有一个原点,来建一个坐标系

(How) can a shader view the current render-buffer?

拈花ヽ惹草 提交于 2020-01-30 09:12:06
问题 Is it possible for a pixel shader to see the current state of the depth/color/stencil buffer? 回答1: A fragment shader is not given the current buffer values for the fragment it is working on. Attempts to read these values, by using those buffers as textures, will not in the general case produce reasonable results. It's "undefined behavior." There are certain specific cases where it can work. First, you can use texture barriers. That is technically an NVIDIA extension, but ATI supports it

【3D目标检测】Frustum PointNets

十年热恋 提交于 2020-01-28 23:50:40
《Frustum PointNets for 3D Object Detection from RGB-D Data》论文笔记 一、论文思路 二、模型介绍 2.1 模型结构 2.2 实现细节 2.2.1 Frustum Proposal 2.2.2 3D Instance Segmentation 2.2.3 Amodal 3D Box Estimation 2.2.4 模型结构 2.2.5 损失函数 三、实验结果 代码 论文 一、论文思路 本文先通过2D模型通过图像生成2D的bounding box,再通过frustum(平截头体)的方式去映射成一个3D的候选区域。在模型的第二阶段,本文使用3D基于点云的模型(如PointNet和PointNet++)去对 上一阶段frustum找出的候选区域进行实例分割和最终3D bounding box的回归。 二、模型介绍 2.1 模型结构 从图中的第一部分可以看出,该模型首先通过一个2D的CNN去得到一个物体2D的bounding box和它的类别,然后将2D的bounding box映射成一个3D的frustum proposal。 图中的第二部分是一个实例分割的网络,可以将上一步frustum proposal中的点采样到 N × C N\times C N × C ,其中 N N N 是点的个数, C C C 是每个点的特征维度

3d image visualisation with numpy/vtk

情到浓时终转凉″ 提交于 2020-01-26 04:29:25
问题 I'm trying to display further images (ct-scan) using numpy/vtk as describe in this sample code (http://www.vtk.org/Wiki/VTK/Examples/Python/vtkWithNumpy) but I don't get it and don't know why. If someone could help me it would be kind. Here's my code : import vtk import numpy as np import os import cv, cv2 import matplotlib.pyplot as plt import PIL import Image DEBUG =True directory="splitted_mri/" w = 226 h = 186 d = 27 stack = np.zeros((w,d,h)) k=-1 #add the next picture in a differente

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?