threejs 画二维圆(圆弧)
var radius = 40,
segments = 64,
material = new THREE.LineBasicMaterial({ color: 0x0000ff }),
geometry = new THREE.CircleGeometry(radius, segments); // Remove center vertex
geometry.vertices.shift(); this.scene.add(new THREE.Line(geometry, material));
this.scene.add(new THREE.LineLoop(geometry, material));
let points = [],
length = 100,
circle = 40;
for (let i = 0; i <= length; i++) {
points.push(new THREE.Vector2(circle * Math.cos(Math.PI * 2 * i / length), circle * Math.sin(Math.PI * 2 * i / length)))
}
let shape = new THREE.Shape(points);
let arcGeometry = shape.makeGeometry()
let arcMaterial = new THREE.LineBasicMaterial({ color: 0x38d3f5 });
let arc = new THREE.Line(arcGeometry, arcMaterial);
this.scene.add(arc)
threejs 画二维圆(圆弧)的更多相关文章
- vue 画二维码
首先安装一下相关的插件 qrcode2 npm install --save qrcode2 然后在需要画二维码的页面引入一下 import QRCode from 'qrcode2' 最后在meth ...
- matplotlib---插值画二维、三维图
一.画二维图 1.原始数据(x,y) import matplotlib.pyplot as plt import numpy as np #数据 X = np.array(list(i for i ...
- matlab画二维直方图以及双y轴坐标如何修改另一边y轴的颜色
1.首先讲一下如何用hist画二维直方图 x=[- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ...
- MFC画二维动态图表[GDI]
源博客:http://www.codeproject.com/Articles/9350/2D-Animated-Charts 源代码:http://download.csdn.net/detail/ ...
- matlab 画二维图与三维图
二维图 ezplot('sin(x)');%默认范围 ezplot('sin(x)',[-4 4]);%自己设定范围 三维图 ezmesh('x*x+y*y');%默认范围
- js通过codeURL画二维码
一.函数封装 //生成微信二维码 function xyqrcode(options) { var settings = { dom:'', render: 'canvas', //生成二维码的格式还 ...
- python3怎样画二维点图
引用自:http://www.cnblogs.com/super-zhang-828/p/4792206.html import matplotlib.pyplot as pltplt.plot([1 ...
- pgfplots画二维图真的很方便,多例比较
%直接PDFLATEX编译即可\documentclass[border=1mm]{standalone}\usepackage{tkz-euclide,pgfplots}\begin{documen ...
- java画海报二维码
package cn.com.yitong.ares.qrcode; import java.awt.BasicStroke;import java.awt.Color;import java.awt ...
随机推荐
- 解题报告:hdu1008 Elvator
2017-09-07 19:30:22 writer:pprp 比较顺利,最近生活出现了各种问题, 发生了很多矛盾,我要耐下心来,最重要的不是努力不努力,而是选择 希望我能处理好人际关系还有学业上的压 ...
- SpringBoot项目结构介绍
一项目结构介绍 springboot框架本身对项目结构并没有特别的要求,但是按照最佳的项目结构可以帮助我们减少可能遇到的错误问题.结构如下: (1)应用主类SpringbootApplication应 ...
- mac 中终端查看ip 采用 ifconfig
- 【Python】模块学习之(__call__)实现准确计算函数运行时间
背景 博主在写自动化的过程中,有遇到有的用例运行缓慢的问题,想起在上一家公司的的“自动化工厂”有一个指标:两小时内运行完所有的用例才算合格.所以想计算每一个用例的运行时间. 思路 因为使用的POM模型 ...
- 深入理解AUC
https://tracholar.github.io/machine-learning/2018/01/26/auc.html 我觉得作者写的很不错
- LeetCode 380. Insert Delete GetRandom O(1)
380. Insert Delete GetRandom O(1) Add to List Description Submission Solutions Total Accepted: 21771 ...
- OpenCL双边滤波实现美颜功能
OpenCL是一个并行异构计算的框架,包括intel,AMD,英伟达等等许多厂家都有对它的支持,不过英伟达只到1.2版本,主要发展自己的CUDA去了.虽然没有用过CUDA,但个人感觉CUDA比Open ...
- 使用 C++ 多态时需要注意的问题
本文为大便一箩筐的原创内容,转载请注明出处,谢谢:http://www.cnblogs.com/dbylk/ 最近工作中遇到一些关于使用多态的细节问题,在此记录一下. 一.多态和模板匹配 模板是 C+ ...
- Android SDK无法更新解决办法
一.设置SDK代理 启动Android SDK Manager,选择菜单 Tools ->Options -> 代理地址: mirrors.opencas.cn 代理端口: 80 如下图: ...
- 访问IO设备
http://blog.csdn.net/goodluckwhh/article/details/16986871 内存屏障主要解决的问题是编译器的优化和CPU的乱序执行.编译器在优化的时候,生成的汇 ...