FAQ
Cover
This is the archive Discourse for the Processing (ALPHA) software.
Please visit the new Processing forum for current information.

   Processing 1.0 _ALPHA_
   Bugs
   Bug Fixes, Implemented Suggestions
(Moderator: fry)
   vertex coloring issue with beginShape(LINE_STRIP)
« Previous topic | Next topic »

Pages: 1 
   Author  Topic: vertex coloring issue with beginShape(LINE_STRIP)  (Read 2491 times)
arielm

WWW
vertex coloring issue with beginShape(LINE_STRIP)
« on: May 23rd, 2004, 11:49pm »

when using beginShape() with LINE_STRIPS: results can be different between versions 066 and 069, as described here:
 
http://processing.org/discourse/yabb/board_Programs_action_disp_lay_num_1085284045.html
 

Ariel Malka | www.chronotext.org
flight404

WWW Email
Re: vertex coloring issue with beginShape(LINE_STR
« Reply #1 on: May 24th, 2004, 12:00am »

Here is a sample...
 
Code:

// streamlined code by TomC based on this example: www.flight404.com/p5/radial_0
int   NUM_SPOKES   = 36;  
float SPIKE_LENGTH = 125.0;  
 
void setup() {  
  size(400,300);  
}  
 
void loop() {  
   
  background(0);  
   
  translate(width/2,height/2);  
  rotateY(TWO_PI*mouseX/width);  
  rotateZ(TWO_PI*mouseY/height);  
 
  for (int i = 0; i < NUM_SPOKES; i++) {  
    push();  
    rotateX(i*TWO_PI/NUM_SPOKES);  
    beginShape(LINE_STRIP);  
    stroke(0);  
    vertex(0,0,0);  
    stroke(255);  
    vertex(0,0,SPIKE_LENGTH);  
    endShape();  
    pop();  
  }   
}  

 
According to the code, the spokes should be darker in the middle and lighter on the outside.  When I paste the code above into v.69, I get this result...
 
http://www.flight404.com/p5/radialProblem.gif
 
...where the color information is opposite of what would be expected to the left of center.  Ariel pasted same code into v.66 and it worked like it should have.
 
 
TomC

WWW
Re: vertex coloring issue with beginShape(LINE_STR
« Reply #2 on: May 24th, 2004, 12:15am »

Also works correctly in 068.
 
fry


WWW
Re: vertex coloring issue with beginShape(LINE_STR
« Reply #3 on: Jun 11th, 2004, 6:57pm »

ah, one more problem with the line code. ugh. the difference between versions are different renditions of the code. maybe we should move backwards.
 
fry


WWW
Re: vertex coloring issue with beginShape(LINE_STR
« Reply #4 on: Jul 13th, 2004, 5:59am »

found and fixed for megabucket. turned out to be a buggy li'l hack to fix another bug. whups.
 
Pages: 1 

« Previous topic | Next topic »