6
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

【ネタ】正六面体をクリスタルみたいに立てようとしたら失敗した件

Last updated at Posted at 2019-07-26

image.png
ラミエル。君は正八面体だったんだね

※この記事はネタなので答え合わせはありません

こうしたかった

cube.gif

最初に考えたやりかた

image.pngまずX軸を45度傾ける。

image.pngZ軸も45度傾ける?(脳内では左の図は正方形にみえてる)


	let box = new THREE.LineSegments(
		new THREE.EdgesGeometry(new THREE.BoxBufferGeometry(160, 160, 160)),
		new THREE.MeshLambertMaterial({color: "black"})
	);
	//X軸で45度傾ける
	box.rotation.set(deg2rad(45), 0, 0);
	//(ワールド座標系の)Z軸で45度傾ける
	let axis = new THREE.Vector3(0, 0, 1);
	box.rotateOnWorldAxis(axis, deg2rad(45));

なぜこうなった!!

cube2.gif

算数のお勉強を復習しなきゃ・・・(´・ω・`)

6
0
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
6
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?