cleaning up bug lists for arielm

This commit is contained in:
benfry
2003-06-07 17:15:19 +00:00
parent 40333c9861
commit 31b56cd156
2 changed files with 24 additions and 304 deletions

View File

@@ -100,63 +100,6 @@ void loop()
}
...............................................................
FIXES
.....
in example 'image10', the imported .gif are smoothed. fine, but when,
noSmooth() is called in setup, the images no longer display.
.....
you put contrain in the superclass and declared it final.
examples using contrain function will no longer compile.
.....
typography has troubles. look at 'typography03' for the clearest example.
.....
learning more about images. they no longer draw if noSmooth() is called.
this also applies for fonts.
size(200, 200);
//noSmooth();
BImage a; // Declare variable "a" of type BImage
a = loadImage("arch.jpg"); // Load the images into the program
image(a, 0, 0); // Displays the image from point (0,0)
.....
wow! look at 'color01'. that's alot of smoothing goin' on.
/ / / / / / / / / / / /
4 of the examples stopped compiling (for the same reason) with their port to
version 47/48
the error is:
Cannot find class "color" [JLS 8]
it has something to do with confusion in passing colors into methods and
classes.
the examples affected:
drawing 02
input09
input08
transform05
/ / / / / / / / / / / /
@@ -289,244 +232,3 @@ class Point
}
................................................................
_ can't used random() inside constructor.. (Glen Murphy)
_ maybe related to problems loading images in constructors
_ check output from file that's created.. seems to fail silently(?)
While I've used random() in other projects often without fail, if I uncomment the 'float r = random(50);', the applet window fails to appear, with no error messages.
(this code is a mutilated version of working code, just to show the error).
int WIDTH = 500;
int HEIGHT = 500;
int NUMMINES = 6;
Mine mine[] = new Mine[NUMMINES];
class Mine {
int NUMSPOKES = 12;
float x, y, size;
Spoke spoke[] = new Spoke[NUMSPOKES];
Mine(float xIn, float yIn, float sizeIn) {
x = xIn;
y = yIn;
size = sizeIn;
for(int i = 0; i < NUMSPOKES; i++) {
//float r = random(50);
spoke[i] = new Spoke(size+i, i*5, i);
}
}
}
class Spoke {
float dist, dir, dirVel;
Spoke(float distIn, float dirIn, float dirVelIn) {
}
}
void setup() {
size(500,500);
ellipseMode(CENTER_DIAMETER);
for(int i = 0; i < NUMMINES; i++) {
mine[i] = new Mine(random(0,WIDTH), random(0,HEIGHT), random(10,30));
}
}
void loop() {
}
........................................................................
From mike@lightcycle.org Wed Nov 27 09:48:09 2002
Date: Tue, 26 Nov 2002 22:26:35 -0800
From: <mike@lightcycle.org>
To: bugs@proce55ing.net
Subject: Error during export.
During export, I've recieved the message "Error while compiling, please
send code to bugs@proce55ing.net". The following code runs, but doesn't
export in 0044 or 0046.
I wonder if it has anything to do with my vector2d class - Java has a
class Vector2d, but it is in javax.vecmath.Vector2d and the case is
differant.
Thanks,
Mike Davis
int n = 8;
swimmer[] s;
float viscousness = 0.3;
float drag = 0.1;
void setup()
{
size(300, 300);
background(255);
stroke(0);
noFill();
s = new swimmer[n];
for (int i = 0; i < n; i++)
s[i] = new swimmer((float)(i + 1)/(n+1) * width, 7*height/8, (i+1) *
0.05);
}
void loop()
{
for (int i = 0; i < n; i++) s[i].step();
}
class vector2d
{
float x, y;
vector2d(float x, float y)
{
this.x = x;
this.y = y;
}
}
vector2d addv(vector2d a, vector2d b)
{
return new vector2d(a.x + b.x, a.y + b.y);
}
vector2d unitv(vector2d a)
{
vector2d b = a;
float length = sqrt(sq(b.x)+sq(b.y));
b.x = b.x / length;
b.y = b.y / length;
return b;
}
vector2d scalev(vector2d a, float scalar)
{
vector2d b = a;
b.x = b.x * scalar;
b.y = b.y * scalar;
return b;
}
vector2d perpv(vector2d a)
{
vector2d b = new vector2d(a.y, -a.x);
return b;
}
class paddle
{
float x1, y1, x2, y2;
vector2d force, forceat;
paddle(float x1, float y1, float x2, float y2)
{
this.x1 = x1;
this.y1 = y1;
this.x2 = x2;
this.y2 = y2;
force = new vector2d(0, 0);
forceat = new vector2d(0, 0);
}
void moveto(float x1, float y1, float x2, float y2)
{
float f = viscousness *
0.5*((this.x1*this.y2+this.x2*y2+x2*y1+x1*this.y1)-(this.y1*this.x2+this.y2*x2+y2*x1+y1*this.x1));
float midx1 = (this.x1 + x1) / 2;
float midy1 = (this.y1 + y1) / 2;
float midx2 = (this.x2 + x2) / 2;
float midy2 = (this.y2 + y2) / 2;
forceat = new vector2d((midx1 + midx2) / 2, (midy1 + midy2) / 2);
vector2d m = new vector2d(midx2-midx1, midy2-midy1);
force = scalev(unitv(perpv(m)), f);
this.x1 = x1;
this.y1 = y1;
this.x2 = x2;
this.y2 = y2;
}
void draw()
{
line(this.x1, this.y1, this.x2, this.y2);
}
void drawforce()
{
line(forceat.x, forceat.y, forceat.x + force.x, forceat.y + force.y);
}
}
class swimmer
{
paddle p1, p2;
float t = 0;
float mass = 10;
float angle;
float speed;
vector2d position, velocity, acceleration;
swimmer(float x, float y, float s)
{
speed = s;
p1 = new paddle(0, 0, 10, 0);
p2 = new paddle(0, 0, -10, 0);
position = new vector2d(x, y);
velocity = new vector2d(0, 0);
acceleration = new vector2d(0, 0);
}
void step()
{
t += speed;
p1.moveto(0, 0, -20 * abs(cos(t)/2 + 0.5), 20 * sin(t));
p2.moveto(0, 0, 20 * abs(cos(t)/2 + 0.5), 20 * sin(t));
push();
translate(position.x, position.y);
p1.draw();
p2.draw();
acceleration = scalev(addv(p1.force, p2.force), 1/mass);
velocity = addv(velocity, acceleration);
position = addv(position, velocity);
velocity = scalev(velocity, drag);
if (mousePressed)
{
stroke(255, 0, 0);
p1.drawforce();
p2.drawforce();
stroke(0);
}
while (position.x < 0) position.x += width;
while (position.x >= width) position.x -= width;
while (position.y < 0) position.y += height;
while (position.y >= height) position.y -= height;
pop();
}
}
........................................................................
bug in comments
rev: 0046, w2k
sometimes (never when creating a new sketch, only when an old one has been loaded), if I try to add a comment to identify the end of a method class, ie like
void Sample ()
{
<basic code here>
} // end of Sample handler
P5 return me an unexpected 'handler' token error!
And when I change this comment to
} /* end of Sample handler */
everything comes back to normal?!
This don't happen everytimes.. but once it started, the error stay there!
Just try it in your next sketchbook, add some comments at the end of your methods, and see what happen

