虽然这已成为一个主题,但尚未得到回答.我收到以下导入错误我刚刚从EPD安装了机盖,在我安装它之后,它不断出现以下错误:
IPython 2.1.0 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help -> Python's own help system.
object? -> Details about 'object', use 'object??' for extra details.
[TerminalIPythonApp] WARNING | Eventloop or matplotlib integration failed. Is matplotlib installed?
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
/home/rhys/Documents/Uni_work/Year_2_research_placement/User/lib/python2.7/site-packages/IPython/core/shellapp.pyc in <lambda>(key)
231 shell = self.shell
232 if self.pylab:
--> 233 enable = lambda key: shell.enable_pylab(key, import_all=self.pylab_import_all)
234 key = self.pylab
235 elif self.matplotlib:
/home/rhys/Documents/Uni_work/Year_2_research_placement/User/lib/python2.7/site-packages/IPython/core/interactiveshell.pyc …
Run Code Online (Sandbox Code Playgroud) 我试图制作一个显示许多球形对象的三个 js 文档,最快的方法是使用缓冲区几何。从这里的这篇文章中,我了解到我可以使用以下方法将普通几何体转换为缓冲几何体:
var sphere = new THREE.SphereGeometry( 4, 0.05, 0.025 );
var geometry = THREE.BufferGeometryUtils.fromGeometry( sphere );
Run Code Online (Sandbox Code Playgroud)
但这对我来说似乎不起作用,创建对象的其余代码如下:
var positions = new Float32Array( x_GAMA.length * 3 );
for ( var i = 0; i < x_GAMA.length; i += 1 ) {
// positions
positions[ 3*i ] = x_GAMA[i]*10000;
positions[ 3*i + 1 ] = y_GAMA[i]*10000;
positions[ 3*i + 2 ] = z_GAMA[i]*10000;
}
geometry.addAttribute( 'position', new THREE.BufferAttribute( positions, 3 ) );
var material = new …
Run Code Online (Sandbox Code Playgroud)