word里怎么画三棱锥,word基本棱锥图怎么增加层数

首页 > 经验 > 作者:YD1662024-02-12 03:54:14


修改detail值为5:

word里怎么画三棱锥,word基本棱锥图怎么增加层数(5)

4. 创建几何体的边缘(EdgesGeometry )2.4.1 边缘几何体说明

EdgesGeometry 通常基于其它几何体,用来生成边缘几何体图形。
其构造函数:

THREE.EdgesGeometry(geometry, thresholdAngle)

参数说明:

2.4.2 代码示例

const originalGeometry = new THREE.BoxGeometry(3, 3, 3); const edgesGeometry = new THREE.EdgesGeometry(originalGeometry); const material = new THREE.LineBasicMaterial({ color: 0xFFFF00 }); const myGeometry = new THREE.LineSegments(edgesGeometry, material); scene.add(myGeometry);

这里创建了一个立方体,边缘几何体基于立方体来创建,运行效果:

word里怎么画三棱锥,word基本棱锥图怎么增加层数(6)

5. 挤出几何体(ExtrudeGeometry )2.5.1 挤出几何体说明

挤出几何体是通过沿着轮廓路径将一个平面形状挤压而成的三维形状。这个类的构造函数接受两个主要参数:轮廓路径和挤出选项。
构造函数:

THREE.ExtrudeGeometry(shapes, options)

参数说明:

2.5.2 代码示例

const width = 3; const height = 1; const depth = 1; const extrudeAmount = 3; // 创建一个矩形轮廓 const rectShape = new THREE.Shape(); rectShape.moveTo(0, 0); rectShape.lineTo(0, height); rectShape.lineTo(width, height); rectShape.lineTo(width, 0); rectShape.lineTo(0, 0); // 设置挤出选项 const extrudeOptions = { amount: extrudeAmount, bevelEnabled: true, bevelSegments: 2, steps: 1, bevelSize: 0.5, bevelThickness: 0.5, }; // 创建 ExtrudeGeometry const geometry = new THREE.ExtrudeGeometry(rectShape, extrudeOptions); // 创建材质和网格 const material = new THREE.MeshBasicMaterial({ color: 0x00ffFF, wireframe: true }); const myGeometry = new THREE.Mesh(geometry, material); scene.add(myGeometry);

运行效果:

word里怎么画三棱锥,word基本棱锥图怎么增加层数(7)

6. 二十面体(IcosahedronGeometry)2.6.1 构造函数

THREE.IcosahedronGeometry(radius, detail)

参数说明:

2.6.2 代码示例

const radius = 1; const detail = 1; const icosahedronGeometry = new THREE.IcosahedronGeometry(radius, detail); const material = new THREE.MeshPhongMaterial({ color: 0x00ff00, wireframe: true }); const myGeometry = new THREE.Mesh(icosahedronGeometry, material); scene.add(myGeometry);

运行效果:

word里怎么画三棱锥,word基本棱锥图怎么增加层数(8)

上一页12345下一页

栏目热文

文档排行

本站推荐

Copyright © 2018 - 2021 www.yd166.com., All Rights Reserved.