Himadeus's diary

古典電子、多面体の研究

2013-01-01から1年間の記事一覧

Simplest Three.js sample

I try to write simplest Three.js sample. You can visit at http://www.nariuchi.com/3d/simple.html This page has only 40 lines of html and JavaScript code. <head>Simplest Three.js sample</head> <body onload="onLoad()"> <div id="ThreeCanvas" style="height:400px;width:400px"></div> </body>

Three.js, drawing cylinder with begin and end points

I could not find function to draw cilinder with begin and end points. I wrote a function with 3d matrics calculation. function createCylinder(x0,y0,z0,r0, x1,y1,z1,r1, col, open) { var v = new THREE.Vector3(x0-x1, y0-y1, z0-z1); var len = …