4747 * with multiple color stops and custom center offsets) 
4848 * </ul> 
4949 * 
50-  * <p> 
51-  * By default, renders directly to the Processing sketch. Use 
50+  * <p>By default, renders directly to the Processing sketch. Use 
5251 * {@code .setRenderTarget()} to specify a custom {@code PGraphics} output 
53-  * buffer. 
52+  * buffer.</p>  
5453 * 
5554 * <p> 
56-  * Linear, radial & conic sampling algorithms adapted from <a href= 
57-  * "https://medium.com/@behreajj/color-gradients-in-processing-v-2-0-e5c0b87cdfd2"> 
58-  * Jeremy Behreandt's work</a>. Additional sampling patterns are original 
59-  * implementations. 
60-  * 
55+  * Linear, radial & conic sampling algorithms adapted from Jeremy 
56+  * Behreandt. Additional sampling patterns are original implementations. 
57+  * </p> 
6158 *  
6259 * @author Michael Carleton 
6360 */ 
@@ -178,7 +175,7 @@ public void setRenderTarget(PApplet p, int offSetX, int offSetY, int width, int
178175	 * PGraphics object provided by the user. 
179176	 *  
180177	 * @param g PImage or PGraphics object to render gradients into 
181- 	 * @see #renderIntoSketch( ) 
178+ 	 * @see #setRenderTarget(PApplet ) 
182179	 */ 
183180	public  void  setRenderTarget (PImage  g ) {
184181		setRenderTarget (g , 0 , 0 , g .width , g .height );
@@ -356,7 +353,6 @@ public void linearGradient(Gradient gradient, PVector centerPoint, double angle)
356353	/** 
357354	 * Renders a linear gradient using a given gradient centerpoint, angle and 
358355	 * length. 
359- 	 *  
360356	 * <p> 
361357	 * It's called 'linear' because the colors flow from left-to-right, 
362358	 * top-to-bottom, or at any angle you chose in a single direction. 
@@ -367,8 +363,9 @@ public void linearGradient(Gradient gradient, PVector centerPoint, double angle)
367363	 * @param angle       in radians 
368364	 * @param length      coefficient to lerp from centrepoint to edges (that 
369365	 *                    intersect with angle). default = 1: (first and last colors 
370- 	 *                    will be exactly on edge); <1: colors will be sqashed; >1 
371- 	 *                    colors spread out (outermost colors will leave the view). 
366+ 	 *                    will be exactly on edge); When <1, colors will be 
367+ 	 *                    squashed; when >1, colors spread out (outermost colors 
368+ 	 *                    will leave the view). 
372369	 */ 
373370	public  void  linearGradient (Gradient  gradient , PVector  centerPoint , double  angle , double  length ) {
374371		// get edge-line intersection points 
@@ -456,19 +453,11 @@ public void radialGradient(Gradient gradient, PVector centerPoint, double zoom)
456453	 * angle provided and the contrast between the color values is great enough to 
457454	 * tell a difference. 
458455	 *  
459- 	 * <p> 
460- 	 * This method creates a hard stop where the first and last colors bump right up 
461- 	 * to one another. See 
462- 	 * {@link #conicGradientSmooth(Gradient, PVector, double, double) 
463- 	 * conicGradientSmooth()} to render a conic gradient with a smooth transition 
464- 	 * between the first and last colors. 
465- 	 *  
466456	 * @param gradient    1D {@link Gradient gradient} to use as the basis for the 
467457	 *                    conic gradient 
468458	 * @param centerPoint The PVector center point of the gradient — the position 
469459	 *                    where it radiates from. 
470460	 * @param angle       in radians, where 0 is east; going clockwise 
471- 	 * @see #conicGradientSmooth(Gradient, PVector, double, double) 
472461	 */ 
473462	public  void  conicGradient (Gradient  gradient , PVector  centerPoint , double  angle ) {
474463		// TODO add zoom arg 
@@ -1457,8 +1446,8 @@ public Boolean call() {
14571446
14581447					double  z  = (renderMidpointY  - newYpos ) / (renderMidpointX  - newXpos ); // atan2(y,x) === atan(y/x), so calc y/x here 
14591448
1460- 					double   dist  =  Math . sqrt (( yDist  +  xDist  +  pinch ) * ( z  *  z  +  roundness )) *  denominator ;  // cos(atan(x)) === sqrt(z * z + 
1461- 																											 // 1) 
1449+ 					// cos(atan(x)) === sqrt(z * z + 1)  
1450+ 					double   dist  =  Math . sqrt (( yDist  +  xDist  +  pinch ) * ( z  *  z  +  roundness )) *  denominator ; 
14621451
14631452					final  int  stepInt  = clampAndDither (dist , x , y );
14641453					gradientPG .pixels [pixel ++] = gradientCache [stepInt ];
0 commit comments