For example, if Tom and Mike enter a contract stating that Mike will pay Tom to rob a bank and share the profits, this contract is void and unenforceable from the start because the subject matter is illegal.
Biteable features millions of clips in its own library that users can use, as well as various templates for creating things like animated logos or presentations. You can share directly to sites like YouTube and Facebook from Biteable and the free plan offers unlimited exports and access to a huge library of stock content to use.
clip share nulled and void
Usage: PApplet [options] [sketch args] The [options] are one or several of the parameters seen below. The class name is required. If you're running outside the PDE and your class is in a package, this should include the full name. That means that if the class is called Sketchy and the package is com.sketchycompany then com.sketchycompany.Sketchy should be used as the class name. The [sketch args] are any command line parameters you want to send to the sketch itself. These will be passed into the args[] array in PApplet. The simplest way to turn and sketch into an application is to add the following code to your program: static public void main(String args[]) PApplet.main("YourSketchName"); That will properly launch your code from a double-clickable .jar or from the command line. Parameters useful for launching or also used by the PDE: --location=x,y Upper-lefthand corner of where the applet should appear on screen. If not used, the default is to center on the main screen. --present Presentation mode: blanks the entire screen and shows the sketch by itself. If the sketch is smaller than the screen, the background around it will use the --window-color setting. --hide-stop Use to hide the stop button in situations where you don't want to allow users to exit. also see the FAQ on information for capturing the ESC key when running in presentation mode. --stop-color=#xxxxxx Color of the 'stop' text used to quit an sketch when it's in present mode. --window-color=#xxxxxx Background color of the window. The color used around the sketch when it's smaller than the minimum window size for the OS, and the matte color when using 'present' mode. --sketch-path Location of where to save files from functions like saveStrings() or saveFrame(). defaults to the folder that the java application was launched from, which means if this isn't set by the pde, everything goes into the same folder as processing.exe. --display=n Set what display should be used by this sketch. Displays are numbered starting from 1. This will be overridden by fullScreen() calls that specify a display. Omitting this option will cause the default display to be used. Parameters used by Processing when running via the PDE --external set when the applet is being used by the PDE --editor-location=x,y position of the upper-lefthand corner of the editor window, for placement of applet window All parameters *after* the sketch class name are passed to the sketch itself and available from its 'args' array while the sketch is running.See Also:
mainpublic static void main(java.lang.Class mainClass, java.lang.String... args)Convenience method so that PApplet.main(YourSketch.class) launches a sketch, rather than having to call getName() on it.mainpublic static void main(java.lang.String mainClass)Convenience method so that PApplet.main("YourSketch") launches a sketch, rather than having to wrap it into a single element String array.Parameters:mainClass - name of the class to load (with package if any)mainpublic static void main(java.lang.String mainClass, java.lang.String[] sketchArgs)Convenience method so that PApplet.main("YourSketch", args) launches a sketch, rather than having to wrap it into a String array, and appending the 'args' array when not null.Parameters:mainClass - name of the class to load (with package if any)sketchArgs - command line arguments to pass to the sketch's 'args' array. Note that this is not the same as the args passed to (and understood by) PApplet such as --display.runSketchpublic static void runSketch(java.lang.String[] args, PApplet constructedSketch)hideMenuBarpublic static void hideMenuBar()Convenience method, should only be called by PSurface subclasses.beginRecordpublic PGraphics beginRecord(java.lang.String renderer, java.lang.String filename)( begin auto-generated from beginRecord.xml ) Opens a new file and all subsequent drawing functions are echoed to this file as well as the display window. The beginRecord() function requires two parameters, the first is the renderer and the second is the file name. This function is always used with endRecord() to stop the recording process and close the file. Note that beginRecord() will only pick up any settings that happen after it has been called. For instance, if you call textFont() before beginRecord(), then that font will not be set for the file that you're recording to. ( end auto-generated )Parameters:renderer - PDF or SVGfilename - filename for outputSee Also:endRecord()beginRecordpublic void beginRecord(PGraphics recorder)endRecordpublic void endRecord()( begin auto-generated from endRecord.xml ) Stops the recording process started by beginRecord() and closes the file. ( end auto-generated )See Also:beginRecord(String, String)beginRawpublic PGraphics beginRaw(java.lang.String renderer, java.lang.String filename)( begin auto-generated from beginRaw.xml ) To create vectors from 3D data, use the beginRaw() and endRaw() commands. These commands will grab the shape data just before it is rendered to the screen. At this stage, your entire scene is nothing but a long list of individual lines and triangles. This means that a shape created with sphere() function will be made up of hundreds of triangles, rather than a single object. Or that a multi-segment line shape (such as a curve) will be rendered as individual segments. When using beginRaw() and endRaw(), it's possible to write to either a 2D or 3D renderer. For instance, beginRaw() with the PDF library will write the geometry as flattened triangles and lines, even if recording from the P3D renderer. If you want a background to show up in your files, use rect(0, 0, width, height) after setting the fill() to the background color. Otherwise the background will not be rendered to the file because the background is not shape. Using hint(ENABLE_DEPTH_SORT) can improve the appearance of 3D geometry drawn to 2D file formats. See the hint() reference for more details. See examples in the reference for the PDF and DXF libraries for more information. ( end auto-generated )Parameters:renderer - for example, PDF or DXFfilename - filename for outputSee Also:endRaw(), hint(int)beginRawpublic void beginRaw(PGraphics rawGraphics)Parameters:rawGraphics - ???endRawpublic void endRaw()( begin auto-generated from endRaw.xml ) Complement to beginRaw(); they must always be used together. See the beginRaw() reference for details. ( end auto-generated )See Also:beginRaw(String, String)loadPixelspublic void loadPixels()( begin auto-generated from loadPixels.xml ) Loads the pixel data for the display window into the pixels[] array. This function must always be called before reading from or writing to pixels[]. renderers may or may not seem to require loadPixels() or updatePixels(). However, the rule is that any time you want to manipulate the pixels[] array, you must first call loadPixels(), and after changes have been made, call updatePixels(). Even if the renderer may not seem to use this function in the current Processing release, this will always be subject to change. ( end auto-generated ) Advanced Override the g.pixels[] function to set the pixels[] array that's part of the PApplet object. Allows the use of pixels[] in the code, rather than g.pixels[].See Also:pixels, updatePixels()updatePixelspublic void updatePixels()( begin auto-generated from updatePixels.xml ) Updates the display window with the data in the pixels[] array. Use in conjunction with loadPixels(). If you're only reading pixels from the array, there's no need to call updatePixels() unless there are changes. renderers may or may not seem to require loadPixels() or updatePixels(). However, the rule is that any time you want to manipulate the pixels[] array, you must first call loadPixels(), and after changes have been made, call updatePixels(). Even if the renderer may not seem to use this function in the current Processing release, this will always be subject to change. Currently, none of the renderers use the additional parameters to updatePixels(), however this may be implemented in the future. ( end auto-generated )See Also:loadPixels(), pixelsupdatePixelspublic void updatePixels(int x1, int y1, int x2, int y2)Parameters:x1 - x-coordinate of the upper-left cornery1 - y-coordinate of the upper-left cornerx2 - width of the regiony2 - height of the regionbeginPGLpublic PGL beginPGL()endPGLpublic void endPGL()flushpublic void flush()hintpublic void hint(int which)beginShapepublic void beginShape()Start a new shape of type POLYGONbeginShapepublic void beginShape(int kind)( begin auto-generated from beginShape.xml ) Using the beginShape() and endShape() functions allow creating more complex forms. beginShape() begins recording vertices for a shape and endShape() stops recording. The value of the MODE parameter tells it which types of shapes to create from the provided vertices. With no mode specified, the shape can be any irregular polygon. The parameters available for beginShape() are POINTS, LINES, TRIANGLES, TRIANGLE_FAN, TRIANGLE_STRIP, QUADS, and QUAD_STRIP. After calling the beginShape() function, a series of vertex() commands must follow. To stop drawing the shape, call endShape(). The vertex() function with two parameters specifies a position in 2D and the vertex() function with three parameters specifies a position in 3D. Each shape will be outlined with the current stroke color and filled with the fill color. Transformations such as translate(), rotate(), and scale() do not work within beginShape(). It is also not possible to use other shapes, such as ellipse() or rect() within beginShape(). The P3D renderer settings allow stroke() and fill() settings to be altered per-vertex, however the default P2D renderer does not. Settings such as strokeWeight(), strokeCap(), and strokeJoin() cannot be changed while inside a beginShape()/endShape() block with any renderer. ( end auto-generated )Parameters:kind - Either POINTS, LINES, TRIANGLES, TRIANGLE_FAN, TRIANGLE_STRIP, QUADS, or QUAD_STRIPSee Also:PShape, PGraphics.endShape(), PGraphics.vertex(float, float, float, float, float), PGraphics.curveVertex(float, float, float), PGraphics.bezierVertex(float, float, float, float, float, float, float, float, float)edgepublic void edge(boolean edge)Sets whether the upcoming vertex is part of an edge. Equivalent to glEdgeFlag(), for people familiar with OpenGL.normalpublic void normal(float nx, float ny, float nz)( begin auto-generated from normal.xml ) Sets the current normal vector. This is for drawing three dimensional shapes and surfaces and specifies a vector perpendicular to the surface of the shape which determines how lighting affects it. Processing attempts to automatically assign normals to shapes, but since that's imperfect, this is a better option when you want more control. This function is identical to glNormal3f() in OpenGL. ( end auto-generated )Parameters:nx - x directionny - y directionnz - z directionSee Also:PGraphics.beginShape(int), PGraphics.endShape(int), PGraphics.lights()attribPositionpublic void attribPosition(java.lang.String name, float x, float y, float z)attribNormalpublic void attribNormal(java.lang.String name, float nx, float ny, float nz)attribColorpublic void attribColor(java.lang.String name, int color)attribpublic void attrib(java.lang.String name, float... values)attribpublic void attrib(java.lang.String name, int... values)attribpublic void attrib(java.lang.String name, boolean... values)textureModepublic void textureMode(int mode)( begin auto-generated from textureMode.xml ) Sets the coordinate space for texture mapping. There are two options, IMAGE, which refers to the actual coordinates of the image, and NORMAL, which refers to a normalized space of values ranging from 0 to 1. The default mode is IMAGE. In IMAGE, if an image is 100 x 200 pixels, mapping the image onto the entire size of a quad would require the points (0,0) (0,100) (100,200) (0,200). The same mapping in NORMAL_SPACE is (0,0) (0,1) (1,1) (0,1). ( end auto-generated )Parameters:mode - either IMAGE or NORMALSee Also:PGraphics.texture(PImage), PGraphics.textureWrap(int)textureWrappublic void textureWrap(int wrap)( begin auto-generated from textureWrap.xml ) Description to come... ( end auto-generated from textureWrap.xml )Parameters:wrap - Either CLAMP (default) or REPEATSee Also:PGraphics.texture(PImage), PGraphics.textureMode(int)texturepublic void texture(PImage image)( begin auto-generated from texture.xml ) Sets a texture to be applied to vertex points. The texture() function must be called between beginShape() and endShape() and before any calls to vertex(). When textures are in use, the fill color is ignored. Instead, use tint() to specify the color of the texture as it is applied to the shape. ( end auto-generated )Parameters:image - reference to a PImage objectSee Also:PGraphics.textureMode(int), PGraphics.textureWrap(int), PGraphics.beginShape(int), PGraphics.endShape(int), PGraphics.vertex(float, float, float, float, float)noTexturepublic void noTexture()Removes texture image for current shape. Needs to be called between beginShape and endShapevertexpublic void vertex(float x, float y)vertexpublic void vertex(float x, float y, float z)vertexpublic void vertex(float[] v)Used by renderer subclasses or PShape to efficiently pass in already formatted vertex information.Parameters:v - vertex parameters, as a float array of length VERTEX_FIELD_COUNTvertexpublic void vertex(float x, float y, float u, float v)vertexpublic void vertex(float x, float y, float z, float u, float v)( begin auto-generated from vertex.xml ) All shapes are constructed by connecting a series of vertices. vertex() is used to specify the vertex coordinates for points, lines, triangles, quads, and polygons and is used exclusively within the beginShape() and endShape() function. Drawing a vertex in 3D using the z parameter requires the P3D parameter in combination with size as shown in the above example. This function is also used to map a texture onto the geometry. The texture() function declares the texture to apply to the geometry and the u and v coordinates set define the mapping of this texture to the form. By default, the coordinates used for u and v are specified in relation to the image's size in pixels, but this relation can be changed with textureMode(). ( end auto-generated )Parameters:x - x-coordinate of the vertexy - y-coordinate of the vertexz - z-coordinate of the vertexu - horizontal coordinate for the texture mappingv - vertical coordinate for the texture mappingSee Also:PGraphics.beginShape(int), PGraphics.endShape(int), PGraphics.bezierVertex(float, float, float, float, float, float, float, float, float), PGraphics.quadraticVertex(float, float, float, float, float, float), PGraphics.curveVertex(float, float, float), PGraphics.texture(PImage)beginContourpublic void beginContour()endContourpublic void endContour()endShapepublic void endShape()endShapepublic void endShape(int mode)( begin auto-generated from endShape.xml ) The endShape() function is the companion to beginShape() and may only be called after beginShape(). When endshape() is called, all of image data defined since the previous call to beginShape() is written into the image buffer. The constant CLOSE as the value for the MODE parameter to close the shape (to connect the beginning and the end). ( end auto-generated )Parameters:mode - use CLOSE to close the shapeSee Also:PShape, PGraphics.beginShape(int)loadShapepublic PShape loadShape(java.lang.String filename)Parameters:filename - name of file to load, can be .svg or .objSee Also:PShape, createShape()loadShapepublic PShape loadShape(java.lang.String filename, java.lang.String options)createShapepublic PShape createShape()See Also:PShape, PShape.endShape(), loadShape(String)createShapepublic PShape createShape(int type)createShapepublic PShape createShape(int kind, float... p)Parameters:kind - either POINT, LINE, TRIANGLE, QUAD, RECT, ELLIPSE, ARC, BOX, SPHEREp - parameters that match the kind of shapeloadShaderpublic PShader loadShader(java.lang.String fragFilename)( begin auto-generated from loadShader.xml ) This is a new reference entry for Processing 2.0. It will be updated shortly. ( end auto-generated )Parameters:fragFilename - name of fragment shader fileloadShaderpublic PShader loadShader(java.lang.String fragFilename, java.lang.String vertFilename)Parameters:vertFilename - name of vertex shader fileshaderpublic void shader(PShader shader)( begin auto-generated from shader.xml ) This is a new reference entry for Processing 2.0. It will be updated shortly. ( end auto-generated )Parameters:shader - name of shader fileshaderpublic void shader(PShader shader, int kind)Parameters:kind - type of shader, either POINTS, LINES, or TRIANGLESresetShaderpublic void resetShader()( begin auto-generated from resetShader.xml ) This is a new reference entry for Processing 2.0. It will be updated shortly. ( end auto-generated )resetShaderpublic void resetShader(int kind)Parameters:kind - type of shader, either POINTS, LINES, or TRIANGLESfilterpublic void filter(PShader shader)Parameters:shader - the fragment shader to applyclippublic void clip(float a, float b, float c, float d)( begin auto-generated from clip.xml ) Limits the rendering to the boundaries of a rectangle defined by the parameters. The boundaries are drawn based on the state of the imageMode() fuction, either CORNER, CORNERS, or CENTER. ( end auto-generated )Parameters:a - x-coordinate of the rectangle, by defaultb - y-coordinate of the rectangle, by defaultc - width of the rectangle, by defaultd - height of the rectangle, by defaultnoClippublic void noClip()( begin auto-generated from noClip.xml ) Disables the clipping previously started by the clip() function. ( end auto-generated )blendModepublic void blendMode(int mode)( begin auto-generated from blendMode.xml ) This is a new reference entry for Processing 2.0. It will be updated shortly. ( end auto-generated )Parameters:mode - the blending mode to usebezierVertexpublic void bezierVertex(float x2, float y2, float x3, float y3, float x4, float y4)bezierVertexpublic void bezierVertex(float x2, float y2, float z2, float x3, float y3, float z3, float x4, float y4, float z4)( begin auto-generated from bezierVertex.xml ) Specifies vertex coordinates for Bezier curves. Each call to bezierVertex() defines the position of two control points and one anchor point of a Bezier curve, adding a new segment to a line or shape. The first time bezierVertex() is used within a beginShape() call, it must be prefaced with a call to vertex() to set the first anchor point. This function must be used between beginShape() and endShape() and only when there is no MODE parameter specified to beginShape(). Using the 3D version requires rendering with P3D (see the Environment reference for more information). ( end auto-generated )Parameters:x2 - the x-coordinate of the 1st control pointy2 - the y-coordinate of the 1st control pointz2 - the z-coordinate of the 1st control pointx3 - the x-coordinate of the 2nd control pointy3 - the y-coordinate of the 2nd control pointz3 - the z-coordinate of the 2nd control pointx4 - the x-coordinate of the anchor pointy4 - the y-coordinate of the anchor pointz4 - the z-coordinate of the anchor pointSee Also:PGraphics.curveVertex(float, float, float), PGraphics.vertex(float, float, float, float, float), PGraphics.quadraticVertex(float, float, float, float, float, float), PGraphics.bezier(float, float, float, float, float, float, float, float, float, float, float, float)quadraticVertexpublic void quadraticVertex(float cx, float cy, float x3, float y3)Parameters:cx - the x-coordinate of the control pointcy - the y-coordinate of the control pointx3 - the x-coordinate of the anchor pointy3 - the y-coordinate of the anchor pointSee Also:PGraphics.curveVertex(float, float, float), PGraphics.vertex(float, float, float, float, float), PGraphics.bezierVertex(float, float, float, float, float, float), PGraphics.bezier(float, float, float, float, float, float, float, float, float, float, float, float)quadraticVertexpublic void quadraticVertex(float cx, float cy, float cz, float x3, float y3, float z3)Parameters:cz - the z-coordinate of the control pointz3 - the z-coordinate of the anchor pointcurveVertexpublic void curveVertex(float x, float y)( begin auto-generated from curveVertex.xml ) Specifies vertex coordinates for curves. This function may only be used between beginShape() and endShape() and only when there is no MODE parameter specified to beginShape(). The first and last points in a series of curveVertex() lines will be used to guide the beginning and end of a the curve. A minimum of four points is required to draw a tiny curve between the second and third points. Adding a fifth point with curveVertex() will draw the curve between the second, third, and fourth points. The curveVertex() function is an implementation of Catmull-Rom splines. Using the 3D version requires rendering with P3D (see the Environment reference for more information). ( end auto-generated )Parameters:x - the x-coordinate of the vertexy - the y-coordinate of the vertexSee Also:PGraphics.curve(float, float, float, float, float, float, float, float, float, float, float, float), PGraphics.beginShape(int), PGraphics.endShape(int), PGraphics.vertex(float, float, float, float, float), PGraphics.bezier(float, float, float, float, float, float, float, float, float, float, float, float), PGraphics.quadraticVertex(float, float, float, float, float, float)curveVertexpublic void curveVertex(float x, float y, float z)Parameters:z - the z-coordinate of the vertexpointpublic void point(float x, float y)( begin auto-generated from point.xml ) Draws a point, a coordinate in space at the dimension of one pixel. The first parameter is the horizontal value for the point, the second value is the vertical value for the point, and the optional third value is the depth value. Drawing this shape in 3D with the z parameter requires the P3D parameter in combination with size() as shown in the above example. ( end auto-generated )Parameters:x - x-coordinate of the pointy - y-coordinate of the pointSee Also:PGraphics.stroke(int)pointpublic void point(float x, float y, float z)Parameters:z - z-coordinate of the pointlinepublic void line(float x1, float y1, float x2, float y2)( begin auto-generated from line.xml ) Draws a line (a direct path between two points) to the screen. The version of line() with four parameters draws the line in 2D. To color a line, use the stroke() function. A line cannot be filled, therefore the fill() function will not affect the color of a line. 2D lines are drawn with a width of one pixel by default, but this can be changed with the strokeWeight() function. The version with six parameters allows the line to be placed anywhere within XYZ space. Drawing this shape in 3D with the z parameter requires the P3D parameter in combination with size() as shown in the above example. ( end auto-generated )Parameters:x1 - x-coordinate of the first pointy1 - y-coordinate of the first pointx2 - x-coordinate of the second pointy2 - y-coordinate of the second pointSee Also:PGraphics.strokeWeight(float), PGraphics.strokeJoin(int), PGraphics.strokeCap(int), PGraphics.beginShape()linepublic void line(float x1, float y1, float z1, float x2, float y2, float z2)Parameters:z1 - z-coordinate of the first pointz2 - z-coordinate of the second pointtrianglepublic void triangle(float x1, float y1, float x2, float y2, float x3, float y3)( begin auto-generated from triangle.xml ) A triangle is a plane created by connecting three points. The first two arguments specify the first point, the middle two arguments specify the second point, and the last two arguments specify the third point. ( end auto-generated )Parameters:x1 - x-coordinate of the first pointy1 - y-coordinate of the first pointx2 - x-coordinate of the second pointy2 - y-coordinate of the second pointx3 - x-coordinate of the third pointy3 - y-coordinate of the third pointSee Also:beginShape()quadpublic void quad(float x1, float y1, float x2, float y2, float x3, float y3, float x4, float y4)( begin auto-generated from quad.xml ) A quad is a quadrilateral, a four sided polygon. It is similar to a rectangle, but the angles between its edges are not constrained to ninety degrees. The first pair of parameters (x1,y1) sets the first vertex and the subsequent pairs should proceed clockwise or counter-clockwise around the defined shape. ( end auto-generated )Parameters:x1 - x-coordinate of the first cornery1 - y-coordinate of the first cornerx2 - x-coordinate of the second cornery2 - y-coordinate of the second cornerx3 - x-coordinate of the third cornery3 - y-coordinate of the third cornerx4 - x-coordinate of the fourth cornery4 - y-coordinate of the fourth cornerrectModepublic void rectMode(int mode)( begin auto-generated from rectMode.xml ) Modifies the location from which rectangles draw. The default mode is rectMode(CORNER), which specifies the location to be the upper left corner of the shape and uses the third and fourth parameters of rect() to specify the width and height. The syntax rectMode(CORNERS) uses the first and second parameters of rect() to set the location of one corner and uses the third and fourth parameters to set the opposite corner. The syntax rectMode(CENTER) draws the image from its center point and uses the third and forth parameters of rect() to specify the image's width and height. The syntax rectMode(RADIUS) draws the image from its center point and uses the third and forth parameters of rect() to specify half of the image's width and height. The parameter must be written in ALL CAPS because Processing is a case sensitive language. Note: In version 125, the mode named CENTER_RADIUS was shortened to RADIUS. ( end auto-generated )Parameters:mode - either CORNER, CORNERS, CENTER, or RADIUSSee Also:PGraphics.rect(float, float, float, float)rectpublic void rect(float a, float b, float c, float d)( begin auto-generated from rect.xml ) Draws a rectangle to the screen. A rectangle is a four-sided shape with every angle at ninety degrees. By default, the first two parameters set the location of the upper-left corner, the third sets the width, and the fourth sets the height. These parameters may be changed with the rectMode() function. ( end auto-generated )Parameters:a - x-coordinate of the rectangle by defaultb - y-coordinate of the rectangle by defaultc - width of the rectangle by defaultd - height of the rectangle by defaultSee Also:PGraphics.rectMode(int), PGraphics.quad(float, float, float, float, float, float, float, float)rectpublic void rect(float a, float b, float c, float d, float r)Parameters:r - radii for all four cornersrectpublic void rect(float a, float b, float c, float d, float tl, float tr, float br, float bl)Parameters:tl - radius for top-left cornertr - radius for top-right cornerbr - radius for bottom-right cornerbl - radius for bottom-left cornersquarepublic void square(float x, float y, float extent)( begin auto-generated from square.xml ) Draws a square to the screen. A square is a four-sided shape with every angle at ninety degrees and each side is the same length. By default, the first two parameters set the location of the upper-left corner, the third sets the width and height. The way these parameters are interpreted, however, may be changed with the rectMode() function. ( end auto-generated )Parameters:x - x-coordinate of the rectangle by defaulty - y-coordinate of the rectangle by defaultextent - width and height of the rectangle by defaultSee Also:PGraphics.rect(float, float, float, float), PGraphics.rectMode(int)ellipseModepublic void ellipseMode(int mode)( begin auto-generated from ellipseMode.xml ) The origin of the ellipse is modified by the ellipseMode() function. The default configuration is ellipseMode(CENTER), which specifies the location of the ellipse as the center of the shape. The RADIUS mode is the same, but the width and height parameters to ellipse() specify the radius of the ellipse, rather than the diameter. The CORNER mode draws the shape from the upper-left corner of its bounding box. The CORNERS mode uses the four parameters to ellipse() to set two opposing corners of the ellipse's bounding box. The parameter must be written in ALL CAPS because Processing is a case-sensitive language. ( end auto-generated )Parameters:mode - either CENTER, RADIUS, CORNER, or CORNERSSee Also:ellipse(float, float, float, float), arc(float, float, float, float, float, float)ellipsepublic void ellipse(float a, float b, float c, float d)( begin auto-generated from ellipse.xml ) Draws an ellipse (oval) in the display window. An ellipse with an equal width and height is a circle. The first two parameters set the location, the third sets the width, and the fourth sets the height. The origin may be changed with the ellipseMode() function. ( end auto-generated )Parameters:a - x-coordinate of the ellipseb - y-coordinate of the ellipsec - width of the ellipse by defaultd - height of the ellipse by defaultSee Also:ellipseMode(int), arc(float, float, float, float, float, float)arcpublic void arc(float a, float b, float c, float d, float start, float stop)( begin auto-generated from arc.xml ) Draws an arc in the display window. Arcs are drawn along the outer edge of an ellipse defined by the x, y, width and height parameters. The origin or the arc's ellipse may be changed with the ellipseMode() function. The start and stop parameters specify the angles at which to draw the arc. ( end auto-generated )Parameters:a - x-coordinate of the arc's ellipseb - y-coordinate of the arc's ellipsec - width of the arc's ellipse by defaultd - height of the arc's ellipse by defaultstart - angle to start the arc, specified in radiansstop - angle to stop the arc, specified in radiansSee Also:ellipse(float, float, float, float), ellipseMode(int), radians(float), degrees(float)arcpublic void arc(float a, float b, float c, float d, float start, float stop, int mode)circlepublic void circle(float x, float y, float extent)( begin auto-generated from circle.xml ) Draws a circle to the screen. By default, the first two parameters set the location of the center, and the third sets the shape's width and height. The origin may be changed with the ellipseMode() function. ( end auto-generated )Parameters:x - x-coordinate of the ellipsey - y-coordinate of the ellipseextent - width and height of the ellipse by defaultSee Also:ellipse(float, float, float, float), ellipseMode(int)boxpublic void box(float size)( begin auto-generated from box.xml ) A box is an extruded rectangle. A box with equal dimension on all sides is a cube. ( end auto-generated )Parameters:size - dimension of the box in all dimensions (creates a cube)See Also:PGraphics.sphere(float)boxpublic void box(float w, float h, float d)Parameters:w - dimension of the box in the x-dimensionh - dimension of the box in the y-dimensiond - dimension of the box in the z-dimensionsphereDetailpublic void sphereDetail(int res)( begin auto-generated from sphereDetail.xml ) Controls the detail used to render a sphere by adjusting the number of vertices of the sphere mesh. The default resolution is 30, which creates a fairly detailed sphere definition with vertices every 360/30 = 12 degrees. If you're going to render a great number of spheres per frame, it is advised to reduce the level of detail using this function. The setting stays active until sphereDetail() is called again with a new parameter and so should not be called prior to every sphere() statement, unless you wish to render spheres with different settings, e.g. using less detail for smaller spheres or ones further away from the camera. To control the detail of the horizontal and vertical resolution independently, use the version of the functions with two parameters. ( end auto-generated ) Advanced Code for sphereDetail() submitted by toxi [031031]. Code for enhanced u/v version from davbol [080801].Parameters:res - number of segments (minimum 3) used per full circle revolutionSee Also:PGraphics.sphere(float)sphereDetailpublic void sphereDetail(int ures, int vres)Parameters:ures - number of segments used longitudinally per full circle revolutoinvres - number of segments used latitudinally from top to bottomspherepublic void sphere(float r)( begin auto-generated from sphere.xml ) A sphere is a hollow ball made from tessellated triangles. ( end auto-generated ) Advanced Implementation notes: cache all the points of the sphere in a static array top and bottom are just a bunch of triangles that land in the center point sphere is a series of concentric circles who radii vary along the shape, based on, er.. cos or something [toxi 031031] new sphere code. removed all multiplies with radius, as scale() will take care of that anyway [toxi 031223] updated sphere code (removed modulos) and introduced sphereAt(x,y,z,r) to avoid additional translate()'s on the user/sketch side [davbol 080801] now using separate sphereDetailU/V Parameters:r - the radius of the sphereSee Also:PGraphics.sphereDetail(int)bezierPointpublic float bezierPoint(float a, float b, float c, float d, float t)( begin auto-generated from bezierPoint.xml ) Evaluates the Bezier at point t for points a, b, c, d. The parameter t varies between 0 and 1, a and d are points on the curve, and b and c are the control points. This can be done once with the x coordinates and a second time with the y coordinates to get the location of a bezier curve at t. ( end auto-generated ) Advanced For instance, to convert the following example: stroke(255, 102, 0); line(85, 20, 10, 10); line(90, 90, 15, 80); stroke(0, 0, 0); bezier(85, 20, 10, 10, 90, 90, 15, 80); // draw it in gray, using 10 steps instead of the default 20 // this is a slower way to do it, but useful if you need // to do things with the coordinates at each step stroke(128); beginShape(LINE_STRIP); for (int i = 0; i 2ff7e9595c
Comments