Rotating Möbius-Strip in processing

Nikolaus Gradwohl2010-12-27T06:06:07+00:00

This is a rotating 3D Möbius-Strip in processing

Click here to try and download the source

Moebius

Tweet This! submit to reddit Digg! Tags: | 1 comments | no trackbacks

See also:

3D mushrooms in processing
foggy wood with recursive trees
isometric labyrinth
mesh made from hexagonal prism - another toxiclib experiment
sine function spider

Trackbacks

Comments

Leave a response

  1. alphachap 2011-01-17T15:09:10+00:00

    Added colors:

    float a = 0; void setup() { size(400,400,P3D); } void draw() { float f = map( mouseX, 0, width, -3, 3); float g = map( mouseY, 0, height, -3, 3); background(0); lights(); noStroke(); fill(128,255,0); float r = 100; translate( width/2, height/2 ); a += 0.01; rotateY( a ); rotateX( a ); beginShape( QUAD_STRIP ); for ( int i =0; i < 37; i++) { float x = fcos( radians( i * 5.0)) * 30; float z = gsin( radians( i * 5.0)) * 30; fill(256-256abs(18-i)/18,128,256abs(18-i)/18); float xa = ( r + x ) * cos( radians( i * 10.0 )); float ya = ( r + x ) * sin( radians( i * 10.0 )); float xb = ( r - x ) * cos( radians( i * 10.0 )); float yb = ( r - x ) * sin( radians( i * 10.0 )); vertex( xa, ya, z ); vertex( xb, yb,-z ); } endShape(CLOSE); }

Leave a comment