Subscribed unsubscribe Subscribe Subscribe

009_for_loop_3D_RGB_Box

create RGB Box with 3D array import processing.opengl.*; import igeo.*; size(960,720,IG.GL); int m = 20; // max double mi = 1.0/m; for (int i=0; i

008_for_loop_2D

create 2D list import processing.opengl.*; import igeo.*; size(960,720,IG.GL); for(int i=0; i < 10; i++){ for(int j=0; j < 10; j++){ new IPoint(i*10,j*10,0).clr(i*0.1,j*0.1,0); new IPoint(i*10,j*10,40).hsb(i*0.1,1,j*0.1); } }

007_for_loop

crate spiral (sin,cos)color mode clr(r,g,b,alpha) hsb(h,s,b,alpha) import processing.opengl.*; import igeo.*; int r = 30; // radius size(960,720,IG.GL); for (int i=0; i<100; i++){ new IPoint(sin(i*0.5)*r,cos(i*0.5)*r,i*5).clr(i*0.01,0,1-i*…

006_for_loop

use loop OpenGL error 1281 at top endDraw(): invalid value import processing.opengl.*; import igeo.*; size(960,720,IG.GL); for(int i=0; i<10; i++){ new IPoint(i, 0, 0).clr(0.1*i,1-0.1*i,0); }

005_ISurface

create NURBS surface import processing.opengl.*; import igeo.*; size(960,720,IG.GL); // 4 points in u direction, 3 points in v direction double[][][] controlPoints = {{{-30,-30, 10},{-30, 0,-20},{-30, 30, 0}}, {{ 0,-30,-10},{ 0, 20,-50},{ …

004_ISurface

create surface import processing.opengl.*; import igeo.*; /* create surface from 3 or 4 corner points */ size(960,720,IG.GL); new ISurface(0,0,0,40,40,40,80,0,0,40,-40,40).clr(1.0,0.8); // white // 3 corner points (triangle) new ISurface(-…

003_ICurve

create NURBS curves import processing.opengl.*; import igeo.*; size(960,720,IG.GL); // controlPoints as CP // make list and ceate curve // new ICurve(point list,degree) double[][] CP1 = {{0,0,0}, {20,20,20}, {-20,20,0}}; new ICurve(CP1, 2)…

002_ICurve

create line import processing.opengl.*; import igeo.*; size(960,720,IG.GL); new IPoint(0,0,0).clr(255,255,255); new ICurve(0,0,0, 30,30,30); //black new ICurve(0,-10,0, 30,10,20).clr(1.0,0,0); // red new ICurve(0,-20,0, 30,-10,10).clr(0,1.…

001_IPoint

create point objects import processing.opengl.*; import igeo.*; size( 960, 720, IG.GL ); new IPoint(0,0,0).clr(1.0,0,0); // red new IPoint(20,0,0).clr(0,1.0,0); // grren new IPoint(20,20,0).clr(0,0,1.0); // blue new IPoint(0,20,0);