|
Author |
Topic: vertex coloring issue with beginShape(LINE_STRIP) (Read 2491 times) |
|
flight404
|
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
|
Re: vertex coloring issue with beginShape(LINE_STR
« Reply #2 on: May 24th, 2004, 12:15am » |
|
Also works correctly in 068.
|
|
|
|
fry
|
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
|
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.
|
|
|
|
|