Skip to content

Instantly share code, notes, and snippets.

View cyc1am3n's full-sized avatar
๐Ÿฆ

Daeyoung Kim cyc1am3n

๐Ÿฆ
View GitHub Profile
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
function RollerCoasterGeometry( curve, divisions ) {
THREE.BufferGeometry.call( this );
var vertices = [];
var normals = [];
var colors = [];
//๋ ˆ์ผ ๊ทธ๋ฆด ๋•Œ ํ•„์š”ํ•œ ์ƒ‰
var color1 = [ 1, 1, 1 ]; //ํ•˜์–€์ƒ‰
rollercoastergeometry ์•ˆ์—
var sides = 5;
var step1 = [ ];
for ( var i = 0; i < sides; i ++ ) {
var angle = ( i / sides ) * PI2; //angle์ด 72, 144, 216, 288, 360 ๋‹ค์„ฏ ๊ฐ€์ง€๊ฐ€ ๋จ
step1.push( new THREE.Vector3(0 , Math.sin( angle ) * 0.02, Math.cos( angle ) * 0.02 ) );
}
/**
* @author mrdoob / http://mrdoob.com/
*/
function RollerCoasterGeometry( curve, divisions ) {
THREE.BufferGeometry.call( this );
var vertices = [];
var normals = [];
#include <stdio.h>
int main(int argc, char* argv[])
{
int sum = 0;
for( int i = 1 ; i <= 100 ; i ++ ){
sum = sum + i;
}
printf("1 to 100 sum = %d\n");
}