Tabnine Logo
PApplet.lerp
Code IndexAdd Tabnine to your IDE (free)

How to use
lerp
method
in
processing.core.PApplet

Best Java code snippets using processing.core.PApplet.lerp (Showing top 8 results out of 315)

origin: ajavamind/Processing-Cardboard

/**
 * Linear interpolate the vector to x,y,z values
 * @param x the x component to lerp to
 * @param y the y component to lerp to
 * @param z the z component to lerp to
 */
public void lerp(float x, float y, float z, float amt) {
 this.x = PApplet.lerp(this.x,x,amt);
 this.y = PApplet.lerp(this.y,y,amt);
 this.z = PApplet.lerp(this.z,z,amt);
}
origin: org.processing/core

/**
 * Linear interpolate the vector to x,y,z values
 * @param x the x component to lerp to
 * @param y the y component to lerp to
 * @param z the z component to lerp to
 */
public PVector lerp(float x, float y, float z, float amt) {
 this.x = PApplet.lerp(this.x, x, amt);
 this.y = PApplet.lerp(this.y, y, amt);
 this.z = PApplet.lerp(this.z, z, amt);
 return this;
}
origin: ajavamind/Processing-Cardboard

/**
 * ( begin auto-generated from PVector_rotate.xml )
 *
 * Linear interpolate the vector to another vector
 *
 * ( end auto-generated )
 *
 * @webref pvector:method
 * @usage web_application
 * @brief Linear interpolate the vector to another vector
 * @param v the vector to lerp to
 * @param amt  The amount of interpolation; some value between 0.0 (old vector) and 1.0 (new vector). 0.1 is very near the new vector. 0.5 is halfway in between.
 */
public void lerp(PVector v, float amt) {
 x = PApplet.lerp(x,v.x,amt);
 y = PApplet.lerp(y,v.y,amt);
 z = PApplet.lerp(z,v.z,amt);
}
origin: org.processing/core

/**
 * ( begin auto-generated from PVector_rotate.xml )
 *
 * Linear interpolate the vector to another vector
 *
 * ( end auto-generated )
 *
 * @webref pvector:method
 * @usage web_application
 * @brief Linear interpolate the vector to another vector
 * @param v the vector to lerp to
 * @param amt  The amount of interpolation; some value between 0.0 (old vector) and 1.0 (new vector). 0.1 is very near the old vector; 0.5 is halfway in between.
 * @see PApplet#lerp(float, float, float)
 */
public PVector lerp(PVector v, float amt) {
 x = PApplet.lerp(x, v.x, amt);
 y = PApplet.lerp(y, v.y, amt);
 z = PApplet.lerp(z, v.z, amt);
 return this;
}
origin: ajavamind/Processing-Cardboard

lerpColorHSB3[0] = PApplet.lerp(lerpColorHSB1[0], lerpColorHSB2[0], amt);
lerpColorHSB3[1] = PApplet.lerp(lerpColorHSB1[1], lerpColorHSB2[1], amt);
lerpColorHSB3[2] = PApplet.lerp(lerpColorHSB1[2], lerpColorHSB2[2], amt);
return Color.HSVToColor(alfa, lerpColorHSB3);
origin: org.processing/core

for (int j = prev; j <= last; j++) {
 float btwn = PApplet.norm(j, prev, last);
 interp[j][0] = (int) PApplet.lerp((c0 >> 16) & 0xff, (c1 >> 16) & 0xff, btwn);
 interp[j][1] = (int) PApplet.lerp((c0 >> 8) & 0xff, (c1 >> 8) & 0xff, btwn);
 interp[j][2] = (int) PApplet.lerp(c0 & 0xff, c1 & 0xff, btwn);
 interp[j][3] = (int) (PApplet.lerp((c0 >> 24) & 0xff, (c1 >> 24) & 0xff, btwn) * opacity);
origin: org.processing/core

interp[j][0] = (int) PApplet.lerp((c0 >> 16) & 0xff, (c1 >> 16) & 0xff, btwn);
interp[j][1] = (int) PApplet.lerp((c0 >> 8) & 0xff, (c1 >> 8) & 0xff, btwn);
interp[j][2] = (int) PApplet.lerp(c0 & 0xff, c1 & 0xff, btwn);
interp[j][3] = (int) (PApplet.lerp((c0 >> 24) & 0xff, (c1 >> 24) & 0xff, btwn) * opacity);
origin: org.processing/core

float ho = PApplet.lerp(lerpColorHSB1[0], lerpColorHSB2[0], amt);
float so = PApplet.lerp(lerpColorHSB1[1], lerpColorHSB2[1], amt);
float bo = PApplet.lerp(lerpColorHSB1[2], lerpColorHSB2[2], amt);
processing.corePAppletlerp

Javadoc

( begin auto-generated from lerp.xml ) Calculates a number between two numbers at a specific increment. The amt parameter is the amount to interpolate between the two values where 0.0 equal to the first point, 0.1 is very near the first point, 0.5 is half-way in between, etc. The lerp function is convenient for creating motion along a straight path and for drawing dotted lines. ( end auto-generated )

Popular methods of PApplet

  • constrain
  • createGraphics
    Create an offscreen graphics surface for drawing, in this case for a renderer that writes to a file
  • loadStrings
    ( begin auto-generated from loadStrings.xml ) Reads the contents of a file or url and creates a Stri
  • saveStrings
    ( begin auto-generated from saveStrings.xml ) Writes an array of strings to a file, one line per str
  • abs
  • createImage
    ( begin auto-generated from createImage.xml ) Creates a new PImage (the datatype for storing images)
  • createShape
  • createWriter
    ( begin auto-generated from createWriter.xml ) Creates a new file in the sketch folder, and a PrintW
  • loadImage
  • main
    main() method for running this class from the command line. Usage: PApplet [options] [s
  • max
  • parseInt
  • max,
  • parseInt,
  • random,
  • round,
  • split,
  • sqrt,
  • unhex,
  • arrayCopy,
  • ceil,
  • checkExtension

Popular in Java

  • Running tasks concurrently on multiple threads
  • getSharedPreferences (Context)
  • notifyDataSetChanged (ArrayAdapter)
  • compareTo (BigDecimal)
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • FileNotFoundException (java.io)
    Thrown when a file specified by a program cannot be found.
  • Proxy (java.net)
    This class represents proxy server settings. A created instance of Proxy stores a type and an addres
  • Deque (java.util)
    A linear collection that supports element insertion and removal at both ends. The name deque is shor
  • BoxLayout (javax.swing)
  • Join (org.hibernate.mapping)
  • Best plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now