diff --git a/core/src/processing/core/PApplet.java b/core/src/processing/core/PApplet.java index 47d93550a..ade76ca51 100644 --- a/core/src/processing/core/PApplet.java +++ b/core/src/processing/core/PApplet.java @@ -10262,6 +10262,7 @@ public class PApplet extends Applet * * @webref shape:3d_primitives * @param r the radius of the sphere + * @see PGraphics#sphereDetail(int) */ public void sphere(float r) { if (recorder != null) recorder.sphere(r); diff --git a/core/src/processing/core/PGraphics.java b/core/src/processing/core/PGraphics.java index db4b8d11f..af61fa1e7 100644 --- a/core/src/processing/core/PGraphics.java +++ b/core/src/processing/core/PGraphics.java @@ -2372,6 +2372,7 @@ public class PGraphics extends PImage implements PConstants { * * @webref shape:3d_primitives * @param r the radius of the sphere + * @see PGraphics#sphereDetail(int) */ public void sphere(float r) { if ((sphereDetailU < 3) || (sphereDetailV < 2)) { diff --git a/java/examples/Topics/Fractals and L-Systems/Mandelbrot/Mandelbrot.pde b/java/examples/Topics/Fractals and L-Systems/Mandelbrot/Mandelbrot.pde index 7eafbf2e2..f0c666d73 100644 --- a/java/examples/Topics/Fractals and L-Systems/Mandelbrot/Mandelbrot.pde +++ b/java/examples/Topics/Fractals and L-Systems/Mandelbrot/Mandelbrot.pde @@ -5,18 +5,20 @@ * Simple rendering of the Mandelbrot set. */ + // Establish a range of values on the complex plane // A different range will allow us to "zoom" in or out on the fractal // float xmin = -1.5; float ymin = -.1; float wh = 0.15; -float xmin = -2.5; -float ymin = -2; -float wh = 4; +float xmin = -3; +float ymin = -1.25; +float w = 5; +float h = 2.5; size(640, 360); noLoop(); background(255); -// Make sure we can write to the pixels[] array. +// Make sure we can write to the pixels[] array. // Only need to do this once since we don't do any other drawing. loadPixels(); @@ -24,9 +26,9 @@ loadPixels(); int maxiterations = 100; // x goes from xmin to xmax -float xmax = xmin + wh; +float xmax = xmin + w; // y goes from ymin to ymax -float ymax = ymin + wh; +float ymax = ymin + h; // Calculate amount we increment x,y for each pixel float dx = (xmax - xmin) / (width); @@ -59,8 +61,8 @@ for (int j = 0; j < height; j++) { // We color each pixel based on how long it takes to get to infinity // If we never got there, let's pick the color black if (n == maxiterations) { - pixels[i+j*width] = 0; - } + pixels[i+j*width] = color(0); + } else { // Gosh, we could make fancy colors here if we wanted pixels[i+j*width] = color(n*16 % 255); diff --git a/java/examples/Topics/Simulate/Spring/Spring.pde b/java/examples/Topics/Simulate/Spring/Spring.pde index 1310faae7..1e28a40b5 100644 --- a/java/examples/Topics/Simulate/Spring/Spring.pde +++ b/java/examples/Topics/Simulate/Spring/Spring.pde @@ -5,7 +5,7 @@ */ // Spring drawing constants for top bar -int springHeight = 16; // Height +int springHeight = 32; // Height int left; // Left position int right; // Right position int max = 200; // Maximum Y value diff --git a/java/libraries/net/src/processing/net/Client.java b/java/libraries/net/src/processing/net/Client.java index 983bc0b90..e4c356f9c 100644 --- a/java/libraries/net/src/processing/net/Client.java +++ b/java/libraries/net/src/processing/net/Client.java @@ -31,7 +31,13 @@ import java.lang.reflect.*; import java.net.*; /** - * @generate Client.xml + * ( begin auto-generated from Client.xml ) + * + * A client connects to a server and sends data back and forth. If anything + * goes wrong with the connection, for example the host is not there or is + * listening on a different port, an exception is thrown. + * + * ( end auto-generated ) * @webref net * @brief The client class is used to create client Objects which connect to a server to exchange data. * @instanceName client any variable of type Client @@ -57,7 +63,6 @@ public class Client implements Runnable { int bufferLast; /** - * * @param parent typically use "this" * @param host address of the server * @param port port to read/write from on the server @@ -122,7 +127,12 @@ public class Client implements Runnable { /** - * @generate Client_stop.xml + * ( begin auto-generated from Client_stop.xml ) + * + * Disconnects from the server. Use to shut the connection when you're + * finished with the Client. + * + * ( end auto-generated ) * @webref client:client * @brief Disconnects from the server * @usage application @@ -219,7 +229,11 @@ public class Client implements Runnable { /** - * @generate Client_ip.xml + * ( begin auto-generated from Client_ip.xml ) + * + * Returns the IP address of the computer to which the Client is attached. + * + * ( end auto-generated ) * @webref client:client * @usage application * @brief Returns the IP address of the machine as a String @@ -230,7 +244,12 @@ public class Client implements Runnable { /** - * @generate Client_available.xml + * ( begin auto-generated from Client_available.xml ) + * + * Returns the number of bytes available. When any client has bytes + * available from the server, it returns the number of bytes. + * + * ( end auto-generated ) * @webref client:client * @usage application * @brief Returns the number of bytes in the buffer waiting to be read @@ -241,7 +260,11 @@ public class Client implements Runnable { /** - * @generate Client_clear.xml + * ( begin auto-generated from Client_clear.xml ) + * + * Empty the buffer, removes all the data stored there. + * + * ( end auto-generated ) * @webref client:client * @usage application * @brief Clears the buffer @@ -253,7 +276,13 @@ public class Client implements Runnable { /** - * @generate Client_read.xml + * ( begin auto-generated from Client_read.xml ) + * + * Returns a number between 0 and 255 for the next byte that's waiting in + * the buffer. Returns -1 if there is no byte, although this should be + * avoided by first cheacking available() to see if any data is available. + * + * ( end auto-generated ) * @webref client:client * @usage application * @brief Returns a value from the buffer @@ -273,7 +302,12 @@ public class Client implements Runnable { /** - * @generate Client_readChar.xml + * ( begin auto-generated from Client_readChar.xml ) + * + * Returns the next byte in the buffer as a char. Returns -1 or 0xffff if + * nothing is there. + * + * ( end auto-generated ) * @webref client:client * @usage application * @brief Returns the next byte in the buffer as a char @@ -285,7 +319,17 @@ public class Client implements Runnable { /** - * @generate Client_readBytes.xml + * ( begin auto-generated from Client_readBytes.xml ) + * + * Reads a group of bytes from the buffer. The version with no parameters + * returns a byte array of all data in the buffer. This is not efficient, + * but is easy to use. The version with the byteBuffer parameter is + * more memory and time efficient. It grabs the data in the buffer and puts + * it into the byte array passed in and returns an int value for the number + * of bytes read. If more bytes are available than can fit into the + * byteBuffer, only those that fit are read. + * + * ( end auto-generated ) *