View File

@@ -54,6 +54,12 @@ BAGEL / Bugs
b _ single pixel lines have no alpha and no z
b _ fix all the random line types to support alpha
b _ anti-aliasing. smooth(), noSmooth()
b _ need to verify that this works consistently throughout
b _ alpha. fill(r, g, b, a), stroke(r, g, b, a),
b _ need to verify that this works consistently throughout
BAGEL / Graphics API Additions
@@ -96,12 +102,6 @@ bf b _ also BLight with same constructor, and on() and off() fxn
BAGEL / Rendering
b _ anti-aliasing. smooth(), noSmooth()
b _ need to verify that this works consistently throughout
b _ alpha. fill(r, g, b, a), stroke(r, g, b, a),
b _ need to verify that this works consistently throughout
b _ shape.. non-homogenous colors for beginShape()
b _ currently disabled b/c homogenousColors not set false for vertices
b _ and code not written for curve vertices
@@ -317,6 +317,24 @@ bf b _ separate compiler from other kjc-specific code
bf b _ change writeJava/start functions to be combined in kjc
bf b _ but the rest inside PdeEditor that takes care of launching/placing
b _ bug in comments
sometimes (never when creating a new sketch, only when an old one has been loaded), if I try to add a comment to identify the end of a method class, ie like
void Sample ()
{
<basic code here>
} // end of Sample handler
P5 return me an unexpected 'handler' token error!
And when I change this comment to
} /* end of Sample handler */
everything comes back to normal?!
This don't happen everytimes.. but once it started, the error stay there!
Just try it in your next sketchbook, add some comments at the end of your methods, and see what happen
b _ foreach implementation, via java 1.5
b _ http://jcp.org/aboutJava/communityprocess/jsr/tiger/enhanced-for.html