Skip to content

Instantly share code, notes, and snippets.

@kozenumezawa
kozenumezawa / todo.md
Created February 23, 2019 02:12
Things to do before I die
  • ハワイに行く
  • ウェイクボード
#-*- encoding: utf-8 -*-
"""
Usage:
query_bing_images.py <query>
query_bing_images.py -h | --help
query_bing_images.py --version
Options:
-h --help show this screen
@kozenumezawa
kozenumezawa / test.js
Created April 11, 2017 08:42
3D spline using three.js
this.path = new THREE.CatmullRomCurve3([
new THREE.Vector3(0, 60, 0),
new THREE.Vector3(-50, -40, -8),
new THREE.Vector3(-50, -40, 17),
new THREE.Vector3(-25, 2, 12),
new THREE.Vector3(-8, 2, 12),
new THREE.Vector3(8, -32, 8),
new THREE.Vector3(33, -40, 4),
new THREE.Vector3(50, -15, 0)
]);
@kozenumezawa
kozenumezawa / test.js
Created April 11, 2017 08:18
curved surface using three.js
const width2 = 100, height2 = 100, width_segments =1, height_segments = 100;
this.plane = new THREE.PlaneGeometry(width2, height2, width_segments, height_segments);
for(let i=0; i<this.plane.vertices.length/2; i++) {
this.plane.vertices[2*i].z = Math.pow(2, i/20);
this.plane.vertices[2*i+1].z = Math.pow(2, i/20);
}
this.mesh2 = new THREE.Mesh(this.plane, new THREE.MeshBasicMaterial({color: 0xffffff}));
this.mesh2.doubleSided = true;
this.mesh2.rotation.y = Math.PI/2-0.5;