|
Author |
Topic: inconsistent transparency (Read 400 times) |
|
mad
|
inconsistent transparency
« on: Jan 17th, 2005, 8:20pm » |
|
The sketch includes a partially transparent half-plane, and a hinged square that rotates above and below the plane. The square should occlude the plane for half its rotation, and be occluded for the other half. Instead, the square is always partially occluded. p5 0068 Win2000 SP4 on p3 Mobile float angle = 0.0; color red; void setup() { size(200, 200); colorMode(HSB, 100); red = color(0, 80, 80); noStroke(); } void loop() { translate(0,0,0); background(0); push(); fill(red); translate(width/3, height/2, 0); rotateX(angle); rect(0, 0, width/3, height/3); pop(); fill(0, 0, 80, 50); rect(width/2, 0, width/2, height); angle += PI/300; }
|
|
|
|
|